Formatting changes

This commit is contained in:
gumyr 2023-10-21 11:12:58 -04:00
parent ee8517f4a4
commit 8baf47549b

View file

@ -1088,7 +1088,11 @@ class Mixin3D:
return max_radius return max_radius
def chamfer( 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: ) -> Self:
"""Chamfer """Chamfer
@ -1104,7 +1108,7 @@ class Mixin3D:
part of the face part of the face
Returns: Returns:
Any: Chamfered solid Self: Chamfered solid
""" """
if face: if face:
if any((edge for edge in edge_list if edge not in face.edges())): 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()) return self.__class__(fillet_builder.Shape())
def chamfer_2d( 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: ) -> Face:
"""Apply 2D chamfer to a face """Apply 2D chamfer to a face
@ -5467,10 +5475,15 @@ class Face(Shape):
distance (float): chamfer length distance (float): chamfer length
distance2 (float): chamfer length distance2 (float): chamfer length
vertices (Iterable[Vertex]): vertices to chamfer 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 part of the edge
Raises:
ValueError: Cannot chamfer at this location
ValueError: One or more vertices are not part of edge
Returns: Returns:
Face: face with a chamfered corner(s)
""" """
@ -5495,7 +5508,6 @@ class Face(Shape):
if edge in edges: if edge in edges:
pass pass
chamfer_builder.AddChamfer( chamfer_builder.AddChamfer(
TopoDS.Edge_s(edge1.wrapped), TopoDS.Edge_s(edge1.wrapped),
TopoDS.Edge_s(edge2.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() return Face.make_from_wires(self).fillet_2d(radius, vertices).outer_wire()
def chamfer_2d( 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: ) -> Wire:
"""chamfer_2d """chamfer_2d