C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

A surface specified by rectangular matrix of points. More...

#include <surf_polysurface.h>

+ Inheritance diagram for MbPolySurface:
+ Collaboration diagram for MbPolySurface:

Public Member Functions

Common functions of a geometric object
MbeSpaceType Type () const override
 Get the group object type.
 
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...
 
Functions for surface domain description
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...
 
Common functions of surface.
virtual void SetUClosed (bool cls)
 Set the attribute of closedness in direction of u.
 
virtual void SetVClosed (bool cls)
 Set the attribute of closedness in direction of v.
 
virtual void Rebuild ()=0
 Rebuild a surface.
 
size_t GetPointsLines () const
 Return rows count in points matrix.
 
size_t GetPointsColumns () const
 Return columns count in points matrix.
 
void GetPoint (size_t i, size_t j, MbCartPoint3D &pnt) const
 Get the point located at row i and column j. More...
 
void SetPoint (size_t i, size_t j, const MbCartPoint3D &pnt)
 Change the point located at row i and column j. More...
 
void MovePoint (size_t i, size_t j, const MbVector3D &v)
 Translate the point located at row i and column j by the given vector. More...
 
size_t GetPointsUCount () const
 Get count of columns.
 
size_t GetPointsVCount () const
 Get count of rows.
 
bool GetPoints (Array2< MbCartPoint3D > &pnts) const
 Fill points matrix. More...
 
void GetLineSegments (RPArray< MbCurve3D > &segments) const
 Get the array of segments. More...
 
- Public Member Functions inherited from MbSurface
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 &note, MbMesh &mesh) const override
 Build polygonal copy mesh. More...
 
MbPropertyCreateProperty (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 MbSurfaceoperator[] (size_t) const
 An access operator.
 
virtual double GetUMin () const =0
 Get the minimum value of u.
 
virtual double GetVMin () const =0
 Get the minimum value of v.
 
virtual double GetUMax () const =0
 Get the maximum value of u.
 
virtual double GetVMax () const =0
 Get the maximum value of v.
 
virtual bool IsUTouch () const
 Determine whether a surface is closed in u-parameter direction regardless of the smoothness of the closure. More...
 
virtual bool IsVTouch () const
 Determine whether a surface is closed in v-parameter direction regardless of the smoothness of the closure. More...
 
virtual bool IsUPeriodic () const
 Determine whether a surface is closed in u-parameter direction. More...
 
virtual bool IsVPeriodic () const
 Determine whether a surface is closed in v-parameter direction. More...
 
virtual double GetUPeriod () const
 Return period for smoothly closed surface or 0.
 
virtual double GetVPeriod () const
 Return period for smoothly closed surface or 0.
 
virtual double GetPeriod (ptrdiff_t i) const
 Return period. More...
 
virtual size_t Periodicity () const
 Determine periodicity. More...
 
virtual bool GetPoleUMin () const
 Whether a pole exists on parametric region boundary.
 
virtual bool GetPoleUMax () const
 Whether a pole exists on parametric region boundary.
 
virtual bool GetPoleVMin () const
 Whether a pole exists on parametric region boundary.
 
virtual bool GetPoleVMax () const
 Whether a pole exists on parametric region boundary.
 
virtual bool IsPole (double u, double v, double paramPrecision=PARAM_PRECISION) const
 Whether the point is a pole.
 
bool IsPole (const MbCartPoint &uv, double paramPrecision=PARAM_PRECISION) const
 Whether the point is a pole.
 
virtual void PointOn (double &u, double &v, MbCartPoint3D &p) const =0
 Calculate a point on the surface. More...
 
virtual void DeriveU (double &u, double &v, MbVector3D &) const =0
 Calculate first derivative with respect to u.
 
virtual void DeriveV (double &u, double &v, MbVector3D &) const =0
 Calculate first derivative with respect to v.
 
virtual void DeriveUU (double &u, double &v, MbVector3D &) const =0
 Calculate second derivative with respect to u.
 
virtual void DeriveVV (double &u, double &v, MbVector3D &) const =0
 Calculate second derivative with respect to v.
 
virtual void DeriveUV (double &u, double &v, MbVector3D &) const =0
 Calculate second derivative.
 
virtual void DeriveUUU (double &u, double &v, MbVector3D &) const =0
 Calculate third derivative.
 
virtual void DeriveUUV (double &u, double &v, MbVector3D &) const =0
 Calculate third derivative.
 
virtual void DeriveUVV (double &u, double &v, MbVector3D &) const =0
 Calculate third derivative.
 
virtual void DeriveVVV (double &u, double &v, MbVector3D &) const =0
 Calculate third derivative.
 
virtual void TangentU (double &u, double &v, MbVector3D &) const
 Calculate tangent vector in u.
 
virtual void TangentV (double &u, double &v, MbVector3D &) const
 Calculate tangent vector in v.
 
virtual void Normal (double &u, double &v, MbVector3D &) const
 Calculate normal.
 
virtual void NormalU (double &u, double &v, MbVector3D &) const
 Calculate derivative of normal with respect to U.
 
virtual void NormalV (double &u, double &v, MbVector3D &) const
 Calculate derivative of normal with respect to V.
 
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 _PointOn (double u, double v, MbCartPoint3D &p) const
 Calculate a point on the surface. More...
 
virtual void _DeriveU (double u, double v, MbVector3D &) const
 Calculate first derivative with respect to u on extended surface.
 
virtual void _DeriveV (double u, double v, MbVector3D &) const
 Calculate first derivative with respect to v on extended surface.
 
virtual void _DeriveUU (double u, double v, MbVector3D &) const
 Calculate second derivative with respect to u on extended surface.
 
virtual void _DeriveVV (double u, double v, MbVector3D &) const
 Calculate second derivative with respect to v on extended surface.
 
virtual void _DeriveUV (double u, double v, MbVector3D &) const
 Calculate second derivative on extended surface.
 
virtual void _DeriveUUU (double u, double v, MbVector3D &) const
 Calculate third derivative on extended surface.
 
virtual void _DeriveUUV (double u, double v, MbVector3D &) const
 Calculate third derivative on extended surface.
 
virtual void _DeriveUVV (double u, double v, MbVector3D &) const
 Calculate third derivative on extended surface.
 
virtual void _DeriveVVV (double u, double v, MbVector3D &) const
 Calculate third derivative on extended surface.
 
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 _Normal (double u, double v, MbVector3D &) const
 Calculate a normal on extended surface.
 
virtual void _NormalU (double u, double v, MbVector3D &) const
 Calculate derivative of normal vector on extended surface.
 
virtual void _NormalV (double u, double v, MbVector3D &) const
 Calculate derivative of normal vector on extended surface.
 
virtual void _NormalUU (double u, double v, MbVector3D &) const
 Calculate second derivative of normal vector on extended surface.
 
virtual void _NormalUV (double u, double v, MbVector3D &) const
 Calculate second derivative of normal vector on extended surface.
 
virtual void _NormalVV (double u, double v, MbVector3D &) const
 Calculate second derivative of normal vector 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).
 
