Edge Edge.hxx cadex/ModelData/Edge.hxx. More...
Public Member Functions | |
__init__ (self, *args) | |
Constructor. | |
SetCurve (self, *args) | |
Curve (self) | |
Returns edge 3D curve and its limits. | |
SetPCurve (self, *args) | |
PCurve (self, theFace) | |
Returns edge p-curve on a face and its limits. | |
StartVertex (self) | |
Returns a start vertex. | |
EndVertex (self) | |
Returns an end vertex. | |
SetTolerance (self, theTolerance) | |
Sets edge tolerance. | |
Tolerance (self) | |
Returns edge tolerance. | |
IsDegenerated (self) | |
Returns true if the edge is degenerated. | |
IsSeam (self, theFace) | |
Triangulation (self) | |
Returns a polyline approximation of the curve. | |
![]() | |
Type (self) | |
Returns a shape type. | |
Orientation (self) | |
Returns orientation flag. | |
Reversed (self) | |
Returns a shape that shares the same geometry and subshape graph but has opposite orientation. | |
Oriented (self, theOrientation) | |
Returns a shape that shares the same geometry and subshape graph and has specified orientation. | |
IsEqual (self, theOther) | |
Returns true if the shape shares the same geometry and subshape graph, and has equal orientation. | |
IsSame (self, theOther) | |
Returns true if the shape shares the same geometry and subshape graph. | |
SetName (self, theName) | |
Sets the name. | |
Name (self) | |
Returns the name. | |
AddAssociatedPMI (self, *args) | |
AssociatedPMI (self) | |
Returns the PMI elements. | |
![]() | |
Id (self) | |
Return unique identifier of public object. | |
IsNull (self) | |
Static Public Member Functions | |
CompareType (theObject) | |
Check the type of object. | |
Cast (*args) | |
Overload 1: Casts a base class object to Edge. | |
Edge Edge.hxx cadex/ModelData/Edge.hxx.
Defines an edge.
The following image depicts an example of an edge:
An edge resides on a curve (returned by Curve()) and is bounded by two vertices returned by StartVertex() and EndVertex(). StartVertex() corresponds to smaller parameter along the curve and EndVertex() - to greater parameter (regardless of own edge orientation). Vertices must always be explicitly defined.
If an edge has forward Orientation() then it is considered to align with its underlying curve. If Orientation() is reversed, then the edge is considered to have an opposite orientation comparing to its underlying curve.
If an edge is owned by a face (via its wire) then this edge must also have a p-curve (parametric curve) defined in a parametric domain of the face surface. If an edge is shared by two faces in a shell then it must have pcurve on each parent face. P-curves are oriented in the same direction as 3D curve.
Each curve representation (3D curve and p-curves) has explicit parametric range \([t_{min}, t_{max}]\), where \(t_{min}\) is a curve parameter corresponding to start vertex and \(t_{max}\) corresponding to end vertex. These points on the curve must be within vertex tolerances, i.e.:
The \(t_{min}\) parameter must always be smaller than \(t_{max}\). If the curve is not periodic then both parameters must be within the curve's definition range. If the curve is periodic then \(t_{min}\) should be within the curve's definition range. For instance, a closed edge lying on a circle (which has a definition range \([0, 2\pi]\)) may have a range \([0.5\pi, 2.5\pi]\).
When importing models from external files or creating from scratch MTK also tries to ensure two more strict requirements:
An edge is called degenerated if it corresponds to a degenerated curve, e.g. a sphere pole, a cone apex or a B-Spline singularity point. In this case it does not have a 3D curve and only has a pcurve. For instance in the case of a sphere 'north' pole the pcurve is V-isoline \(V=\frac{\pi}{2}\).
IsDegenerated() returns true for a degenerated edge, and Curve() returns a null curve.
An edge is called seam-edge if it corresponds to a curve on a periodical suface that has two pcurve representations in the surface parametric domain. Examples include a curve corresponding to U-isolines of a cylindrical surface with \(U=0\) and \(U=2\pi\).
Although, such seam-edges typically have pcurves corresponding to surface boundary iso-lines (e.g. one corresponding to surface \(U_{min}\) and another to \(U_{max}\)), this is not always the case. Some seam-edges may have pcurves corresponding to arbitrary pairs of isolines shifted by surface period (e.g. one is \(V^*\) and another \(V^* + V_{period}\)). Some seam-edges may have even a pair of free-form pcurves, one shifted by surface period from another. This often happens when importing a file generated by CAD systems/kernels which do not explicitly support seam-edges.
A seam edge occured twice in its parent wire - with forward and reversed orientations. Edge orientation defines which pcurve will be returned by PCurve(). IsSeam() returns true for the seam-edge.
The edge tolerance (returned by Tolerance()) defines a radius of a pipe around edge's 3D curve, in which all p-curves (reconstructed on surfaces) must reside.
Any edge is created with a default tolerance (returned by Tolerance()) of 1e-7mm. Vertex tolerance (see ModelData.Vertex.Tolerance()) defines a radius of a sphere around vertex point. Edge curves' ends must be inside those spheres.
Edge tolerance should not exceed vertices tolerances.
Creating an edge from scratch must be done in the following order:
The following example demonstrates creation of an edge in a solid cylinder, which is shared by top planar face and lateral cylindrical one. Note that the edge only has a 3D curve and a p-curve on the cylindrical surface. The p-curve on the planar face is not created as explicit p-curves on planar surface are not required.
manufacturingtoolkit.CadExMTK.ModelData_Edge.__init__ | ( | self, | |
* | args ) |
Constructor.
Reimplemented from manufacturingtoolkit.CadExMTK.ModelData_Shape.
|
static |
Overload 1: Casts a base class object to Edge.
|
Overload 2: Casts a base class object to Edge.
Reimplemented from manufacturingtoolkit.CadExMTK.ModelData_Shape.
|
static |
Check the type of object.
Returns true if the specified object is this class type.
Reimplemented from manufacturingtoolkit.CadExMTK.ModelData_Shape.