ChamferCalculus
Canonical path: NemAll_Python_Geometry.ChamferCalculus
Class for chamfer calculation between two objects
Methods:
-
Calculate–Overloaded function. See individual overloads.
-
CalculateApplicableChamfers–Overloaded function. See individual overloads.
-
CalculateChamferInsideOnePolyline–Calculate chamfer inside one polyline - 2 different segments of a polyline are to be chamfered
-
CalculateChamferLine–Overloaded function. See individual overloads.
-
CalculateChamferedLine–Overloaded function. See individual overloads.
-
CalculateHalvingAngle–Calculates halving angle of 2 given lines in the global coordinate system
-
SwapLinePoints–Overloaded function. See individual overloads.
Calculate
overloaded
Calculate(polyhedron: Polyhedron3D, chamferWidth: float) -> tuple
Calculate chamfer on all edges of given Polyhedron3D
Parameters:
-
polyhedron(Polyhedron3D) –polyhedron to chamfer
-
chamferWidth(float) –chamfer width
Returns:
Calculate(
polyhedron: Polyhedron3D,
edges: VecSizeTList,
chamferWidth: float,
propagation: bool,
) -> tuple
Calculate chamfer on selected edges of given Polyhedron3D
Parameters:
-
polyhedron(Polyhedron3D) –polyhedron to chamfer
-
edges(VecSizeTList) –edges to chamfer
-
chamferWidth(float) –chamfer width
-
propagation(bool) –flag for propagation of neighboring edges
Returns:
Calculate(
brep: BRep3D, edges: VecSizeTList, chamferWidth: float, propagation: bool
) -> tuple
Calculate chamfer on selected edges of given BRep3D
Parameters:
-
brep(BRep3D) –BRep to chamfer
-
edges(VecSizeTList) –edges to chamfer
-
chamferWidth(float) –chamfer width
-
propagation(bool) –flag for propagation of neighboring edges
Returns:
CalculateApplicableChamfers
overloaded
CalculateApplicableChamfers(
line1: Line2D,
line2: Line2D,
intersectionPoint: Point2D,
chamferWidth: float,
) -> Line2DList
Calculates four applicable chamfer lines
Parameters:
-
line1(Line2D) –Geometry of first chamfered line
-
line2(Line2D) –Geometry of second chamfered line
-
intersectionPoint(Point2D) –Intersection point of 2 chamfered lines
-
chamferWidth(float) –Chamfer width
Returns:
-
Line2DList–Calculated 4 applicable chamfer lines
CalculateApplicableChamfers(
igeo1: object,
igeo2: object,
plane3D: Plane3D,
intersectionPoint: Point3D,
chamferWidth: float,
) -> Line3DList
Calculates four applicable chamfer lines
Parameters:
-
igeo1(object) –Geometry of first object
-
igeo2(object) –Geometry of second object
-
plane3D(Plane3D) –3D plane in which objects lie
-
intersectionPoint(Point3D) –Intersection point of 2 chamfered objects
-
chamferWidth(float) –Chamfer width
Returns:
-
Line3DList–Calculated 4 applicable chamfer lines
CalculateApplicableChamfers(
line1: Line3D,
line2: Line3D,
plane3D: Plane3D,
intersectionPoint: Point3D,
chamferWidth: float,
) -> Line3DList
Calculates applicable chamfer lines between two 3D lines
Parameters:
-
line1(Line3D) –Geometry of the first line
-
line2(Line3D) –Geometry of the second line
-
plane3D(Plane3D) –3D plane in which line lies
-
intersectionPoint(Point3D) –Intersection point of 2 chamfered lines
-
chamferWidth(float) –Chamfer width
Returns:
-
Line3DList–Calculated 4 applicable chamfer lines
CalculateApplicableChamfers(
line: Line3D, arc: Arc3D, chamferArc: Arc3D, bFirstElementIsLine: bool
) -> Line3DList
Calculates applicable chamfer lines between 3D line and 3D arc
Parameters:
-
line(Line3D) –Geometry of 3D line
-
arc(Arc3D) –Geometry of 3D arc
-
chamferArc(Arc3D) –Geometry of chamfer arc
-
bFirstElementIsLine(bool) –Flag for order of element's intersection calculation
Returns:
-
Line3DList–Calculated 4 applicable chamfer lines
CalculateApplicableChamfers(
arc1: Arc3D, arc2: Arc3D, chamferArc: Arc3D
) -> Line3DList
Calculates applicable chamfer lines between two 3D arcs
Parameters:
-
arc1(Arc3D) –Geometry of the first arc
-
arc2(Arc3D) –Geometry of the second arc
-
chamferArc(Arc3D) –Geometry of chamfer arc
Returns:
-
Line3DList–Calculated 4 applicable chamfer lines
CalculateChamferInsideOnePolyline
staticmethod
CalculateChamferInsideOnePolyline(
originalChamferLine: Line3D,
originalPolyLine: Polyline3D,
polySegment1: int,
polySegment2: int,
) -> Polyline3D
Calculate chamfer inside one polyline - 2 different segments of a polyline are to be chamfered
Parameters:
-
originalChamferLine(Line3D) –Geometry of chamfer line
-
originalPolyLine(Polyline3D) –Geometry of chamfered polyline
-
polySegment1(int) –First segment index of polyline
-
polySegment2(int) –Second segment index of polyline
Returns:
-
Polyline3D–Calculated chamfered polyline
CalculateChamferLine
overloaded
CalculateChamferLine(
igeo1: object,
igeo2: object,
plane3D: Plane3D,
intersectionPoint: Point3D,
inputPoint: Point3D,
) -> Line3D
Calculates chamfer line
Parameters:
-
igeo1(object) –Geometry of first object
-
igeo2(object) –Geometry of second object
-
plane3D(Plane3D) –3D plane of the objects
-
intersectionPoint(Point3D) –Intersection point of objects for chamfering
-
inputPoint(Point3D) –Point of click (through which the chamfer should run)
Returns:
-
Line3D–Calculated chamfer line
CalculateChamferLine(
line1: Line3D,
line2: Line3D,
plane3D: Plane3D,
intersectionPoint: Point3D,
inputPoint: Point3D,
) -> Line3D
Calculates chamfer line between two 3D lines
Parameters:
-
line1(Line3D) –Geometry of first 3D line
-
line2(Line3D) –Geometry of second 3D line
-
plane3D(Plane3D) –3D plane of the objects
-
intersectionPoint(Point3D) –Intersection point of objects for chamfering
-
inputPoint(Point3D) –Point of click (through which the chamfer should run)
Returns:
-
Line3D–Calculated chamfer line
CalculateChamferLine(
line: Line3D,
arc: Arc3D,
plane3D: Plane3D,
intersectionPoint: Point3D,
inputPoint: Point3D,
bFirstElementIsLine: bool,
) -> Line3D
Calculates chamfer line between 3D line and 3D arc
Parameters:
-
line(Line3D) –Geometry of 3D line
-
arc(Arc3D) –Geometry of 3D arc
-
plane3D(Plane3D) –3D plane of the objects
-
intersectionPoint(Point3D) –Intersection point of objects for chamfering
-
inputPoint(Point3D) –Point of click (through which the chamfer should run)
-
bFirstElementIsLine(bool) –Flag for order of element's intersection calculation
Returns:
-
Line3D–Calculated chamfer line
CalculateChamferLine(
arc1: Arc3D,
arc2: Arc3D,
plane3D: Plane3D,
intersectionPoint: Point3D,
inputPoint: Point3D,
) -> Line3D
Calculates chamfer line between two 3D arcs
Parameters:
-
arc1(Arc3D) –Geometry of the first 3D arc
-
arc2(Arc3D) –Geometry of the second 3D arc
-
plane3D(Plane3D) –3D plane of the objects
-
intersectionPoint(Point3D) –Intersection point of objects for chamfering
-
inputPoint(Point3D) –Point of click (through which the chamfer should run)
Returns:
-
Line3D–Calculated chamfer line
CalculateChamferedLine
overloaded
CalculateChamferedLine(
originalLine: Line2D, intersectionPoint: Point2D, chamferPoint: Point2D
) -> Line2D
CalculateChamferedLine(
originalLine: Line3D,
plane3D: Plane3D,
intersectionPoint: Point3D,
chamferPoint: Point3D,
) -> Line3D
Calculates chamfered line
Parameters:
-
originalLine(Line3D) –Line which is being chamfered
-
plane3D(Plane3D) –3D plane in which line lies
-
intersectionPoint(Point3D) –Intersection point of 2 chamfered lines
-
chamferPoint(Point3D) –Intersection point of chamfer line and (original) chamfered line
Returns:
-
Line3D–Calculated chamfered line