DGKC Control Documentation


Skip Navigation Links.
Skip Navigation LinksHome Page > API Reference > Model > Entities > Geometry > BSpline BRep Geometry > IBRepFace_DG Go to ActiveX docs Search Documentation


IBRepFace_DG Interface

Represents a BRep face

Implements also: IBRepShape_DG, IObject_DG.

A standalone face can be created via IObjectGenerator_DG.Create("IBRepFace_DG") > IBRepFace_DG query.

Properties

IUVSurface_DG Surface

Methods

IsSurfaceReversed
SwapExternalSide
GetWireCount
GetWire
AddWire
AddWire
AddNewWire
RemoveWire
GetWires
GetEdges
GetVertices
IsTrimmed
GetParameterRange
GetRanges
GetPoint
GetNormal
GetRatiosAt
GetParametersAtRatios
GetPointAtRatios
GetNormalAtRatios
GetVertexUV
GetEdgeUV
FindWire
FindEdge
FindVertex

bool IsSurfaceReversed()

Returns true if orientation of surface of this face (as returned by GetSurface()) is opposite to orientation of this. For closed shapes it means in most cases that normal defined by the surface is internal (which is opposite to the conventional outward direction of a face normal).


void SwapExternalSide()

Changes orientation of the face. As the result, IsSurfaceReversed() will be changed to the opposite.


int GetWireCount()


IBRepWire_DG GetWire(int index)

Returns a wire. The first wire (index 0) is external wire in Counter Clock Wise direction on positive side of the face. The rest of wires represent holes and have Clock Wise direction.


void AddWire(IBRepWire_DG wire)


IBRepWire_DG AddWire(I2DPointArray_DG uvLoop)

Creates and returns a new wire on this face, which connects the points.


IBRepWire_DG AddNewWire()

Creates an empty new wire on this face.


void RemoveWire(IBRepWire_DG wire)


IShapeArray_DG GetWires()


IShapeArray_DG GetEdges()


IShapeArray_DG GetVertices()


bool IsTrimmed()

Returns true if the face has at least one non-empty wire.


void GetParameterRange(bool u, double min, double max)

Returns the first or the second range of the rectangle retuned by the GetRanges() below.


RectangleDg GetRanges()

Returns uv parameter ranges as a rectangle. If the face is trimmed (has wires), it is the bounding rectangle of P-curves of all edges. Otherwise it is the parameter range of the surface (natural bounds).


PointDg GetPoint(T2DDg uv)

Returns point of the surface at the parameters. A shortcut for GetSurface() > GetPoint().


VectDg GetNormal(T2DDg uv)

Returns normal to the face at the parameters. The returned vector coinsides with the return of GetSurface() > GetNormal() when IsSurfaceReversed() is false, and its opposite (obtained by multipying by -1.0 scalar) if IsSurfaceReversed() is true.


T2DDg GetRatiosAt(T2DDg uv)

Converts parameters to ratios by mapping [min,max] parameter range to [0,1]. For a parameter value u its ratio is u/(max - min), where min and max are returned by a GetParameterRange(true, min, max) call.


T2DDg GetParametersAtRatios(T2DDg ratios)

Converts ratios to parameters by mapping [0,1] range to [min,max] parameter range. For a ratio value r its parameter is min + r*(max - min), where min and max are returned by a GetParameterRange(true, min, max) call.


PointDg GetPointAtRatios(T2DDg ratios)

Returns point of the surface at the ratios. (0, 0) is the point at (munU, minV). (0.5, 0.05) is the point in the middle of the face.


VectDg GetNormalAtRatios(T2DDg ratios)

Returns normal to the face at the ratios. (0, 0) is the point at (munU, minV). (0.5, 0.05) is the point in the middle of the face. A shortcut for GetParametersAtRatios() > GetNormal().


T2DDg GetVertexUV(IBRepVertex_DG vertex)

Returns parameters on the face which define position of the vertex inside this face.


T2DDg GetEdgeUV(IBRepEdge_DG edge, double ratioAlongEdge)

For a point on an edge (ratioAlongEdge=0 - is the first end, ratioAlongEdge=0.5 is the middle), returns parameters on the face which define position of the point inside this face.


int FindWire(IBRepWire_DG wire)

Returns index of the wire, or -1 if not found.


int FindEdge(IBRepEdge_DG edge, out int idxEdgeInWire)

Returns index of the wire containing the edge or -1 if edge does not belong to this face. idxEdgeInWire will be set to the index of edge in the wire or to -1.


int FindVertex(IBRepVertex_DG vertex, out int idxVertexInWire)

Returns index of the wire containing the vertex or -1 if vertex does not belong to this face. idxVertexInWire will be set to the index of vertex in the wire or to -1.