DGKC Control Documentation


Skip Navigation Links.
Skip Navigation LinksHome Page > API Reference > General Geometry > Surfaces > IUVSurface_DG Go to ActiveX docs Search Documentation


IUVSurface_DG Interface

GetSurfaceType
GetParameterRange
GetRanges
IsClosed
IsPeriodic
GetPeriod
GetIsometricCurve
GetPoint
GetNormal
GetTangent
GetJet1
GetJetN
GetTangent
GetPointUV
GetNearestPoints
GetCurveUV
GetCurveUV1
GetSurfaceIntersection
GetCurveIntersection
GetCurveProjection
GetCurveUVProjection
GetRatiosAt
GetParametersAtRatios
GetPointLocation
GetCurveLocation
GetSurfaceLocation
GetUVAlignedFrame

IUVSurface_DG represents a surface in 3D with two dimentional (u,v) parameter

Indices are 0-based

IUVSurface_DG can be obtained using IBRepFace_DG.GetSurface() or methods of IBReIBRepBuilder_DG. This interface represents generic (abstract) functionality so it can not be constracted new using methods of IObjectGenerator_DG. It has to be constructed as a specific type. See the GetSurfaceType() method below.

Implements also: IGeometricObject_DG.


ESurfaceType_DG GetSurfaceType()

IUVSurface_DG represents generic (base) attributes of a surface. This method identifies the actual type of the surface. Query the specific interface from this IUVSurface_DG as described in the following tabe to access the actual type of this surface.

Surface Type Interface to query
eSurfTypeBSpline IBSplineSurface_DG
eSurfTypeBezier IBezierSurface_DG
eSurfTypePlane IPlane_DG
eSurfTypeCone ICone_DG
eSurfTypeSphere ISphere_DG
eSurfTypeTorus ITorus_DG
eSurfTypeSurfaceOfRevolution ISurfaceOfRevolution_DG

The surface types here are enumerated by ESurfaceType_DG


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


RectangleDg GetRanges()

Returns uv parameter ranges as a rectangle.


bool IsClosed(bool u)


bool IsPeriodic(bool u)


double GetPeriod(bool u)


ICurve_DG GetIsometricCurve(bool u, double parameterAt)

If u is true, returns v-parametrised curve at u = parameterAt.


PointDg GetPoint(T2DDg uv)


VectDg GetNormal(T2DDg uv)


VectDg GetTangent(T2DDg uv, bool inUDirection)


void GetJet1(T2DDg uv, out PointDg point, out VectDg d1u, out VectDg d1v)

Returns point and derivatives at the uv parameters.


void GetJet2(T2DDg uv, out PointDg point, out VectDg d1u, out VectDg d1v, out VectDg d2u, out VectDg d2v, out VectDg d2uv)

Returns point and derivatives at the uv parameters.


VectDg GetJetN(T2DDg uv, int Nu, int Nv)

Returns point and derivatives of the specified order at the uv parameters.


T2DDg GetPointUV(PointDg point)


I2DPointArray_DG GetNearestPoints(PointDg point)

Returns uv paameters for the nearest points. The array often contains a single point.


ICurve2d_DG GetCurveUV(ICurve_DG curve)


ICurve2d_DG GetCurveUV1(ICurve_DG curve, double parameterFrom, double parameterTo)


ICurveArray_DG GetSurfaceIntersection(IUVSurface_DG surface)

The surfaces are assumed to be defined in the same frame. In case when it is not true, like the surfaces belong to different entities, one or both have to be transformed using methods of IGeometricObject_DG.


void GetCurveIntersection(ICurve_DG curve, out IPointArray_DG points, out IPointArray_DG params, out ICurveArray_DG segments, out I2DPointArray_DG segmentParams)

Intersection of curve and this surface.
points contains distinct intersection points.
params is synchronised with points and contains correspondent triples (u,v,w), where u,v are parameters of the point on this surface and w is parameter of the intersection point on the curve.
segments contains continuous pieces of non-zero length of curve, which are fully inside of this surface.
segmentParams has double size of segments. It consists of pairs of (u,v) points. For a curve from segments the correspondent pair of (u,v) points in segmentParams are the u,v parameters of its first and last ends.


ICurve_DG GetCurveProjection(ICurve_DG curve)


ICurve2d_DG GetCurveUVProjection(ICurve_DG curve)


T2DDg GetRatiosAt(T2DDg uv)

Returns result of linear mapping of the min,max range as defined by the GetParameterRange() to [0,1] for each parameter. Ratios of (0.5, 0.5) correspond to the central point of the surface
Be aware that in case of infinite values returned by GetParameterRange() the mapping is not reliable.


T2DDg GetParametersAtRatios(T2DDg ratios)

The inverse mapping to one defined in GetRatiosAt()


PointVsSurfaceLocation_DG GetPointLocation(PointDg point)

Classifies location of a point relative to this surface.


CurveVsSurfaceLocation_DG GetCurveLocation(ICurve_DG curve, double tolerance, int algorithm)

Classifies location of a curve relative to this surface.

The algorithm parameter is used only in the case when there is no intersection (no any common points) and the surface is not closed. In the case if algorithm is negative, checks of the side are skipped for performance and CurveVsSurfaceLocation_DG.eCurveVsSurfaceLocationDgUnknownOutside is returned. If algorithm is zero or positive, the location is determined by sampling the curve at m = max(algorithm, 3) points and applying the above GetPointLocation() method. This behaviour may change in the future versions.


SurfaceVsSurfaceLocation_DG GetSurfaceLocation(IUVSurface_DG surface, double tolerance, int algorithm)

Classifies location of a surface relative to this surface.

The algorithm parameter is used only in the case when there is no intersection (no any common points) and neither surface is closed. In the case if algorithm is negative, checks of the side are skipped for performance and SurfaceVsSurfaceLocation_DG.eSurfaceVsSurfaceLocationDgUnknownOutside is returned. If algorithm is zero or positive, the location is determined by sampling the curve at m = max(algorithm, 3) points and applying the above GetPointLocation() method. This behaviour may change in the future versions.


IFrame_DG GetUVAlignedFrame(T2DDg uv)

Constructs a frame with origin at the surface point defined by the uv parameters with the X axis directed in u direction along the iso curve v=const=uv[1] and Y axis directed in v direction along the iso curve u=const=uv[0]. The Z axis will coinside with the normal to the surface.