virtual void Explore (double &u, double &v, bool ext, MbCartPoint3D &pnt, MbVector3D &uDer, MbVector3D &vDer, MbVector3D *uuDer, MbVector3D *vvDer, MbVector3D *uvDer, MbVector3D *nor) const
 Calculate point and derivatives of object for given parameters. More...
 
virtual 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
 Calculate all derivatives at point. More...
 
virtual double StepU (double u, double v, double sag) const
 Calculate parameter step. More...
 
virtual double StepV (double u, double v, double sag) const
 Calculate parameter step. More...
 
virtual double DeviationStepU (double u, double v, double angle) const
 Calculate parameter step. More...
 
virtual double DeviationStepV (double u, double v, double angle) const
 Calculate parameter step. More...
 
virtual double MetricStepU (double u, double v, double length) const
 Calculate parameter step. More...
 
virtual double MetricStepV (double u, double v, double length) const
 Calculate parameter step. More...
 
double SurfaceStep (const double &u, const double &v, bool alongU, const MbStepData &stepData) const
 Calculate parameter step. More...
 
virtual size_t GetUCount () const
 The number of splittings by u-parameter for a check of events.
 
virtual size_t GetVCount () const
 The number of splittings by v-parameter for a check of events.
 
virtual const MbSurfaceGetSurface () const
 Get itself (it is overloaded only in CurveBoundedSurface).
 
virtual const MbSurfaceGetBasisSurface () const
 Get the base surface if exists or itself.
 
virtual MbSurfaceSetSurface ()
 Get itself (it is overloaded only in CurveBoundedSurface).
 
virtual MbSurfaceSetBasisSurface ()
 Get the base surface if exists or itself.
 
virtual void GetLimitPoint (ptrdiff_t number, MbCartPoint3D &pnt) const
 Calculate the boundary point. More...
 
