C3D Toolkit
Kernel - 117944, Vision - 2.7.3.11
|
The surface bounded by curves. More...
#include <surf_curve_bounded_surface.h>
Public Member Functions | |
MbCurveBoundedSurface (const MbSurface &initSurface) | |
Constructor without setting the u, v limits. | |
MbCurveBoundedSurface (const MbSurface &initSurface, double uin, double uax, double vin, double vax) | |
Constructor with setting the u, v limits. | |
MbCurveBoundedSurface (const MbSurface &initSurface, const MbRect &rect) | |
Constructor with setting the u, v limits. | |
MbCurveBoundedSurface (const MbSurface &initSurface, const MbRect2D &rect) | |
Constructor with setting the u, v limits. | |
MbCurveBoundedSurface (MbSurface &initSurface, RPArray< MbContourOnSurface > &initCurves, bool sameContours) | |
Constructor with array of contours on surface. | |
MbCurveBoundedSurface (MbSurface &initSurface, RPArray< MbContour > &initCurves, bool sameContours) | |
Constructor with array of contours on plane (two-dimensional contours). | |
MbCurveBoundedSurface (MbSurface &initSurface, c3d::PlaneContoursSPtrVector &initCurves, bool sameContours) | |
Constructor with array of contours on plane (two-dimensional contours). | |
MbCurveBoundedSurface (MbSurface &initSurface, RPArray< MbContour > &initCurves, MbCube &gab) | |
Constructor for surface with bounding box at face reading. | |
MbCurveBoundedSurface (MbSurface &initSurface, c3d::PlaneContoursSPtrVector &initCurves, MbCube &gab) | |
Constructor for surface with bounding box at face reading. | |
MbCurveBoundedSurface (MbContourOnSurface &init1, MbContourOnSurface *init2=nullptr) | |
Constructor by contours, uses the surface of first contour as base surface. | |
MbCurveBoundedSurface (const MbCurveBoundedSurface &init, MbSurface &newBaseSurface, bool calculateGabarit=true) | |
Copy-constructor for new base surface. | |
Common functions of a geometric object | |
MbeSpaceType | IsA () const override |
Get the type of the object. | |
MbSpaceItem & | Duplicate (MbRegDuplicate *=nullptr) const override |
Create a copy of the object. More... | |
bool | IsSame (const MbSpaceItem &other, double accuracy=LENGTH_EPSILON) const override |
Determine whether an object is equal. More... | |
bool | SetEqual (const MbSpaceItem &) override |
Make objects equal if they are similar. More... | |
bool | IsSimilar (const MbSpaceItem &) const override |
Determine whether an object is similar. More... | |
void | Transform (const MbMatrix3D &, MbRegTransform *=nullptr) override |
Convert the object according to the matrix. More... | |
void | Move (const MbVector3D &, MbRegTransform *=nullptr) override |
Move an object along a vector. More... | |
void | Rotate (const MbAxis3D &, double angle, MbRegTransform *=nullptr) override |
Rotate an object around an axis at a given angle. More... | |
double | DistanceToPoint (const MbCartPoint3D &) const override |
Determine the distance to the point. More... | |
void | Refresh () override |
Translate all the time (mutable) data objects in an inconsistent (initial) state. | |
void | CalculateMesh (const MbStepData &stepData, const MbFormNote ¬e, MbMesh &mesh) const override |
Build polygonal copy mesh. More... | |
void | GetProperties (MbProperties &) override |
Outstanding properties of the object. More... | |
void | SetProperties (const MbProperties &) override |
Change the properties of an object. More... | |
void | GetBasisItems (RPArray< MbSpaceItem > &) override |
Outstanding reference objects in a container sent. | |
void | GetBasisPoints (MbControlData3D &) const override |
Get control points of object. | |
void | SetBasisPoints (const MbControlData3D &) override |
Change the object by control points. | |
Functions for surface domain description | |
double | GetUMin () const override |
Get the minimum value of u. | |
double | GetVMin () const override |
Get the minimum value of v. | |
double | GetUMax () const override |
Get the maximum value of u. | |
double | GetVMax () const override |
Get the maximum value of v. | |
bool | IsUClosed () const override |
Determine whether a surface is closed in u-parameter direction. More... | |
bool | IsVClosed () const override |
Determine whether a surface is closed in v-parameter direction. More... | |
bool | IsUTouch () const override |
Determine whether a surface is closed in u-parameter direction regardless of the smoothness of the closure. More... | |
bool | IsVTouch () const override |
Determine whether a surface is closed in v-parameter direction regardless of the smoothness of the closure. More... | |
bool | IsUPeriodic () const override |
Determine whether a surface is closed in u-parameter direction. More... | |
bool | IsVPeriodic () const override |
Determine whether a surface is closed in v-parameter direction. More... | |
double | GetUPeriod () const override |
Return period for smoothly closed surface or 0. | |
double | GetVPeriod () const override |
Return period for smoothly closed surface or 0. | |
bool | GetPoleUMin () const override |
Whether a pole exists on parametric region boundary. | |
bool | GetPoleUMax () const override |
Whether a pole exists on parametric region boundary. | |
bool | GetPoleVMin () const override |
Whether a pole exists on parametric region boundary. | |
bool | GetPoleVMax () const override |
Whether a pole exists on parametric region boundary. | |
bool | IsPole (double u, double v, double paramPrecision=PARAM_PRECISION) const override |
Whether the point is a pole. | |
Functions for working at surface domain | |
Functions PointOn, Derive... of surfaces correct parameters when they are out of bounds of rectangular domain of parameters. | |
void | PointOn (double &u, double &v, MbCartPoint3D &) const override |
Calculate a point on the surface. More... | |
void | DeriveU (double &u, double &v, MbVector3D &) const override |
Calculate first derivative with respect to u. | |
void | DeriveV (double &u, double &v, MbVector3D &) const override |
Calculate first derivative with respect to v. | |
void | DeriveUU (double &u, double &v, MbVector3D &) const override |
Calculate second derivative with respect to u. | |
void | DeriveVV (double &u, double &v, MbVector3D &) const override |
Calculate second derivative with respect to v. | |
void | DeriveUV (double &u, double &v, MbVector3D &) const override |
Calculate second derivative. | |
void | DeriveUUU (double &u, double &v, MbVector3D &) const override |
Calculate third derivative. | |
void | DeriveUUV (double &u, double &v, MbVector3D &) const override |
Calculate third derivative. | |
void | DeriveUVV (double &u, double &v, MbVector3D &) const override |
Calculate third derivative. | |
void | DeriveVVV (double &u, double &v, MbVector3D &) const override |
Calculate third derivative. | |
void | TangentU (double &u, double &v, MbVector3D &) const override |
Calculate tangent vector in u. | |
void | TangentV (double &u, double &v, MbVector3D &) const override |
Calculate tangent vector in v. | |
void | Normal (double &u, double &v, MbVector3D &) const override |
Calculate normal. | |
void | NormalU (double &u, double &v, MbVector3D &) const override |
Calculate derivative of normal with respect to U. | |
void | NormalV (double &u, double &v, MbVector3D &) const override |
Calculate derivative of normal with respect to V. | |
Functions for working inside and outside the surface's domain | |
functions _PointOn, _Derive... of surfaces don't correct parameters when they are out of bounds of rectangular domain of parameters | |
void | _PointOn (double u, double v, MbCartPoint3D &) const override |
Calculate a point on the surface. More... | |
void | _DeriveU (double u, double v, MbVector3D &) const override |
Calculate first derivative with respect to u on extended surface. | |
void | _DeriveV (double u, double v, MbVector3D &) const override |
Calculate first derivative with respect to v on extended surface. | |
void | _DeriveUU (double u, double v, MbVector3D &) const override |
Calculate second derivative with respect to u on extended surface. | |
void | _DeriveVV (double u, double v, MbVector3D &) const override |
Calculate second derivative with respect to v on extended surface. | |
void | _DeriveUV (double u, double v, MbVector3D &) const override |
Calculate second derivative on extended surface. | |
void | _DeriveUUU (double u, double v, MbVector3D &) const override |
Calculate third derivative on extended surface. | |
void | _DeriveUUV (double u, double v, MbVector3D &) const override |
Calculate third derivative on extended surface. | |
void | _DeriveUVV (double u, double v, MbVector3D &) const override |
Calculate third derivative on extended surface. | |
void | _DeriveVVV (double u, double v, MbVector3D &) const override |
Calculate third derivative on extended surface. | |
void | _Normal (double u, double v, MbVector3D &) const override |
Calculate a normal on extended surface. | |
void | _NormalU (double u, double v, MbVector3D &) const override |
Calculate derivative of normal vector on extended surface. | |
void | _NormalV (double u, double v, MbVector3D &) const override |
Calculate derivative of normal vector on extended surface. | |
void | _NormalUU (double u, double v, MbVector3D &) const override |
Calculate second derivative of normal vector on extended surface. | |
void | _NormalUV (double u, double v, MbVector3D &) const override |
Calculate second derivative of normal vector on extended surface. | |
void | _NormalVV (double u, double v, MbVector3D &) const override |
Calculate second derivative of normal vector on extended surface. | |
Functions for get of the group of data inside and outside the surface's domain of parameters. | |
void | Explore (double &u, double &v, bool ext, MbCartPoint3D &pnt, MbVector3D &uDer, MbVector3D &vDer, MbVector3D *uuDer, MbVector3D *vvDer, MbVector3D *uvDer, MbVector3D *nor) const override |
Calculate point and derivatives of object for given parameters. More... | |
void | _PointNormal (double u, double v, MbCartPoint3D &pnt, MbVector3D &deru, MbVector3D &derv, MbVector3D &norm, MbVector3D &noru, MbVector3D &norv, MbVector3D &deruu, MbVector3D &dervv, MbVector3D &deruv) const override |
Calculate all derivatives at point. More... | |
Functions of moving along the surface | |
double | StepU (double u, double v, double sag) const override |
Calculate parameter step. More... | |
double | StepV (double u, double v, double sag) const override |
Calculate parameter step. More... | |
double | DeviationStepU (double u, double v, double angle) const override |
Calculate parameter step. More... | |
double | DeviationStepV (double u, double v, double angle) const override |
Calculate parameter step. More... | |
double | MetricStepU (double u, double v, double length) const override |
Calculate parameter step. More... | |
double | MetricStepV (double u, double v, double length) const override |
Calculate parameter step. More... | |
size_t | GetUCount () const override |
The number of splittings by u-parameter for a check of events. | |
size_t | GetVCount () const override |
The number of splittings by v-parameter for a check of events. | |
Common functions of surface | |
const MbSurface & | GetSurface () const override |
Get itself (it is overloaded only in CurveBoundedSurface). | |
const MbSurface & | GetBasisSurface () const override |
Get the base surface if exists or itself. | |
MbSurface & | SetSurface () override |
Get itself (it is overloaded only in CurveBoundedSurface). | |
MbSurface & | SetBasisSurface () override |
Get the base surface if exists or itself. | |
void | GetLimitPoint (ptrdiff_t num, MbCartPoint3D &) const override |
Calculate the boundary point. More... | |
void | GetLimitPoint (ptrdiff_t num, MbCartPoint &) const override |
Calculate the boundary two-dimensional point. More... | |
double | CurvatureU (double u, double v) const override |
Calculate line curvature along the direction of u. More... | |
double | CurvatureV (double u, double v) const override |
Calculate line curvature along the direction of v. More... | |
bool | IsSameBase (const MbSurface &) const override |
Whether a base surface is a copy of the base surface of the given object. | |
bool | IsPlanar (double accuracy=METRIC_EPSILON) const override |
Whether a surface is planar. | |
double | GetRadius () const override |
Get the physical radius of the object or null if it impossible. More... | |
double | GetFilletRadius (const MbCartPoint3D &) const override |
Get fillet radius if the surface is a fillet surface. | |
MbeParamDir | GetFilletDirection () const override |
Direction of fillet surface. | |
bool | GetCylinderAxis (MbAxis3D &) const override |
Get rotation axis of a surface. | |
bool | GetCenterLines (std::vector< MbCurve3D * > &clCurves) const override |
Get center lines of a surface. | |
void | ChangeCarrier (const MbSpaceItem &item, MbSpaceItem &init) override |
Changing of carrier. More... | |
bool | ChangeCarrierBorne (const MbSurface &item, MbSurface &init, const MbMatrix &matr) override |
Changing of carrier elements. More... | |
MbSplineSurface * | NurbsSurface (double u1, double u2, double v1, double v2, bool bmatch=false) const override |
Construct a NURBS copy of trimmed surface. More... | |
MbSurface * | NurbsSurface (const MbNurbsParameters &uParam, const MbNurbsParameters &vParam) const override |
Construct a NURBS copy of a surface. More... | |
MbSurface * | Offset (double d, bool same) const override |
Create an offset surface. More... | |
MbCurve3D * | CurveU (double v, MbRect1D *pRgn, bool bApprox=true) const override |
Construct spatial copy of the line v = const. More... | |
MbCurve3D * | CurveV (double u, MbRect1D *pRgn, bool bApprox=true) const override |
Construct spatial copy of the line u = const. More... | |
MbCurve3D * | CurveUV (const MbLineSegment &, bool bApprox=true) const override |
Construct spatial copy of line by parametric line. More... | |
MbeItemLocation | PointClassification (const MbCartPoint &, bool ignoreClosed=false) const override |
A point is located inside the region on a surface. More... | |
double | DistanceToBorder (const MbCartPoint &, double &eps) const override |
Calculate the parametric distance to the nearest boundary. More... | |
size_t | CurveClassification (const MbCurve &curve, SArray< double > &tcurv, SArray< MbVector > &dir) const override |
Determine points of intersections between the curve and the surface contours. More... | |
size_t | SegmentIntersection (const MbCurve &pCurve, SArray< double > &curveParams, double epsilon=Math::metricEpsilon) const |
Determine points of intersection with two-dimensional uv-curve. More... | |
bool | NearPointProjection (const MbCartPoint3D &p, double &u, double &v, bool ext, MbRect2D *uvRange=nullptr) const override |
Find the projection of a point onto the surface. More... | |
void | DirectPointProjection (const MbCartPoint3D &p, const MbVector3D &vect, SArray< MbCartPoint > &uv, bool ext, MbRect2D *uvRange=nullptr) const override |
Find all a point projection onto the surface along a vector in either of two directions. More... | |
void | CurveIntersection (const MbCurve3D &curv, SArray< MbCartPoint > &uv, SArray< double > &tt, bool ext0, bool ext, bool touchInclude=false) const override |
Determine points of intersection between a surface and a curve. More... | |
MbeNewtonResult | SilhouetteNewton (const MbVector3D &eye, bool perspective, const MbAxis3D *axis, MbeParamDir switchPar, double funcEpsilon, size_t iterLimit, double &u, double &v, bool ext) const override |
Solution of equation system for determination of surface silhouette points. For internal use only. | |
bool | IsSimilarToSurface (const MbSurface &surf, VERSION version, double precision=METRIC_PRECISION) const override |
Define whether the surfaces are similar for merge. More... | |
bool | IsSpecialSimilarToSurface (const MbSurface &surf, VERSION version, double precision=METRIC_PRECISION) const override |
Whether the surfaces are similar to merge. Special case. For internal use only. | |
bool | ProjectCurveOnSimilarSurface (const MbCurve3D &spaceCurve, const MbCurve &curve, const MbSurface &surfNew, MbCurve *&curveNew) const override |
Construction of projection of a surface curve on coincident surface. More... | |
bool | GetMatrixToSurface (const MbSurface &surf, MbMatrix &matr, VERSION version, double precision=METRIC_PRECISION) const override |
Get two-dimensional matrix of transformation from its parametric region to the parametric region of 'surf'. More... | |
ThreeStates | Salient () const override |
Determine whether the surface is convex. | |
bool | CreateNormalPlacements (const MbVector3D &axisZ, double angle, SArray< MbPlacement3D > &places, VERSION version=Math::DefaultMathVersion()) const override |
Construct normal placements of constructive planes. | |
bool | CreateTangentPlacements (const MbVector3D &axisZ, SArray< MbPlacement3D > &places) const override |
Construct tangent placements of constructive planes. | |
void | GetTesselation (const MbStepData &stepData, double u1, double u2, double v1, double v2, SArray< double > &uu, SArray< double > &vv) const override |
Determine a splitting of parametric region of a surface by verticals and horizontals. More... | |
double | ParamArea () const override |
Calculate the area of parameters domain. | |
size_t | GetUPairs (double v, SArray< double > &u) const override |
Calculate U-pairs by V. More... | |
size_t | GetVPairs (double u, SArray< double > &v) const override |
Calculate V-pairs by U. More... | |
void | CalculateGabarit (MbCube &) const override |
Calculate bounding box of surface. It is recommended to use GetGabarit. | |
void | CalculateLocalGabarit (const MbMatrix3D &, MbCube &) const override |
To compute bounding box in a local coordinate system. More... | |
void | SetLimit (double u1, double v1, double u2, double v2) override |
Set surface limits. For internal use only. | |
void | IncludePoint (double u, double v) override |
Include a point into domain. For internal use only. | |
double | GetParamDelta () const override |
Get the maximum increment of parameter. | |
double | GetParamPrice () const override |
Get the minimum distinguishable value of parameter. | |
double | GetUParamToUnit () const override |
Get increment of u-parameter, corresponding to the unit length in space. | |
double | GetVParamToUnit () const override |
Get increment of v-parameter, corresponding to the unit length in space. | |
double | GetUParamToUnit (double u, double v) const override |
Get increment of u-parameter, corresponding to the unit length in space. | |
double | GetVParamToUnit (double u, double v) const override |
Get increment of v-parameter, corresponding to the unit length in space. | |
void | GetParamsToUnit (double u, double v, double &uParam, double &vParam) const override |
Get increment of parameters, corresponding to the unit length in space. | |
void | CalculateSurfaceWire (const MbStepData &stepData, size_t beg, MbMesh &mesh, size_t uMeshCount=c3d::WIRE_MAX, size_t vMeshCount=c3d::WIRE_MAX) const override |
Calculate mesh. More... | |
size_t | GetUMeshCount () const override |
The the number of splittings in u-direction. | |
size_t | GetVMeshCount () const override |
The the number of splittings in v-direction. | |
bool | IsLineU () const override |
Check that all derivatives of surface with respect to u which have more than first order are equal to null. | |
bool | IsLineV () const override |
Check that all derivatives of surface with respect to v which have more than first order are equal to null. | |
MbContour & | MakeContour (bool sense) const override |
Return the bounding two-dimensional contour. More... | |
MbCurve & | MakeSegment (size_t i, bool sense) const override |
Return a segment of the bounding two-dimensional contour. More... | |
void | CalculateSurfaceGrid (const MbStepData &stepData, bool sense, MbGrid &grid) const override |
Approximation of a surface by triangular plates. | |
Functions of MbCurveBoundSurface surface | |
MbCurve & | MakeSegment (size_t number, size_t i, bool sense) const |
Get the two-dimensional boundary curve. More... | |
const MbCurve * | GetSegment (size_t number, size_t i) const |
Get the two-dimensional boundary curve. More... | |
MbCurve * | SetSegment (size_t number, size_t i) |
Get the two-dimensional boundary curve. More... | |
size_t | GetCurvesCount () const |
Get the count of contours. | |
size_t | GetSegmentsCount (size_t i) const |
Get the count of segments of i-th contour. | |
void | AddOuterContour () |
Add a contour. More... | |
void | DeleteContour (MbContourOnSurface *cntr) |
Remove contour. More... | |
bool | ChangeContour (size_t index, MbContourOnSurface *cntr) |
Replace contour. More... | |
bool | ChangeSurface (const MbSurface &newsurf) |
Replace base surface. | |
void | NewBasisSurface () |
Replace base surface with its copy. | |
void | CalculateUVLimitsOnly () |
Calculate parametric bounds of surface without resetting the bounding box. | |
void | CalculateUVLimits () |
Calculate parametric bounds of surface with recalculation of the bounding box. | |
void | SetBasisSurfaceUVLimits () |
Extend parametric bounds of base surface. More... | |
void | CheckParam (double &u, double &v) const |
Check, whether the parameters are in parametric bounds of surface. More... | |
double | NormalizeCurvesOrientation () |
Orient bounding contours. More... | |
void | DeleteCurves () |
Remove all the contours. | |
void | AddCurve (MbContourOnSurface &contour) |
Add a contour. More... | |
void | AddCurve (MbContour &contour) |
Add a contour. More... | |
void | AddContour (MbContour &contour) |
Add a contour. More... | |
const MbContourOnSurface * | GetCurve (size_t ind) const |
Get contour bounding surface by its index. More... | |
const MbContourOnSurface * | _GetCurve (size_t ind) const |
Get contour bounding surface by its index. More... | |
MbContourOnSurface * | SetCurve (size_t ind) |
Get contour bounding surface by its index. More... | |
MbContourOnSurface * | _SetCurve (size_t ind) |
Get contour bounding surface by its index. More... | |
void | ReplaceOuterCurveBy (size_t ind) |
Move a curve with the 'ind' index to a zero position of the array. | |
bool | ChangeCurve2D (MbCurve &oldCrv, MbCurve *newCrv) |
Find two-dimensional curve and replace it with another one. | |
void | MergeSegments (double eps=Math::LengthEps) |
Merge two-dimensional segments in contours. | |
MbCurveBoundedSurface & | CurvesDuplicate () const |
Copy of object with old base surface. | |
bool | CheckTouchByContour (bool byU) const |
Check closeness by u or v using outer contour. | |
![]() | |
virtual | ~MbSurface () |
Destructor. | |
virtual void | Accept (Visitor &visitor) |
Implementation of a function initializing a visit of an object. | |
MbeSpaceType | Type () const override |
Get the group object type. | |
MbeSpaceType | Family () const override |
Get family of objects. | |
double | DistanceToPoint (const MbCartPoint3D &) const override |
Determine the distance to the point. More... | |
void | AddYourGabaritTo (MbCube &c) const override |
Expand sent bounding box (a.k.a. gabarit), so that it included the object. More... | |
void | Refresh () override |
Translate all the time (mutable) data objects in an inconsistent (initial) state. | |
virtual void | PrepareIntegralData (const bool forced) const |
Calculate temporary (mutable) data of an object. More... | |
void | CalculateMesh (const MbStepData &stepData, const MbFormNote ¬e, MbMesh &mesh) const override |
Build polygonal copy mesh. More... | |
MbProperty & | CreateProperty (MbePrompt name) const override |
Create your own property with the name. | |
void | GetBasisPoints (MbControlData3D &) const override |
Get control points of object. | |
void | SetBasisPoints (const MbControlData3D &) override |
Change the object by control points. | |
size_t | size () const |
Number of objects if object is interpreted as vector of objects. | |
const MbSurface * | operator[] (size_t) const |
An access operator. | |
virtual double | GetPeriod (ptrdiff_t i) const |
Return period. More... | |
virtual size_t | Periodicity () const |
Determine periodicity. More... | |
bool | IsPole (const MbCartPoint &uv, double paramPrecision=PARAM_PRECISION) const |
Whether the point is a pole. | |
virtual void | Explore (double &u, double &v, MbCartPoint3D &pnt, MbVector3D &uDer, MbVector3D &vDer) const |
Calculate point and first derivatives with respect to u and with respect to v. More... | |
virtual void | _TangentU (double u, double v, MbVector3D &) const |
Calculate tangent vector in u direction on extended surface. | |
virtual void | _TangentV (double u, double v, MbVector3D &) const |
Calculate tangent vector in v direction on extended surface. | |
virtual void | _NormalD (double u, double v, double du, double dv, MbVector3D &der) const |
Calculate derivative of normal vector at the point with the given parameters u and v along the line with the given direction (du,dv). | |
virtual void | _NormalDD (double u, double v, double du, double dv, MbVector3D &der) const |
Calculate second derivative of normal vector at the point with the given parameters u and v along the line with the given direction (du,dv). | |
double | SurfaceStep (const double &u, const double &v, bool alongU, const MbStepData &stepData) const |
Calculate parameter step. More... | |
MbCartPoint3D | GetLimitPoint (ptrdiff_t number) const |
Calculate the boundary point. More... | |
double | NormalCurvatureU (double u, double v) const |
Calculate a normal curvature of line along the direction of u. More... | |
double | NormalCurvatureV (double u, double v) const |
Calculate a normal curvature of line along the direction of v. More... | |
double | NormalCurvature (double u, double v, double du, double dv) const |
Calculate a normal curvature of surface. More... | |
bool | MeanGaussCurvature (double u, double v, double &mean, double &gauss) const |
Calculate the mean and the Gaussian curvature. More... | |
bool | MainCurvatures (double u, double v, double &c1, double &c2, double &du, double &dv) const |
Calculate the mean and the Gaussian curvature. More... | |
virtual bool | GetCentre (MbCartPoint3D &c) const |
Give the center of sphere surface. | |
virtual bool | IsSpinePeriodic () const |
Periodicity of the guide. More... | |
MbSplineSurface * | NurbsSurface (bool bmatch=false) const |
Construct a NURBS copy of a surface. More... | |
bool | NurbsParam (const MbNurbsParameters &tParam, bool uParam, double op1, double op2, bool &isClosedNurbs, double &epsilon, SArray< double > ¶ms) const |
Prepare parameters for the transformation to NURBS surface. More... | |
void | CheckApproxPointParamsOpen (bool isU, double par, size_t degree, size_t pCount, SArray< double > &tList, SArray< double > &aKnots) const |
Chose points for approximation along the parameter. More... | |
void | CheckApproxPointParamsClosed (bool isU, double par, size_t degree, size_t pCount, SArray< double > &tList, SArray< double > &aKnots) const |
Chose points for approximation along the parameter. More... | |
virtual MbeItemLocation | PointRelative (const MbCartPoint3D &pnt, double eps=ANGLE_REGION) const |
Get point location relative to the surface. More... | |
size_t | SurfaceBorderIntersection (const MbCurve &curve, SArray< double > &tcurv, SArray< MbVector > &dir) const |
Determine points of intersections between the curve and the surface contours. More... | |
virtual MbeNewtonResult | PointProjectionNewton (const MbCartPoint3D &p, size_t iterLimit, double &u, double &v, bool ext) const |
Finding of point projection on surface. For internal use only. | |
virtual MbeNewtonResult | DirectPointProjectionNewton (const MbCartPoint3D &p, const MbVector3D &vect, size_t iterLimit, double &u, double &v, double &w, bool ext) const |
Finding of point projections to the surface in direction of the vector. For internal use only. | |
virtual bool | NearDirectPointProjection (const MbCartPoint3D &pnt, const MbVector3D &vect, double &u, double &v, bool ext, MbRect2D *uvRange=nullptr, bool onlyPositiveDirection=false) const |
Find the nearest point projection to the surface in the vector direction. More... | |
virtual MbeNewtonResult | CurveIntersectNewton (const MbCurve3D &curv1, double funcEpsilon, size_t iterLimit, double &u0, double &v0, double &t1, bool ext0, bool ext1) const |
Solution of equation system for determination of intersections between a surface and a curve. For internal use only. | |
virtual MbeNewtonResult | CurveTangentNewton (const MbCurve3D &curv1, double funcEpsilon, size_t iterLimit, double &u0, double &v0, double &t1, bool ext0, bool ext1) const |
Solution of equation system for determination of tangency between a surface and a curve. For internal use only. | |
virtual MbeNewtonResult | SurfaceIntersectNewton (const MbSurface &surf1, MbeParamDir switchPar, double funcEpsilon, size_t iterLimit, double &u0, double &v0, double &u1, double &v1, bool ext0, bool ext1) const |
Solution of equation system for determination of surfaces intersections. For internal use only. | |
virtual MbeNewtonResult | SurfaceTangentNewton (const MbSurface &surf1, MbeParamDir switchPar, double funcEpsilon, size_t iterLimit, double &u0, double &v0, double &u1, double &v1, bool ext0, bool ext1) const |
Solution of equation system for determination of surfaces tangency. For internal use only. | |
bool | ProjectCurveOnSimilarSurface (const MbCurve3D &spaceCurve, const MbCurve &curve, const MbSurface &surfNew, SPtr< MbCurve > &curveNew) const |
Construction of projection of a surface curve on coincident surface. More... | |
virtual double | DistanceToCurve (const MbCurve3D &curve, double &u, double &v, double &t, bool tCalc=false) const |
Calculate the nearest distance to a curve. More... | |
virtual double | DistanceToSurface (const MbSurface &surf1, double &u0, double &v0, double &u1, double &v1) const |
Calculate the nearest distance to a surface. More... | |
MbeNewtonResult | PlacementNewton (const MbVector3D &vec, double angle, MbeParamDir switchPar, size_t iterLimit, double &u, double &v) const |
Construct tangent placements of constructive planes. For internal use only. | |
bool | CreateVconstPlacements (const MbVector3D &axisZ, double angle, bool normalPlace, SArray< MbPlacement3D > &places) const |
Construct the normal or tangent placements on v-lines. | |
bool | CreateUconstPlacements (const MbVector3D &axisZ, double angle, bool normalPlace, SArray< MbPlacement3D > &places) const |
Construct the normal or tangent placements on u-lines. | |
MbeNewtonResult | IsoclinalNewton (const MbVector3D &dir, size_t iterLimit, double &u, double &v) const |
Determination of parameters of a surface isocline point. For internal use only. | |
virtual void | GetIsoclinal (const MbVector3D &nor, SArray< MbCartPoint > &uv) const |
Find all isoclines of a surface. More... | |
void | CalculateLocalGabarit (const MbMatrix3D &into, MbCube &cube) const override |
Calculate bounding box in the local coordinate system. | |
const MbCube & | GetGabarit () const |
Calculate bounding box of surface. | |
const MbCube & | Cube () const |
Return saved bounding box. It should be empty. It is recommended to use GetGabarit. | |
void | SetDirtyGabarit () const |
Make the bounding box empty. For internal use only. | |
void | CopyGabarit (const MbSurface &s, const MbVector3D *to=nullptr) |
Copy the bounding box from the copy. More... | |
double | GetGabDiagonal () const |
Calculate the diagonal of the bounding box. | |
void | CalculateRect (const MbPlacement3D &place, MbRect &rect) const |
Calculate the rectangular bounding box of a surface in the given plane. More... | |
MbCurve & | MakeCurve (size_t number1, size_t number2) const |
Return a segment of the bounding two-dimensional contour. More... | |
void | SetLimit (const MbRect &) |
Set surface limits. For internal use only. | |
virtual void | SetExtendedParamRegion (double u1, double v1, double u2, double v2) |
Set extended limits of surface. For internal use only. | |
double | GetMaxParamDeltaU () const |
Get the maximum increment of U-parameter. | |
double | GetMaxParamDeltaV () const |
Get the maximum increment of V-parameter. | |
double | GetUParamToUnit (const MbCartPoint &uv) const |
Get increment of u-parameter, corresponding to the unit length in space. | |
double | GetVParamToUnit (const MbCartPoint &uv) const |
Get increment of v-parameter, corresponding to the unit length in space. | |
double | GetUEpsilon () const |
Get the minimum distinguishable value of u-parameter. It corresponds to the length Math::metricEpsilon in space. | |
double | GetVEpsilon () const |
Get the minimum distinguishable value of v-parameter. It corresponds to the length Math::metricEpsilon in space. | |
double | GetUEpsilon (double u, double v) const |
Get the minimum distinguishable value of u-parameter. It corresponds to the length Math::metricEpsilon in space. | |
double | GetVEpsilon (double u, double v) const |
Get the minimum distinguishable value of v-parameter. It corresponds to the length Math::metricEpsilon in space. | |
double | GetURegion () const |
Get the minimum distinguishable value of u-parameter. It corresponds to the length Math::metricRegion in space. | |
double | GetVRegion () const |
Get the minimum distinguishable value of v-parameter. It corresponds to the length Math::metricRegion in space. | |
double | GetURegion (double u, double v) const |
Get the minimum distinguishable value of u-parameter. It corresponds to the length Math::metricRegion in space. | |
double | GetVRegion (double u, double v) const |
Get the minimum distinguishable value of v-parameter. It corresponds to the length Math::metricRegion in space. | |
void | CalculatePolygon (double minPar, double maxPar, double constPar, MbeParamDir dir, const MbStepData &stepData, MbPolygon3D &polygon) const |
Calculate polygon by u or v. More... | |
void | AddTesselation (const MbStepData &stepData, MbeParamDir dir, double u1, double u2, double v1, double v2, SArray< double > &uu, SArray< double > &vv) const |
Determine splitting of the surface parametric region according to direction. More... | |
virtual bool | IsRectangular () const |
Determine whether derivatives with respect to u and v are orthogonal. | |
virtual bool | IsShift (const MbSpaceItem &obj, MbVector3D &dir, bool &isSame, double accuracy=LENGTH_EPSILON) const |
Determine whether the object is a translation. More... | |
virtual void | CheckSurfParams (double &u, double &v) const |
Check parameters. Analogue of the global function _CheckParams, optimized for caches usage. More... | |
bool | GetPlacement (MbPlacement3D *place, bool exact=false) const |
Get a local coordinate system of planar surface (or only a possibility of getting it). | |
bool | GetPlanePlacement (MbPlacement3D &place) const |
Get a local coordinate system if a surface is a plane. | |
bool | GetControlPlacement (MbPlacement3D &place, bool sameSense=true) const |
Construct a local coordinate system of a surface with origin at the middle point of base surface parametric limits. More... | |
bool | OrientPlacement (MbPlacement3D &place, bool normalSense=true) const |
Orient an axis X of a placement along the line of its intersection with surface. | |
bool | IsPointOn (const MbCartPoint3D &, double eps=METRIC_PRECISION) const |
Determine whether a point is located on a surface or not. | |
void | PointOn (MbCartPoint &uv, MbCartPoint3D &p) const |
Calculate the point on a surface inside the domain of surface. | |
void | _PointOn (const MbCartPoint &uv, MbCartPoint3D &p) const |
Calculate a point on a surface extension. | |
void | Normal (MbCartPoint &uv, MbVector3D &v) const |
Calculate the normal vector to a surface inside the domain of surface. | |
bool | GetMatrix (double xMin, double xMax, double yMin, double yMax, MbMatrix &matr) const |
Find a matrix of transformation for the curves on a surface when the parameterization is changed. More... | |
double | GetUMid () const |
The middle value of u. | |
double | GetVMid () const |
The middle value of v. | |
double | GetURange () const |
Parametric length by u. | |
double | GetVRange () const |
Parametric length by v. | |
void | GetRect (MbRect &r) const |
Get parametric bounding box. | |
void | GetRect (MbRect2D &r) const |
Get parametric bounding box. | |
![]() | |
virtual | ~MbSpaceItem () |
Destructor. | |
void | PrepareWrite () const |
Register object. More... | |
MbeRefType | RefType () const override |
Get a registration type (for copying, duplication). | |
bool | IsFamilyRegistrable () const override |
Whether the object belongs to a registrable family. | |
void | CalculateWire (const MbStepData &stepData, MbMesh &mesh) const |
void | CalculateWire (double sag, MbMesh &mesh) const |
![]() | |
TapeBase (RegistrableRec regs=noRegistrable) | |
Constructor. | |
TapeBase (const TapeBase &) | |
Copy-constructor. | |
virtual | ~TapeBase () |
Destructor. | |
RegistrableRec | GetRegistrable () const |
Whether the stream class is registrable. | |
void | SetRegistrable (RegistrableRec regs=registrable) const |
Set the state of registration of the stream class. | |
virtual const char * | GetPureName (const VersionContainer &) const |
Get the class name. | |
![]() | |
refcount_t | GetUseCount () const |
Get count of references (get count of owners of an object). | |
refcount_t | AddRef () const |
Increase count of references by one. | |
refcount_t | DecRef () const |
Decrease count of references by one. | |
refcount_t | Release () const |
Decrease count of references by one and if count of references became zero, then remove itself. | |
![]() | |
void | Lock () const |
Switch lock on (locking happens only in parallel region). | |
void | Unlock () const |
Switch lock off if locking has been set. | |
CommonRecursiveMutex * | GetLock () const |
Get a pointer to the mutex object. Return nullptr if no parallelism. For use in ScopedLock. | |
Protected Member Functions | |
MbCurveBoundedSurface (const MbCurveBoundedSurface &init, MbRegDuplicate *) | |
Copy-constructor. | |
MbCurveBoundedSurface (const MbCurveBoundedSurface *init) | |
Copy-constructor of contours with the same surface (for CurvesDuplicate()). | |
bool | CreateRectTree () const |
Create and initialize the search tree. | |
void | DeleteRectTree () const |
Delete search tree. | |
void | DeleteSearchTree () const |
Delete search tree. | |
![]() | |
MbSurface () | |
Constructor. | |
MbSurface (const MbSurface &) | |
Copy-constructor. | |
void | MoveGabarit (const MbVector3D &v) |
Move bounding box. | |
void | NormalCalculation (const MbVector3D &uDer, const MbVector3D &vDer, double u, double v, bool ext, MbVector3D &nor) const |
Normal calculation by derivatives uDer and vDer on point with parameters u, v. | |
double | StepAlong (double u, double v, double sag, bool alongU, double stepMinCoeff, const MbVector3D &der, const MbVector3D &sec) const |
Step calculation by sag. | |
double | DeviationStepAlong (double u, double v, double angle, bool alongU, const MbVector3D &der, const MbVector3D &sec) const |
Step calculation by normal deviation. | |
![]() | |
MbSpaceItem () | |
Default constructor. | |
![]() | |
MbRefItem () | |
Constructor without parameters. | |
Additional Inherited Members | |
![]() | |
MbCube | cube |
Bounding box of surface. More... | |
The surface bounded by curves.
The surface bounded by closed contours on surface MbContourOnSurface represents the general case of a surface.
Domain of parameters of such surface is the connected piece of the two-dimensional plane which is described by one external two-dimensional contour and some internal contours.
Contour is composite closed two-dimensional curve. Each two-dimensional contour together with base surface forms a contour on surface MbContourOnSurface which passes through one of surface edges. Each contour describes one closed boundary of surface.
First contour of 'curves' container describes external boundary and contains inside all the other contours describing internal cuts of a surface.
Internal contours can not be enclosed each other. Internal loops lie inside the external loop.
In case of absence of cuts inside surfaces internal contours are absent. Loops don't intersect each other and themselves.
Contours describing the surface domain can exceed the domain of base surface basisSurface. When it is out of domain bounds base surface basisSurface is extended according to its law of change as elementary surfaces for example or by tangent generally.
For the correct work of the method determining the position of parameters relative to surface boundary contours have to be oriented (NormalizeCurvesOrientation() method). If look towards to a surface normal with the oriented contours then the external contour of surface is oriented counterclockwise but internal contours of surface are oriented clockwise.
The surface bounded by curves is considered to be open by both parameters. For a periodic base surface the domain of periodic parameter of the surface bounded by curves can exceed the period of a base surface. Another surface bounded by curves can't be the base surface for surface bounded by curves. In this situation it changes to the initial base surface. The surface is used for creation of faces of solids in general case.
|
overridevirtual |
Create a copy of the object.
Create a copy of an object using the registrator. Registrator is used to prevent multiple copy of the object. If the object contains references to the other objects, then nested objects are copied as well. It is allowed not to pass registrator into the function. Then new copy of object will be created. While copying of single object or set of not connected objects, it is allowed not to use registrator. Registrator should be used if it is required to copy several connected objects. It is possible, that objects connection is based on the references to common objects. Then, while copying without using of registrator, it is possible to obtain set of copies, that contain references to the different copies of the same nested object, that leads to loss of connection between copies.
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Determine whether an object is equal.
Still considered objects of the same type, all data is the same (equal).
[in] | item | - The object to compare. |
[in] | accuracy | - The accuracy to compare. |
Implements MbSpaceItem.
|
overridevirtual |
Make objects equal if they are similar.
You can still make only a similar objects.
[in] | item | - The object to initialize. |
Implements MbSpaceItem.
|
overridevirtual |
Determine whether an object is similar.
Such are considered the same objects whose data are similar.
[in] | item | - The object to compare. |
Reimplemented from MbSpaceItem.
|
overridevirtual |
Convert the object according to the matrix.
Convert the original object according to the matrix using the registrator. If object contains references to the other geometric objects, then nested objects are transformed according to the matrix. Registrator is needed to prevent multiple object copying. It is allowed to use function without registrator, if it is needed to transform single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be transformed.
[in] | matr | - Transformation matrix. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Move an object along a vector.
Move an object along a geometric vector using the registrator. If object contains references to the other geometric objects then the move operation is applied to the nested objects. Registrator is needed to prevent multiple copying of the object. It is allowed to use function without registrator, if it is needed to transform a single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be moved.
[in] | to | - Shift vector. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Rotate an object around an axis at a given angle.
Rotate an object around an axis at a given angle with the registrator. If object contains references to the other geometric objects then the rotation operation is applied to the nested objects. Registrator is needed to prevent multiple copying of the object. It is allowed to use function without registrator, if it is needed to transform a single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be rotated.
[in] | axis | - The axis of rotation. |
[in] | angle | - Rotation. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Determine the distance to the point.
Determine the distance to the point.
[in] | point | - Point. |
Implements MbSpaceItem.
|
overridevirtual |
Build polygonal copy mesh.
Build a polygonal copy of the object that is represented by polygons or/and fasets.
[in] | stepData | - Data for еру step calculation for polygonal object. |
[in] | note | - Way for polygonal object constructing. |
[in,out] | mesh | - The builded polygonal object. |
Implements MbSpaceItem.
|
overridevirtual |
Outstanding properties of the object.
Issue internal data (properties) of the object for viewing and modification.
[in] | properties | - Container for the internal data of the object. |
Implements MbSpaceItem.
|
overridevirtual |
Change the properties of an object.
Changing the internal data (properties) of the object you are copying the corresponding values from the sent object.
[in] | properties | - Container for the internal data of the object. |
Implements MbSpaceItem.
|
overridevirtual |
Determine whether a surface is closed in u-parameter direction.
Determine whether a surface is closed smoothly in u-parameter direction without regard to the boundary contour. It is always false for MbCurveBoundSurface. It is recommended to use IsUPeriodic.
Implements MbSurface.
|
overridevirtual |
Determine whether a surface is closed in v-parameter direction.
Determine whether a surface is closed smoothly in v-parameter direction without regard to the boundary contour. It is always false for MbCurveBoundSurface. It is recommended to use IsVPeriodic.
Implements MbSurface.
|
overridevirtual |
Determine whether a surface is closed in u-parameter direction regardless of the smoothness of the closure.
Determine whether a surface is actually closed in u-parameter direction regardless of the smoothness of the closure.
Reimplemented from MbSurface.
|
overridevirtual |
Determine whether a surface is closed in v-parameter direction regardless of the smoothness of the closure.
Determine whether a surface is actually closed in v-parameter direction regardless of the smoothness of the closure.
Reimplemented from MbSurface.
|
overridevirtual |
Determine whether a surface is closed in u-parameter direction.
Determine whether a surface is smoothly closed in u-parameter direction.
Reimplemented from MbSurface.
|
overridevirtual |
Determine whether a surface is closed in v-parameter direction.
Determine whether a surface is smoothly closed in v-parameter direction.
Reimplemented from MbSurface.
|
overridevirtual |
Calculate a point on the surface.
Correct parameters when getting out of rectangular domain bounds and Calculate a point on the surface.
[in] | u | - First surface parameter. |
[in] | v | - Second surface parameter. |
[out] | p | - A point on the surface. |
Implements MbSurface.
|
overridevirtual |
Calculate a point on the surface.
Calculate a point on the surface including the outside area determination parameters.
[in] | u | - First surface parameter. |
[in] | v | - Second surface parameter. |
[out] | p | - A point on the surface or on extended surface. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate point and derivatives of object for given parameters.
Values of point and derivatives are calculated on parameters area and on extended surface.
[in] | u | - Parameter. |
[in] | v | - Parameter. |
[in] | ext | - On parameters area (false), on extended surface (true). |
[out] | pnt | - Point. |
[out] | uDer | - Derivative with respect to u. |
[out] | vDer | - Derivative with respect to v. |
[out] | uuDer | - Second derivative with respect to u, if not nullptr. |
[out] | vvDer | - Second derivative with respect to v, if not nullptr. |
[out] | uvDer | - Second derivative with respect to u and v, if not nullptr. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate all derivatives at point.
Values of point and derivatives are calculated an extended surface.
[in] | u | - Parameter. |
[in] | v | - Parameter. |
[out] | pnt | - Point. |
[out] | deru | - Derivative with respect to u. |
[out] | derv | - Derivative with respect to v. |
[out] | norm | - Normal. |
[out] | noru | - Derivative of normal vector with respect to u. |
[out] | norv | - Derivative of normal vector with respect to v. |
[out] | deruu | - Second derivative with respect to u. |
[out] | dervv | - Second derivative with respect to v. |
[out] | deruv | - Second derivative with respect to u and v. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate parameter step.
Calculate parameter step for the surface approximation by its sag value along a line with a constant value of v. Calculation of the step is performed with consideration of curvature radius. A step of surface approximation along a curve is chosen in such way, that the deviation from its polygon does not exceed the given value of sag.
[in] | u | - A parameter defining a point on the surface. |
[in] | v | - A parameter defining a point on the surface. |
[in] | sag | - Maximum feasible sag value. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate parameter step.
Calculate parameter step for the surface approximation by its sag value along a line with a constant value of u. Calculation of the step is performed with consideration of curvature radius. A step of surface approximation along a curve is chosen in such way, that the deviation from its polygon does not exceed the given value of sag.
[in] | u | - A parameter defining a point on the surface. |
[in] | v | - A parameter defining a point on the surface. |
[in] | sag | - Maximum feasible sag value. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate parameter step.
Calculate parameter step for the surface approximation by the deviation angle of the tangent vector along a line with a constant value of u. A step of surface approximation along a curve is chosen in such way, that angular deviation of the tangent to the curve at the next point does not exceed the given value ang.
[in] | u | - A parameter defining a point on the surface. |
[in] | v | - A parameter defining a point on the surface. |
[in] | ang | - The maximum feasible deviation angle of tangent. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate parameter step.
Calculate parameter step for the surface approximation by the deviation angle of the tangent vector along a line with a constant value of v. A step of surface approximation along a curve is chosen in such way, that angular deviation of the tangent to the curve at the next point does not exceed the given value ang.
[in] | u | - A parameter defining a point on the surface. |
[in] | v | - A parameter defining a point on the surface. |
[in] | ang | - The maximum feasible deviation angle of tangent. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate parameter step.
Calculate the parameter step for approximation of a surface by the given metric length of a step along a line with a constant value of u.
[in] | u | - A parameter defining a point on the surface. |
[in] | v | - A parameter defining a point on the surface. |
[in] | len | - The given metric length. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate parameter step.
Calculate the parameter step for approximation of a surface by the given metric length of a step along a line with a constant value of v.
[in] | u | - A parameter defining a point on the surface. |
[in] | v | - A parameter defining a point on the surface. |
[in] | len | - The given metric length. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate the boundary point.
Calculate one of the points where parameters take the maximum or the minimum values.
[in] | number | - A number of a boundary point. 1 corresponds to the point (umin, vmin) 2 corresponds to the point (umax, vmin) 3 corresponds to the point (umax, vmax) 4 corresponds to the point (umin, vmax) |
[in,out] | pnt | - A calculated point. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate the boundary two-dimensional point.
Calculate one of the points where parameters take the maximum or the minimum values.
[in] | number | - A number of a boundary point. 1 corresponds to the point (umin, vmin) 2 corresponds to the point (umax, vmin) 3 corresponds to the point (umax, vmax) 4 corresponds to the point (umin, vmax) |
[in,out] | pnt | - A calculated point. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate line curvature along the direction of u.
There is calculated a line curvature along the direction of u when v = const.
[in] | u | - Parameter. |
[in] | v | - Parameter. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate line curvature along the direction of v.
There is calculated a line curvature along the direction of v when u = const.
[in] | u | - Parameter. |
[in] | v | - Parameter. |
Reimplemented from MbSurface.
|
overridevirtual |
Get the physical radius of the object or null if it impossible.
Method returns maximum physical radius by one of the parametric direction if the corresponding parametric curve is the arc, method returns zero otherwise.
Reimplemented from MbSurface.
|
overridevirtual |
|
overridevirtual |
Changing of carrier elements.
It is used for union of coplanar faces. The surfaces 'item' and 'init' must be similar.
[in] | item | - Changed surface |
[in] | init | - New surface |
[in] | matr | - Transition matrix from 'item' to 'init' |
Reimplemented from MbSurface.
|
overridevirtual |
Construct a NURBS copy of trimmed surface.
An obtained surface is always unclosed in u and in v. The exception is the NURBS surface itself. If the surface does not require recalculation, then a copy of it is returned. Parameters u1, u2, v1 and v2 are the bounds of surface trimming.
[in] | u1 | - Minimum parameter in U. |
[in] | u2 | - Maximum parameter in U. |
[in] | v1 | - Minimum parameter in V. |
[in] | v2 | - Maximum parameter in V. |
[in] | bmatch | - true, if it is required to keep one-to-one correspondence of parametric regions in mapping. |
Reimplemented from MbSurface.
|
overridevirtual |
Construct a NURBS copy of a surface.
Constructs a NURBS surface which approximates a given surface with the given parameters in each direction. In parameters the degree and the number of knots of a spline and the range of curve's parameters changing may be set. If the flag of accurate approximation is not set in parameters then NURBS without multiple knots is constructed.
[in] | uParam | - Parameters of construction in u direction. |
[in] | vParam | - Parameters of construction in v direction. |
Reimplemented from MbSurface.
|
overridevirtual |
Create an offset surface.
[in] | d | - Distance by the normal vector from the base surface to the offset surface. |
[in] | same | - A flag showing whether to use the current surface or its copy in offset surface. |
Reimplemented from MbSurface.
|
overridevirtual |
Construct spatial copy of the line v = const.
[in] | v | - Parameter in V direction. |
[in] | pRgn | - A range of u-parameters. |
[in] | bApprox | - If false, then it returns null only in a case when the exact curve has been successfully created. If true, then it returns null in a case when the curve is not degenerate. |
Reimplemented from MbSurface.
|
overridevirtual |
Construct spatial copy of the line u = const.
[in] | u | - Parameter in U direction. |
[in] | pRgn | - A range of v-parameters. |
[in] | bApprox | - If false, then it returns null only in a case when the exact curve has been successfully created. If true, then it returns null in a case when the curve is not degenerate. |
Reimplemented from MbSurface.
|
overridevirtual |
Construct spatial copy of line by parametric line.
[in] | segm | - A segment in parametric plane of surface, a spatial copy of which is required to construct. |
[in] | bApprox | - If false, then it returns null only in a case when the exact curve has been successfully created. If true, then it returns null in a case when the curve is not degenerate. |
Reimplemented from MbSurface.
|
overridevirtual |
A point is located inside the region on a surface.
Investigated two-dimensional point in the parametric plane of a surface.
[in] | pnt | - The investigated point. |
[in] | ignoreClosed | - Whether to consider the surface closedness. If true, then the closedness is not considered. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate the parametric distance to the nearest boundary.
The calculated distance is positive if the point is inside, and is negative if it is outside.
[in] | point | - The investigated point. |
[in] | epsilon | - Tolerance of getting a point onto a surface. |
Reimplemented from MbSurface.
|
overridevirtual |
Determine points of intersections between the curve and the surface contours.
Determine points of intersections between the curve and the surface boundaries in order to find parts of the curve inside the surface region and vectors for their translation to the surface region. Translation vector is defined for each intersection point. If it is impossible to find a translation vector, then the vector with null size is saved into the array. It can be non-null if a surface is closed at least in one of directions. In this case the translation vector allows to move a part of a curve by a certain number of periods in such way that the found point of intersection between the curve and the boundary is located inside the surface region and the derivative of a curve at this point is directed inside the surface. Using the translation vector a curve can be moved by a certain number of periods. I.e. metrically the curve will not change.
[in] | curve | - A given curve. |
[in,out] | tcurv | - A set of curve parameters corresponding to the intersection points. |
[in,out] | dir | - A set of translation vectors. |
Reimplemented from MbSurface.
size_t MbCurveBoundedSurface::SegmentIntersection | ( | const MbCurve & | pCurve, |
SArray< double > & | curveParams, | ||
double | epsilon = Math::metricEpsilon |
||
) | const |
Determine points of intersection with two-dimensional uv-curve.
Determine intersection points of a planar curve and contours.
[in] | pCurve | - A curve. |
[out] | curveParams | - An array of parameters on the curve. |
|
overridevirtual |
Find the projection of a point onto the surface.
Find the nearest point projection to the surface or its extension by the given initial approximation. If the range of parameters changing 'uvRange' is set, then it is required to find a projection in the given range. A range of parameters may not belong to the domain of a surface. The Newton method is used.
[in] | pnt | - A given point. |
[in,out] | u | - Input - initial approximation, output - parameter of a surface, corresponding to the nearest projection. |
[in,out] | v | - Input - initial approximation, output - parameter of a surface, corresponding to the nearest projection. |
[in] | ext | - A flag defining whether to seek projection on the extension of the surface. |
[in] | uvRange | - A range of parameters changing in which the solution should be found. |
Reimplemented from MbSurface.
|
overridevirtual |
Find all a point projection onto the surface along a vector in either of two directions.
Calculate all points of intersection with the ray outgoing from the given point 'p' by the direction 'vect'. If the range of parameters changing 'uvRange' is set, then it is required to find a projection in the given range. A range of parameters may not belong to the domain of a surface.
[in] | pnt | - A given point. |
[in] | vect | - A direction vector. |
[out] | uv | - A set of projection points in the area of surface definition. |
[in] | ext | - A flag defining whether to seek projection on the extension of the surface. |
[in] | uvRange | - A range of surface parameters changing in which the solution should be found. |
Reimplemented from MbSurface.
|
overridevirtual |
Determine points of intersection between a surface and a curve.
Determine points of intersection between a surface and a curve.
[in] | curv | - A given curve. |
[in] | uv | - A set of intersection points on the surface. |
[in,out] | tt | - A set of intersection points on the curve. |
[in] | ext0 | - A flag defining whether to seek intersections on extended surface (if it is true, then seek). |
[in] | ext | - A flag defining whether to seek intersections on extended curve (if it is true, then seek). |
[in] | touchInclude | - Whether to consider tangency as intersection. If true, then consider. |
Reimplemented from MbSurface.
|
overridevirtual |
Define whether the surfaces are similar for merge.
Surfaces are similar for merge if they coincide geometrically or one surface transits to another.
[in] | surf | - A given surface. |
[in] | version | - Version of operation. |
[in] | precision | - Precision of calculation. |
Reimplemented from MbSurface.
|
overridevirtual |
Construction of projection of a surface curve on coincident surface.
A projection of surface intersection curve is constructed on a given surface. It is implied that the given surface is similar to one of surfaces of the intersection curve but this fact is not checked.
[in] | spaceCurve | - A given intersection curve. |
[in] | curve | - A two-dimensional curve on a surface. |
[in] | surfNew | - New surface. |
[out] | curveNew | - An obtained two-dimensional curve on new surface. |
Reimplemented from MbSurface.
|
overridevirtual |
Get two-dimensional matrix of transformation from its parametric region to the parametric region of 'surf'.
Calculation of matrix of transformation from one parametric region to another. it is performed for the surfaces which are similar for merge.
[in] | surf | - A given surface. |
[out] | matr | - A transformation matrix. |
[in] | version | - Version of operation. |
[in] | precision | - Precision of calculation. |
Reimplemented from MbSurface.
|
overridevirtual |
Determine a splitting of parametric region of a surface by verticals and horizontals.
Determine a splitting of parametric region of a surface by verticals and horizontals during triangulation.
[in] | stepData | - Data for step calculation during triangulation. |
[in] | u1 | - Minimal value of u-parameter in the region of surface splitting. |
[in] | u2 | - Maximal value of u-parameter in the region of surface splitting. |
[in] | v1 | - Minimal value of v-parameter in the region of surface splitting. |
[in] | v2 | - Maximal value of v-parameter in the region of surface splitting. |
[out] | uu | - A set of parameters of splitting by u. |
[out] | vv | - A set of parameters of splitting by v. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate U-pairs by V.
Calculate significant u-parameters of a surface with the given parameter v. In a case of general form - minimal and maximal values of u-parameter.
[in] | v | - Given parameters. |
[out] | u | - A set of values of u. |
Reimplemented from MbSurface.
|
overridevirtual |
Calculate V-pairs by U.
Calculate significant v-parameters of a surface with the given parameter u. In case of a surface of general form - minimal and maximal values of v-parameter.
[in] | u | - Given parameters. |
[out] | v | - A set of values of v. |
Reimplemented from MbSurface.
|
overridevirtual |
To compute bounding box in a local coordinate system.
To obtain bounding box of object with regar to a local coordinate system, sent box is made to be empty. Then it is computed bounding box of object in a local coordinate system \ and it is stored in box 'cube'
[in] | into | - Transformation matrix from object's current coordinate system to a local coordinate system |
[in,out] | cube | - Information on bounding box |
Implements MbSpaceItem.
|
overridevirtual |
Calculate mesh.
In the function the mesh calculation for surface drawing is performed.
[in] | sag | - A sag value, defining the tolerance.. |
[in] | beg | - A number of the the first knot which gets into the mesh by each direction. For the construction of mesh of the whole surface beg == 0. |
[out] | mesh | - A calculated mesh. |
[in] | uMeshCount | - The number of u-mesh lines. |
[in] | vMeshCount | - The number of v-mesh lines. |
Reimplemented from MbSurface.
|
overridevirtual |
Return the bounding two-dimensional contour.
The function creates new two-dimensional bounding contour. The object should be deleted after using.
[in] | sense | - Whether the contour direction coincides with the counterclockwise traverse direction. |
Reimplemented from MbSurface.
|
overridevirtual |
Return a segment of the bounding two-dimensional contour.
The function creates a segment of bounding contour according to the parameter i.
i = 0 - A segment of boundary where v = vmin
i = 1 - A segment of boundary where u = umax
i = 2 - A segment of boundary where v = vmax
i = 3 - A segment of boundary where u = umin
The object should be deleted after using.
[in] | i | - An index of segment. |
[in] | sense | - Whether the contour direction coincides with the counterclockwise traverse direction. |
Reimplemented from MbSurface.
MbCurve& MbCurveBoundedSurface::MakeSegment | ( | size_t | number, |
size_t | i, | ||
bool | sense | ||
) | const |
Get the two-dimensional boundary curve.
Makes a copy of a curve.
[in] | number | - Index of curve |
[in] | i | - Index of segment |
[in] | sense | - Attribute of coincidence of curve direction |
const MbCurve* MbCurveBoundedSurface::GetSegment | ( | size_t | number, |
size_t | i | ||
) | const |
Get the two-dimensional boundary curve.
Get the two-dimensional boundary curve.
[in] | number | - Index of curve |
[in] | i | - Index of segment |
MbCurve* MbCurveBoundedSurface::SetSegment | ( | size_t | number, |
size_t | i | ||
) |
Get the two-dimensional boundary curve.
Get the two-dimensional boundary curve.
[in] | number | - Index of curve |
[in] | i | - Index of segment |
void MbCurveBoundedSurface::AddOuterContour | ( | ) |
Add a contour.
Creates a contour bounding a surface if count of contours is equal to 0
void MbCurveBoundedSurface::DeleteContour | ( | MbContourOnSurface * | cntr | ) |
Remove contour.
Removes the specified contour.
[in] | cntr | - Contour to remove |
bool MbCurveBoundedSurface::ChangeContour | ( | size_t | index, |
MbContourOnSurface * | cntr | ||
) |
Replace contour.
Replace contour.
[in] | index | - Index of contour to change |
[in] | cntr | - New contour |
void MbCurveBoundedSurface::SetBasisSurfaceUVLimits | ( | ) |
Extend parametric bounds of base surface.
If it is possible, then parametric bounds of base surface are extended so
that the parametric bounds of surface bounded by curves are inside of them.
|
inline |
Check, whether the parameters are in parametric bounds of surface.
Parameters are checked for occurrence in region of permissible values of parameters for current surface.
If parameter is out of this region, then maximum or minimum permissible value is assigned to it.
double MbCurveBoundedSurface::NormalizeCurvesOrientation | ( | ) |
Orient bounding contours.
External contour is oriented counterclockwise, internal contours - clockwise.
void MbCurveBoundedSurface::AddCurve | ( | MbContourOnSurface & | contour | ) |
Add a contour.
Add a contour. After addition it is necessary to call CalculateUVLimits().
void MbCurveBoundedSurface::AddCurve | ( | MbContour & | contour | ) |
Add a contour.
Add a contour. After addition it is necessary to call CalculateUVLimits().
|
inline |
Add a contour.
Add a contour. After addition it isn't necessary to call CalculateUVLimits().
|
inline |
Get contour bounding surface by its index.
Get contour bounding surface by its index. With index checking.
|
inline |
Get contour bounding surface by its index.
Get contour bounding surface by its index. Without index checking. It is recommended to use the GetCurve function with index checking.
|
inline |
Get contour bounding surface by its index.
Get contour bounding surface by its index. With index checking.
|
inline |
Get contour bounding surface by its index.
Get contour bounding surface by its index. Without index checking. It is recommended to use the SetCurve function with index checking.