Chamfer Calculus
Class full path: NemAll_Python_Geometry.ChamferCalculus
Class for chamfer calculation between two objects
Functions
Calculate    
    
      overload
    
    
  Calculate(polyhedron, chamferWidth)
  
      staticmethod
  
  Calculate chamfer on all edges of given Polyhedron3D
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| polyhedron | Polyhedron3D | polyhedron to chamfer | required | 
| chamferWidth | float | chamfer width | required | 
Returns:
| Type | Description | 
|---|---|
| eGeometryErrorCode | error code, | 
| Polyhedron3D | Resulting polyhedron | 
Calculate(polyhedron, edges, chamferWidth, propagation)
  
      staticmethod
  
  Calculate chamfer on selected edges of given Polyhedron3D
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| polyhedron | Polyhedron3D | polyhedron to chamfer | required | 
| edges | VecSizeTList | edges to chamfer | required | 
| chamferWidth | float | chamfer width | required | 
| propagation | bool | flag for propagation of neighboring edges | required | 
Returns:
| Type | Description | 
|---|---|
| eGeometryErrorCode | error code, | 
| Polyhedron3D | Resulting polyhedron | 
Calculate(brep, chamferWidth)
  
      staticmethod
  
  Calculate chamfer on all edges of given BRep3D
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| brep | BRep3D | BRep to chamfer | required | 
| chamferWidth | float | chamfer width | required | 
Returns:
| Type | Description | 
|---|---|
| eGeometryErrorCode | error code, | 
| BRep3D | Resulting BRep | 
Calculate(brep, edges, chamferWidth, propagation)          
  
      staticmethod
  
      Calculate chamfer on selected edges of given BRep3D
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| brep | BRep3D | BRep to chamfer | required | 
| edges | VecSizeTList | edges to chamfer | required | 
| chamferWidth | float | chamfer width | required | 
| propagation | bool | flag for propagation of neighboring edges | required | 
Returns:
| Type | Description | 
|---|---|
| eGeometryErrorCode | error code, | 
| BRep3D | Resulting BRep | 
CalculateApplicableChamfers    
    
      overload
    
    
  CalculateApplicableChamfers(line1, line2, intersectionPoint, chamferWidth)
  
      staticmethod
  
  Calculates four applicable chamfer lines
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| line1 | Line2D | Geometry of first chamfered line | required | 
| line2 | Line2D | Geometry of second chamfered line | required | 
| intersectionPoint | Point2D | Intersection point of 2 chamfered lines | required | 
| chamferWidth | float | Chamfer width | required | 
Returns:
| Type | Description | 
|---|---|
| Line2DList | Calculated 4 applicable chamfer lines | 
CalculateApplicableChamfers(igeo1, igeo2, plane3D, intersectionPoint, chamferWidth)
  
      staticmethod
  
  Calculates four applicable chamfer lines
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| igeo1 | object | Geometry of first object | required | 
| igeo2 | object | Geometry of second object | required | 
| plane3D | Plane3D | 3D plane in which objects lie | required | 
| intersectionPoint | Point3D | Intersection point of 2 chamfered objects | required | 
| chamferWidth | float | Chamfer width | required | 
Returns:
| Type | Description | 
|---|---|
| Line3DList | Calculated 4 applicable chamfer lines | 
CalculateApplicableChamfers(line1, line2, plane3D, intersectionPoint, chamferWidth)
  
      staticmethod
  
  Calculates applicable chamfer lines between two 3D lines
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| line1 | Line3D | Geometry of the first line | required | 
| line2 | Line3D | Geometry of the second line | required | 
| plane3D | Plane3D | 3D plane in which line lies | required | 
| intersectionPoint | Point3D | Intersection point of 2 chamfered lines | required | 
| chamferWidth | float | Chamfer width | required | 
Returns:
| Type | Description | 
|---|---|
| Line3DList | Calculated 4 applicable chamfer lines | 
CalculateApplicableChamfers(line, arc, chamferArc, bFirstElementIsLine)
  
      staticmethod
  
  Calculates applicable chamfer lines between 3D line and 3D arc
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| line | Line3D | Geometry of 3D line | required | 
| arc | Arc3D | Geometry of 3D arc | required | 
| chamferArc | Arc3D | Geometry of chamfer arc | required | 
| bFirstElementIsLine | bool | Flag for order of element's intersection calculation | required | 
Returns:
| Type | Description | 
|---|---|
| Line3DList | Calculated 4 applicable chamfer lines | 
CalculateApplicableChamfers(arc1, arc2, chamferArc)          
  
      staticmethod
  
      Calculates applicable chamfer lines between two 3D arcs
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| arc1 | Arc3D | Geometry of the first arc | required | 
| arc2 | Arc3D | Geometry of the second arc | required | 
| chamferArc | Arc3D | Geometry of chamfer arc | required | 
Returns:
| Type | Description | 
|---|---|
| Line3DList | Calculated 4 applicable chamfer lines | 
CalculateChamferInsideOnePolyline(originalChamferLine, originalPolyLine, polySegment1, polySegment2)            
  
      staticmethod
  
          
      Calculate chamfer inside one polyline - 2 different segments of a polyline are to be chamfered
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| originalChamferLine | Line3D | Geometry of chamfer line | required | 
| originalPolyLine | Polyline3D | Geometry of chamfered polyline | required | 
| polySegment1 | int | First segment index of polyline | required | 
| polySegment2 | int | Second segment index of polyline | required | 
Returns:
| Type | Description | 
|---|---|
| Polyline3D | Calculated chamfered polyline | 
CalculateChamferedLine    
    
      overload
    
    
  CalculateChamferedLine(originalLine, intersectionPoint, chamferPoint)
  
      staticmethod
  
  Calculates chamfered line
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| originalLine | Line2D | Line which is being chamfered | required | 
| intersectionPoint | Point2D | Intersection point of 2 chamfered lines | required | 
| chamferPoint | Point2D | Intersection point of chamfer line and (original) chamfered line | required | 
Returns:
| Type | Description | 
|---|---|
| Line2D | Calculated chamfered line | 
CalculateChamferedLine(originalLine, plane3D, intersectionPoint, chamferPoint)          
  
      staticmethod
  
      Calculates chamfered line
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| originalLine | Line3D | Line which is being chamfered | required | 
| plane3D | Plane3D | 3D plane in which line lies | required | 
| intersectionPoint | Point3D | Intersection point of 2 chamfered lines | required | 
| chamferPoint | Point3D | Intersection point of chamfer line and (original) chamfered line | required | 
Returns:
| Type | Description | 
|---|---|
| Line3D | Calculated chamfered line | 
CalculateHalvingAngle(line1, line2, intersectionPoint)            
  
      staticmethod
  
          
      Calculates halving angle of 2 given lines in the global coordinate system
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| line1 | Line2D | Geometry of first line | required | 
| line2 | Line2D | Geometry of second line | required | 
| intersectionPoint | Point2D | Intersection point of the 2 lines | required | 
Returns:
| Type | Description | 
|---|---|
| Angle | Halving angle | 
SwapLinePoints    
    
      overload
    
    
  SwapLinePoints(line, point)
  
      staticmethod
  
  Changes line orientation if given point lies on line's left side.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| line | Line2D | line to be changed | required | 
| point | Point2D | point to be evaluated | required | 
Returns:
| Type | Description | 
|---|---|
| bool | True if line orientation was changed, false if orientation was left intact, | 
| Line3D | Resulting line | 
SwapLinePoints(line, point)          
  
      staticmethod
  
      Changes line orientation if given point lies on line's left side
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| line | Line3D | line to be changed | required | 
| point | Point3D | point to be evaluated | required | 
Returns:
| Type | Description | 
|---|---|
| bool | True if line orientation was changed, false if orientation was left intact, | 
| Line3D | Resulting line |