virtual void GetLimitPoint (ptrdiff_t number, MbCartPoint &pnt) const
 Calculate the boundary two-dimensional point. More...
 
MbCartPoint3D GetLimitPoint (ptrdiff_t number) const
 Calculate the boundary point. More...
 
virtual double CurvatureU (double u, double v) const
 Calculate line curvature along the direction of u. More...
 
virtual double CurvatureV (double u, double v) const
 Calculate line curvature along the direction of v. 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 IsSameBase (const MbSurface &) const
 Whether a base surface is a copy of the base surface of the given object.
 
virtual bool IsPlanar (double accuracy=METRIC_EPSILON) const
 Whether a surface is planar.
 
virtual double GetRadius () const
 Get the physical radius of the object or null if it impossible.
More...
 
virtual double GetFilletRadius (const MbCartPoint3D &p, double accuracy=METRIC_REGION) const
 Get fillet radius if the surface is a fillet surface with the set accuracy. More...
 
virtual MbeParamDir GetFilletDirection (double accuracy=METRIC_REGION) const
 Direction of fillet surface with accuracy. More...
 
virtual bool GetCylinderAxis (MbAxis3D &) const
 Get rotation axis of a surface.
 
virtual bool GetCentre (MbCartPoint3D &c) const
 Give the center of sphere surface.
 
virtual bool GetCenterLines (std::vector< MbCurve3D * > &clCurves) const
 Get center lines of a surface.
 
virtual void ChangeCarrier (const MbSpaceItem &item, MbSpaceItem &init)
 Changing of carrier. More...
 
virtual bool ChangeCarrierBorne (const MbSurface &item, MbSurface &init, const MbMatrix &matr)
 Changing of carrier elements. More...
 
virtual bool IsSpinePeriodic () const
 Periodicity of the guide. More...
 
MbSplineSurfaceNurbsSurface (bool bmatch=false) const
 Construct a NURBS copy of a surface. More...
 
virtual MbSplineSurfaceNurbsSurface (double u1, double u2, double v1, double v2, bool bmatch=false) const
 Construct a NURBS copy of trimmed surface. More...
 
virtual MbSurfaceNurbsSurface (const MbNurbsParameters &uParam, const MbNurbsParameters &vParam) 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 > &params) 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 MbSurfaceOffset (double d, bool same) const
 Create an offset surface. More...
 
virtual MbCurve3DCurveU (double v, MbRect1D *pRgn, bool bApprox=true) const
 Construct spatial copy of the line v = const. More...
 
virtual MbCurve3DCurveV (double u, MbRect1D *pRgn, bool bApprox=true) const
 Construct spatial copy of the line u = const.
More...
 
virtual MbCurve3DCurveUV (const MbLineSegment &segm, bool bApprox=true) const
 Construct spatial copy of line by parametric line. More...
 
virtual MbeItemLocation PointRelative (const MbCartPoint3D &pnt, double eps=ANGLE_REGION) const
 Get point location relative to the surface. More...
 
virtual MbeItemLocation PointClassification (const MbCartPoint &pnt, bool ignoreClosed=false) const
 A point is located inside the region on a surface. More...
 
virtual double DistanceToBorder (const MbCartPoint &point, double &epsilon) const
 Calculate the parametric distance to the nearest boundary. More...
 
virtual size_t CurveClassification (const MbCurve &curve, SArray< double > &tcurv, SArray< MbVector > &dir) const
 Determine points of intersections between the curve and the surface contours. 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 bool NearPointProjection (const MbCartPoint3D &pnt, double &u, double &v, bool ext, MbRect2D *uvRange=nullptr) const
 Find the projection of a point onto the surface. More...
 
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 void DirectPointProjection (const MbCartPoint3D &pnt, const MbVector3D &vect, SArray< MbCartPoint > &uv, bool ext, MbRect2D *uvRange=nullptr) const
 Find all a point projection onto the surface along a vector in either of two directions. More...
 
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 void CurveIntersection (const MbCurve3D &curv, SArray< MbCartPoint > &uv, SArray< double > &tt, bool ext0, bool ext, bool touchInclude=false) const
 Determine points of intersection between a surface and a curve. More...
 
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.
 
virtual MbeNewtonResult SilhouetteNewton (const MbVector3D &eye, bool perspective, const MbAxis3D *axis, MbeParamDir switchPar, double funcEpsilon, size_t iterLimit, double &u, double &v, bool ext) const
 Solution of equation system for determination of surface silhouette points. For internal use only.

 
