IBRepEdge_DG Interface
- GetCurve
- SetCurve
- SetCurve1
- SetCurve2
- GetEndVertex
- SetEndVertex
- GetPCurve
- SetPCurve
- SetPCurve1
- GetRange
- SetRange
- GetPoint
- GetPointRatio
- FindEnd
- GetOtherEnd
- GetFace
- GetOtherFace
- FindFace
- FindSurface
Represents a BRep edge
Implements also: IBRepShape_DG, IObject_DG.
A standalone edge can be created via IObjectGenerator_DG.Create("IBRepEdge_DG") > IBRepEdge_DG query.
ICurve_DG GetCurve()
Returns 3D curve, which represents geometry of the edge
void SetCurve(ICurve_DG curve)
Changes internal geometry of the edge. If this edge has vertices, their position is adjusted to the nearest point on the curve. If this edge has no vertices, range of the curve must be finite
void SetCurve1(ICurve_DG curve, Point_DG endFirst, Point_DG endLast)
void SetCurve2(ICurve_DG curve, double uFirst, double uLast)
Changes internal geometry of the edge. uFirst and uLast may be different from (be a part of) the range of the curve. Vertices are added, if absent, and positions are adjusted to the specified points
IBRepVertex_DG GetEndVertex(int end)
void SetEndVertex(int end, IBRepVertex_DG vertex)
ICurve2d_DG GetPCurve(int side, double outMinParam, double outMaxParam)
Returns 2D curve in space of parameters of the specified adjacent face. Use FindFace() to find on which side a face is attached. Valid surfaces have face 0 on the left-hand side
(this edge is positive in the face) and face 1 on the right-hand side, looking from outside (from positive side of the surface).
More
void SetPCurve(int side, ICurve2d_DG curveUV)
void SetPCurve1(int side, ICurve2d_DG curveUV, DG2D endFirst, DG2D endLast)
void GetRange(double outMinParam, double outMaxParam)
Returns parameter range of all attached curves
bool SetRange(double minParam, double maxParam)
Redefines parameter range of all attached curves. Raises an exception (returns TYPE_E_INVALIDSTATE in C++) if this edge
has no 3D curve attached.
This method should only be used for standalone edges as it makes the parent shape invalid in most cases.
Point_DG GetPoint(double u)
Returns point on the edge. u must be within the limits returned by GetRange(). A shortcut for GetCurve() > GetPoint(u);. Raises an exception if this edge has
no 3D curve attached.
Point_DG GetPointRatio(double ratio)
Returns point on the edge. ratio must be in [0,1] range. A shortcut for GetRange(outMinParam, outMaxParam); GetPoint(outMinParam+ratio*(outMaxParam-outMinParam));. Raises an exception if this edge has
no 3D curve attached.
int FindEnd(IBRepVertex_DG vertex)
Returns 0, 1 for the first and second ends. Returns -1 if the vertex is not an end of this edge
IBRepVertex_DG GetOtherEnd(IBRepVertex_DG vertex)
A shortcut for int idx = FindEnd(vertex); return GetEndVertex(1-idx);. Returns null if the vertex is not an end of this edge.
This method is useful for browsing BRep shells.
IBRepFace_DG GetFace(int side)
Returns reference to the face on the left (0) or on the right (1) when this edge is part of a completed shell. May return null on early stage.
IBRepFace_DG GetOtherFace(IBRepFace_DG face)
A shortcut for int idx = FindFace(face); return GetFace(1-idx);. Returns null if this is not an edge of the face.
This method is useful for browsing BRep shells.
int FindFace(IBRepFace_DG face)
Returns 0 for the face on the left and 1 for the face on the right. Returns -1 if this is not an edge of the face
int FindSurface(IUVSurface_DG surface)
|