DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Expand ModelsModels
Expand DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Expand General GeometryGeneral Geometry
Collapse ModelModel
Expand ViewView
Expand General ComputingGeneral Computing
Expand ViewsViews
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > API Reference > Model > Entities > Geometry > BSpline BRep Geometry > IBRepFace_DG Go to DGKC docs Search Documentation


IBRepFace_DG Interface

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

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.


IUVSurface_DG GetSurface()


void SetSurface(IUVSurface_DG surface)


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 AddWire1(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, [out] double min, [out] double max)

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


Rectangle_DG 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).


Point_DG GetPoint(DG2D uv)

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


Vect_DG GetNormal(DG2D 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.


DG2D GetRatiosAt(DG2D 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.


DG2D GetParametersAtRatios(DG2D 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.


Point_DG GetPointAtRatios(DG2D 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.


Vect_DG GetNormalAtRatios(DG2D 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().


DG2D GetVertexUV(IBRepVertex_DG vertex)

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


DG2D 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.