virtual bool IsSimilarToSurface (const MbSurface &surf, VERSION version, double precision=METRIC_PRECISION) const
 Define whether the surfaces are similar for merge. More...
 
virtual bool IsSpecialSimilarToSurface (const MbSurface &surf, VERSION version, double precision=METRIC_PRECISION) const
 Whether the surfaces are similar to merge. Special case. For internal use only.
 
virtual bool ProjectCurveOnSimilarSurface (const MbCurve3D &spaceCurve, const MbCurve &curve, const MbSurface &surfNew, MbCurve *&curveNew) const
 Construction of projection of a surface curve on coincident surface. More...
 
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 bool GetMatrixToSurface (const MbSurface &surf, MbMatrix &matr, VERSION version, double precision=METRIC_PRECISION) const
 Get two-dimensional matrix of transformation from its parametric region to the parametric region of 'surf'. More...
 
virtual ThreeStates Salient () const
 Determine whether the surface is convex. 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...
 
virtual bool CreateNormalPlacements (const MbVector3D &axisZ, double angle, SArray< MbPlacement3D > &places, VERSION version=Math::DefaultMathVersion()) const
 Construct normal placements of constructive planes.

 
virtual bool CreateTangentPlacements (const MbVector3D &axisZ, SArray< MbPlacement3D > &places) const
 Construct tangent placements of constructive planes.
 
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.
 
virtual double ParamArea () const
 Calculate the area of parameters domain.
 
virtual size_t GetUPairs (double v, SArray< double > &u) const
 Calculate U-pairs by V. More...
 
virtual size_t GetVPairs (double u, SArray< double > &v) const
 Calculate V-pairs by U. More...
 
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...
 
virtual void CalculateGabarit (MbCube &cube) const
 Calculate bounding box of surface. It is recommended to use GetGabarit.
 
void CalculateLocalGabarit (const MbMatrix3D &into, MbCube &cube) const override
 Calculate bounding box in the local coordinate system.
 
const MbCubeGetGabarit () const
 Calculate bounding box of surface.
 
const MbCubeCube () 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...
 
virtual MbContourMakeContour (bool sense) const
 Return the bounding two-dimensional contour. More...
 
virtual MbCurveMakeSegment (size_t i, bool sense) const
 Return a segment of the bounding two-dimensional contour. More...
 
MbCurveMakeCurve (size_t number1, size_t number2) const
 Return a segment of the bounding two-dimensional contour. More...
 
virtual bool SetLimit (double u1, double v1, double u2, double v2)
 Set surface limits. For internal use only.
 
bool 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.
 
virtual void IncludePoint (double u, double v)
 Include a point into domain. For internal use only.
 
double GetMaxParamDeltaU () const
 Get the maximum increment of U-parameter.
 
double GetMaxParamDeltaV () const
 Get the maximum increment of V-parameter.
 
virtual double GetParamDelta () const
 Get the maximum increment of parameter.
 
virtual double GetParamPrice () const
 Get the minimum distinguishable value of parameter.
 
virtual double GetUParamToUnit () const
 Get increment of u-parameter, corresponding to the unit length in space.
 
virtual double GetVParamToUnit () const
 Get increment of v-parameter, corresponding to the unit length in space.
 
virtual double GetUParamToUnit (double u, double v) const
 Get increment of u-parameter, corresponding to the unit length in space.
 
virtual double GetVParamToUnit (double u, double v) const
 Get increment of v-parameter, corresponding to the unit length in space.
 
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.
 
virtual void GetParamsToUnit (double u, double v, double &uParam, double &vParam) const
 Get increment of parameters, 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.
 
virtual size_t GetUMeshCount () const
 The the number of splittings in u-direction.
 
virtual size_t GetVMeshCount () const
 The the number of splittings in v-direction.
 
void CalculatePolygon (double minPar, double maxPar, double constPar, MbeParamDir dir, const MbStepData &stepData, MbPolygon3D &polygon) const
 Calculate polygon by u or v. More...
 
virtual void CalculateSurfaceWire (const MbStepData &stepData, size_t beg, MbMesh &mesh, size_t uMeshCount=c3d::WIRE_MAX, size_t vMeshCount=c3d::WIRE_MAX) const
 Calculate mesh. More...
 
virtual void GetTesselation (const MbStepData &stepData, double u1, double u2, double v1, double v2, SArray< double > &uu, SArray< double > &vv) const
 Determine a splitting of parametric region of a surface by verticals and horizontals. 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 void CalculateSurfaceGrid (const MbStepData &stepData, bool sense, MbGrid &grid) const
 Approximate a surface by triangular plates. More...
 
virtual bool IsRectangular () const
 Determine whether derivatives with respect to u and v are orthogonal.
 
virtual bool IsLineU () const
 Check that all derivatives of surface with respect to u which have more than first order are equal to null.
 
virtual bool IsLineV () const
 Check that all derivatives of surface with respect to v which have more than first order are equal to null.
 
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.
 
- Public Member Functions inherited from MbSpaceItem
virtual ~MbSpaceItem ()
 Destructor.
 
void PrepareWrite () const
 Register object. More...
 
MbeRefType RefType () const override
 Get a registration type (for copying, duplication).
 
virtual MbeSpaceType IsA () const =0
 Get the type of the object.
 
bool IsFamilyRegistrable () const override
 Whether the object belongs to a registrable family.
 
virtual MbSpaceItemDuplicate (MbRegDuplicate *iReg=nullptr) const =0
 Create a copy of the object. More...
 
virtual bool IsSame (const MbSpaceItem &other, double accuracy=LENGTH_EPSILON) const =0
 Determine whether an object is equal. More...
 
virtual bool IsSimilar (const MbSpaceItem &item) const
 Determine whether an object is similar. More...
 
virtual bool SetEqual (const MbSpaceItem &item)=0
 Make objects equal if they are similar. More...
 
virtual void GetProperties (MbProperties &properties)=0
 Outstanding properties of the object. More...
 
virtual void SetProperties (const MbProperties &properties)=0
 Change the properties of an object. More...
 
void CalculateWire (const MbStepData &stepData, MbMesh &mesh) const
 
void CalculateWire (double sag, MbMesh &mesh) const
 
virtual void GetBasisItems (RPArray< MbSpaceItem > &)
 Outstanding reference objects in a container sent.
 
- Public Member Functions inherited from TapeBase
 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.
 
- Public Member Functions inherited from MbRefItem
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.
 
- Public Member Functions inherited from MbNestSyncItem
void Lock () const
 Switch lock on (locking happens only in parallel region).
 
void Unlock () const
 Switch lock off if locking has been set.
 
CommonRecursiveMutexGetLock () const
 Get a pointer to the mutex object. Return nullptr if no parallelism. For use in ScopedLock.
 

Protected Member Functions

 MbPolySurface ()
 Empty constructor.
 
 MbPolySurface (Array2< MbCartPoint3D > &vert, bool ucl, bool vcl)
 Constructor of surface. More...
 
 MbPolySurface (size_t nu, size_t nv, const SArray< MbCartPoint3D > &vert, bool ucl, bool vcl)
 Constructor of surface. More...
 
 MbPolySurface (const MbPolySurface &)
 Copy-constructor.
 
- Protected Member Functions inherited from MbSurface
 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.
 
- Protected Member Functions inherited from MbSpaceItem
 MbSpaceItem ()
 Default constructor.
 
- Protected Member Functions inherited from MbRefItem
 MbRefItem ()
 Constructor without parameters.
 

Protected Attributes

Array2< MbCartPoint3Dpoints
 A matrix of control points.
 
bool uclosed
 An attribute of closedness by u-parameter.
 
bool vclosed
 An attribute of closedness by v-parameter.
 
size_t ucount
 Count of columns.
 
size_t vcount
 Count of rows.
 
- Protected Attributes inherited from MbSurface
MbCube cube
 Bounding box of surface. More...
 

Functions performing an interface for a surface of spline form.

virtual void GetKnots (bool isU, SArray< double > &knots) const =0
 Get a knots vector by the chosen parameter. More...
 
virtual void GetWeights (Array2< double > &wts) const =0
 Get the matrix of vertices weights. More...
 
virtual void GetPointsWithVisible (Array2< MbNurbsPointInfo > &params) const =0
 Return an array of knot points and their visibility for the operation of editing as spline. More...
 
virtual void CalculateUVParameters (Array2< MbCartPoint > &params) const =0
 Calculation of points on surface corresponding to knots. More...
 
virtual bool CalculateUVParameterForKnot (size_t uIndex, size_t vIndex, MbCartPoint &point) const =0
 Calculation of point on surface corresponding to control point. More...
 
virtual size_t RemoveUKnots (ptrdiff_t &rowId, ptrdiff_t num=1, double absEps=Math::lengthEpsilon)=0
 Deletion of a column of control points without changing of a surface. More...
 
virtual size_t RemoveVKnots (ptrdiff_t &rowId, ptrdiff_t num=1, double absEps=Math::lengthEpsilon)=0
 Deletion of a row of control points without changing of a surface. More...
 
virtual void InsertUKnotsInRegion (ptrdiff_t idBegin, ptrdiff_t num=1)=0
 Insertion of a row after the row with the index idBegin without changing of a surface by u. More...
 
virtual void InsertVKnotsInRegion (ptrdiff_t idBegin, ptrdiff_t num=1)=0
 Insertion of a row after the row with the index idBegin without changing of a surface by v. More...
 
virtual bool ChangeUDegreeApprox (size_t newDegree)=0
 Change the order of NURBS by construction of a surface by the function NurbsSurface. More...
 
virtual bool ChangeVDegreeApprox (size_t newDegree)=0
 Change the order of NURBS by construction of a surface by the function NurbsSurface. More...
 
virtual bool ChangeParametersApprox (size_t nUDegree, size_t nVDegree, ptrdiff_t nUCount, ptrdiff_t nVCount)=0
 Change the order and the number of knots of NURBS by construction of a surface by the function NurbsSurface. More...
 
virtual bool CalculateFixedPoints (const RPArray< const MbSurfaceIntersectionCurve > &curves, Array2< bool > &fixedPoints) const =0
 Calculation of fixed control points. More...
 
virtual bool CalculatePartsForSpecMove (const Array2< bool > &movedPoints, size_t uIndex, size_t vIndex, const MbVector3D &moveVector, MbeDirectSmoothType smoothType, double smoothDegree, Array2< double > &partsPoints) const =0
 Calculation of a shift part of knots during the translation with blending. More...
 

Detailed Description

A surface specified by rectangular matrix of points.

A surface specified by rectangular matrix of control points with dimension vcount * ucont
is a parent class of NURBS surface MbSplineSurface.

Constructor & Destructor Documentation

◆ MbPolySurface() [1/2]

MbPolySurface::MbPolySurface ( Array2< MbCartPoint3D > &  vert,
bool  ucl,
bool  vcl 
)
protected

Constructor of surface.

Constructor of surface by the matrix of points and closedness in directions of u and v.

Parameters
[in]vert- Matrix of points.
[in]ucl- Whether a surface is closed in u-parameter direction.
[in]vcl- Whether a surface is closed in v-parameter direction.

◆ MbPolySurface() [2/2]

MbPolySurface::MbPolySurface ( size_t  nu,
size_t  nv,
const SArray< MbCartPoint3D > &  vert,
bool  ucl,
bool  vcl 
)
protected

Constructor of surface.

Surface constructor by points array and closedness in direction of u and v. It forms a points matrix by a given array. It fills downward the first column at first, then the second column etc. Array should contain nu*nv elements.

Parameters
[in]nu- Columns count in points matrix.
[in]nv- Columns count in points matrix.
[in]vert- A set of points.
[in]ucl- Whether a surface is closed in u-parameter direction.
[in]vcl- Whether a surface is closed in v-parameter direction.

Member Function Documentation

◆ Transform()

void MbPolySurface::Transform ( const MbMatrix3D matr,
MbRegTransform iReg = nullptr 
)
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.

Parameters
[in]matr- Transformation matrix.
[in]iReg- Registrator.

Implements MbSpaceItem.

◆ Move()

void MbPolySurface::Move ( const MbVector3D to,
MbRegTransform iReg = nullptr 
)
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.

Parameters
[in]to- Shift vector.
[in]iReg- Registrator.

Implements MbSpaceItem.

◆ Rotate()

void MbPolySurface::Rotate ( const MbAxis3D axis,
double  angle,
MbRegTransform iReg = nullptr 
)
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.

Parameters
[in]axis- The axis of rotation.
[in]angle- Rotation.
[in]iReg- Registrator.

Implements MbSpaceItem.

◆ IsUClosed()

bool MbPolySurface::IsUClosed ( ) const
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.

Reimplemented in MbSplineSurface.

◆ IsVClosed()

bool MbPolySurface::IsVClosed ( ) const
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.

Reimplemented in MbSplineSurface.

◆ GetPoint()

void MbPolySurface::GetPoint ( size_t  i,
size_t  j,
MbCartPoint3D pnt 
) const
inline

Get the point located at row i and column j.

Get the point located at row i and column j.

Parameters
[in]i- String.
[in]j- Column.
[in,out]pnt- Requested point.

◆ SetPoint()

void MbPolySurface::SetPoint ( size_t  i,
size_t  j,
const MbCartPoint3D pnt 
)
inline

Change the point located at row i and column j.

Change the point located at row i and column j.

Parameters
[in]i- String.
[in]j- Column.
[in]pnt- New point.

◆ MovePoint()

void MbPolySurface::MovePoint ( size_t  i,
size_t  j,
const MbVector3D v 
)
inline

Translate the point located at row i and column j by the given vector.

Translate the point located at row i and column j by the given vector.

Parameters
[in]i- String.
[in]j- Column.
[in]v- A vector of point translation.

◆ GetPoints()

bool MbPolySurface::GetPoints ( Array2< MbCartPoint3D > &  pnts) const
inline

Fill points matrix.

Fill points matrix.

Parameters
[in]pnts- Matrix of points.

◆ GetLineSegments()

void MbPolySurface::GetLineSegments ( RPArray< MbCurve3D > &  segments) const

Get the array of segments.

The function constructs all horizontal segments between neighboring points and all vertical segments between neighboring points.

Parameters
[in]segments- Set for segments storage.

◆ GetKnots()

virtual void MbPolySurface::GetKnots ( bool  isU,
SArray< double > &  knots 
) const
pure virtual

Get a knots vector by the chosen parameter.

Get a knots vector by the chosen parameter.

Parameters
[in]isU- Determines the requested coordinate of a knot vector: true - u, false - v.
[in,out]knots- Matrix for knot vector storage.

Implemented in MbSplineSurface.

◆ GetWeights()

virtual void MbPolySurface::GetWeights ( Array2< double > &  wts) const
pure virtual

Get the matrix of vertices weights.

Get the matrix of vertices weights.

Parameters
[in,out]wts- A matrix for weights values filling.

Implemented in MbSplineSurface.

◆ GetPointsWithVisible()

virtual void MbPolySurface::GetPointsWithVisible ( Array2< MbNurbsPointInfo > &  params) const
pure virtual

Return an array of knot points and their visibility for the operation of editing as spline.

Return an array of knot points and their visibility for the operation of editing as spline.

Parameters
[in,out]params- A matrix of control points with specifying of visibility of each control point for editing.

Implemented in MbSplineSurface.

◆ CalculateUVParameters()

virtual void MbPolySurface::CalculateUVParameters ( Array2< MbCartPoint > &  params) const
pure virtual

Calculation of points on surface corresponding to knots.

Calculation of points on surface corresponding to knots.

Parameters
[in,out]params- A matrix for keeping of points on surface corresponding to control points.

Implemented in MbSplineSurface.

◆ CalculateUVParameterForKnot()

virtual bool MbPolySurface::CalculateUVParameterForKnot ( size_t  uIndex,
size_t  vIndex,
MbCartPoint point 
) const
pure virtual

Calculation of point on surface corresponding to control point.

Calculation of point on surface corresponding to control point.

Parameters
[in]uIndex- A column of control point.
[in]vIndex- A row of control point.
[in,out]point- A point on surface.
Returns
True if a point on surface was successfully found.

Implemented in MbSplineSurface.

◆ RemoveUKnots()

virtual size_t MbPolySurface::RemoveUKnots ( ptrdiff_t &  rowId,
ptrdiff_t  num = 1,
double  absEps = Math::lengthEpsilon 
)
pure virtual

Deletion of a column of control points without changing of a surface.

Deletion of a column of control points without changing of a surface.

Parameters
[in]rowId- Index of the first deleted column.
[in]num- Count of deleted columns.
[in]absEps- Approximation tolerance.
Returns
Count of columns which are succeeded to delete.

Implemented in MbSplineSurface.

◆ RemoveVKnots()

virtual size_t MbPolySurface::RemoveVKnots ( ptrdiff_t &  rowId,
ptrdiff_t  num = 1,
double  absEps = Math::lengthEpsilon 
)
pure virtual

Deletion of a row of control points without changing of a surface.

Deletion of a row of control points without changing of a surface.

Parameters
[in]rowId- Index of the first deleted row.
[in]num- Count of deleted rows.
[in]absEps- Approximation tolerance.
Returns
Count of rows which are succeeded to delete.

Implemented in MbSplineSurface.

◆ InsertUKnotsInRegion()

virtual void MbPolySurface::InsertUKnotsInRegion ( ptrdiff_t  idBegin,
ptrdiff_t  num = 1 
)
pure virtual

Insertion of a row after the row with the index idBegin without changing of a surface by u.

Insertion of a row after the row with the index idBegin without changing of a surface by u.

Parameters
[in]idBegin- An index of the row a new row will be inserted after.
[in]num- Count of inserted rows.

Implemented in MbSplineSurface.

◆ InsertVKnotsInRegion()

virtual void MbPolySurface::InsertVKnotsInRegion ( ptrdiff_t  idBegin,
ptrdiff_t  num = 1 
)
pure virtual

Insertion of a row after the row with the index idBegin without changing of a surface by v.

Insertion of a row after the row with the index idBegin without changing of a surface by v.

Parameters
[in]idBegin- An index of the row a new row will be inserted after.
[in]num- Count of inserted rows.

Implemented in MbSplineSurface.

◆ ChangeUDegreeApprox()

virtual bool MbPolySurface::ChangeUDegreeApprox ( size_t  newDegree)
pure virtual

Change the order of NURBS by construction of a surface by the function NurbsSurface.

Change the order of NURBS by construction of a surface by the function NurbsSurface.

Parameters
[in]newDegree- New surface degree by u.
Returns
True if approximation is succeeded.

Implemented in MbSplineSurface.

◆ ChangeVDegreeApprox()

virtual bool MbPolySurface::ChangeVDegreeApprox ( size_t  newDegree)
pure virtual

Change the order of NURBS by construction of a surface by the function NurbsSurface.

Change the order of NURBS by construction of a surface by the function NurbsSurface.

Parameters
[in]newDegree- New surface degree by v.
Returns
True if approximation is succeeded.

Implemented in MbSplineSurface.

◆ ChangeParametersApprox()

virtual bool MbPolySurface::ChangeParametersApprox ( size_t  nUDegree,
size_t  nVDegree,
ptrdiff_t  nUCount,
ptrdiff_t  nVCount 
)
pure virtual

Change the order and the number of knots of NURBS by construction of a surface by the function NurbsSurface.

Change the order and the number of knots of NURBS by construction of a surface by the function NurbsSurface.

Parameters
[in]nUDegree- New surface degree by u.
[in]nVDegree- New surface degree by v.
[in]nUCount- A number of control points in U direction.
[in]nVCount- A number of control points in V direction.
Returns
True if approximation is succeeded.

Implemented in MbSplineSurface.

◆ CalculateFixedPoints()

virtual bool MbPolySurface::CalculateFixedPoints ( const RPArray< const MbSurfaceIntersectionCurve > &  curves,
Array2< bool > &  fixedPoints 
) const
pure virtual

Calculation of fixed control points.

Calculation of knots which should be fixed to forbid the deformation of curves in the given array when a surface deforms.

Parameters
[in]curves- A set of curves.
[in,out]fixedPoints- A matrix where the data about necessity of angles fixation is written to save curves. If an element of matrix equals true then the control point corresponding to it should be fixed.
Returns
True if calculations are successfully performed.

Implemented in MbSplineSurface.

◆ CalculatePartsForSpecMove()

virtual bool MbPolySurface::CalculatePartsForSpecMove ( const Array2< bool > &  movedPoints,
size_t  uIndex,
size_t  vIndex,
const MbVector3D moveVector,
MbeDirectSmoothType  smoothType,
double  smoothDegree,
Array2< double > &  partsPoints 
) const
pure virtual

Calculation of a shift part of knots during the translation with blending.

A translation of one control point is known. Translation of other points which marked as movable in the matrix movedPoints depends on the direction of its translation, the distance from the points to the translation line (moveVector) and the function of blending. There are three modes of blending: convex, concave and smooth transition.

Parameters
[in]movedPoints- A matrix containing data about moved points. If an element of the matrix equals 1 then the corresponding control point can be moved, otherwise - it is fixed.
[in]uIndex- A column of a moved control point relative to which there will be the blending.
[in]vIndex- A row of a moved control point relative to which there will be the blending.
[in]moveVector- A vector in direction of which the control point is translated.
[in]smoothType- The type of blending.
dst_None - no blending, dst_Convex - convex, dst_Concave - concave, dst_Smooth - smooth transition.
[in]smoothDegree- A degree of the blending function. A positive value.
[in,out]partsPoints- A matrix with the data about a part of shift of each point relative to the moved point.
Returns
True if the calculations were successfully performed..

Implemented in MbSplineSurface.


The documentation for this class was generated from the following file: