mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-06 02:30:55 -08:00
Formatting changes
This commit is contained in:
parent
ee8517f4a4
commit
8baf47549b
1 changed files with 27 additions and 11 deletions
|
|
@ -1088,7 +1088,11 @@ class Mixin3D:
|
|||
return max_radius
|
||||
|
||||
def chamfer(
|
||||
self, length: float, length2: Optional[float], edge_list: Iterable[Edge], face: Face = None
|
||||
self,
|
||||
length: float,
|
||||
length2: Optional[float],
|
||||
edge_list: Iterable[Edge],
|
||||
face: Face = None,
|
||||
) -> Self:
|
||||
"""Chamfer
|
||||
|
||||
|
|
@ -1104,7 +1108,7 @@ class Mixin3D:
|
|||
part of the face
|
||||
|
||||
Returns:
|
||||
Any: Chamfered solid
|
||||
Self: Chamfered solid
|
||||
"""
|
||||
if face:
|
||||
if any((edge for edge in edge_list if edge not in face.edges())):
|
||||
|
|
@ -5459,7 +5463,11 @@ class Face(Shape):
|
|||
return self.__class__(fillet_builder.Shape())
|
||||
|
||||
def chamfer_2d(
|
||||
self, distance: float, distance2: float, vertices: Iterable[Vertex], edge: Edge=None,
|
||||
self,
|
||||
distance: float,
|
||||
distance2: float,
|
||||
vertices: Iterable[Vertex],
|
||||
edge: Edge = None,
|
||||
) -> Face:
|
||||
"""Apply 2D chamfer to a face
|
||||
|
||||
|
|
@ -5467,10 +5475,15 @@ class Face(Shape):
|
|||
distance (float): chamfer length
|
||||
distance2 (float): chamfer length
|
||||
vertices (Iterable[Vertex]): vertices to chamfer
|
||||
edge (Edge): identifies the side where length is measured. The virtices must be
|
||||
edge (Edge): identifies the side where length is measured. The vertices must be
|
||||
part of the edge
|
||||
|
||||
Raises:
|
||||
ValueError: Cannot chamfer at this location
|
||||
ValueError: One or more vertices are not part of edge
|
||||
|
||||
Returns:
|
||||
Face: face with a chamfered corner(s)
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -5495,7 +5508,6 @@ class Face(Shape):
|
|||
if edge in edges:
|
||||
pass
|
||||
|
||||
|
||||
chamfer_builder.AddChamfer(
|
||||
TopoDS.Edge_s(edge1.wrapped),
|
||||
TopoDS.Edge_s(edge2.wrapped),
|
||||
|
|
@ -6909,7 +6921,11 @@ class Wire(Shape, Mixin1D):
|
|||
return Face.make_from_wires(self).fillet_2d(radius, vertices).outer_wire()
|
||||
|
||||
def chamfer_2d(
|
||||
self, distance: float, distance2: float, vertices: Iterable[Vertex], edge:Edge = None
|
||||
self,
|
||||
distance: float,
|
||||
distance2: float,
|
||||
vertices: Iterable[Vertex],
|
||||
edge: Edge = None,
|
||||
) -> Wire:
|
||||
"""chamfer_2d
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue