C3D Kernel  104598
Classes | Enumerations | Functions
Algorithms in Three-Dimensional Space
Geometric Construction Methods
Collaboration diagram for Algorithms in Three-Dimensional Space:

Classes

class  MbSurfDist
 Distance between points on surface. More...
class  MbMinMaxSurfDists
struct  PrimitiveDifference
 Differences of primitives. More...
struct  NameDifference
 Naming difference between two primitives. More...
class  CountDifference
 Difference in count. More...
class  PointDifference
 Difference of points. More...
class  VectorDifference
 Difference of normals. More...
class  CompareItemsResult
 The result of comparison between two objects. More...
struct  MbIntersectionData
 Information about two solids intersection. More...

Enumerations

enum  MbeSurfAxesMeasureRes {
  samr_SurfSurf_Failed = -3, samr_AxisSurf_Failed = -2, samr_AxisAxis_Failed = -1, samr_Undefined = 0,
  samr_AxisAxis_Coaxial, samr_AxisAxis_Parallel, samr_AxisAxis_Intersecting, samr_AxisAxis_Distant,
  samr_AxisSurf_Colinear, samr_AxisSurf_Parallel, samr_AxisSurf_Intersecting, samr_AxisSurf_Distant,
  samr_SurfSurf_Colinear, samr_SurfSurf_Parallel, samr_SurfSurf_Intersecting
}
enum  SolidMixUpMode {
  smm_FacesReorder = 1, smm_LoopsReorder = 2, smm_LoopsBegReset = 4, smm_EdgesRedirection = 8,
  smm_EdgesSection = 16
}
 Ways of "mixing". More...

Functions

bool IsMultiShell (const MbFaceShell *shell, bool checkNesting=true)
 Check if the shell can be subdivided into separate parts.
size_t DetachShells (MbFaceShell &shell, RPArray< MbFaceShell > &parts, bool sort)
 Separate parts from a shell.
size_t CreateShells (MbFaceShell &shell, RPArray< MbFaceShell > &parts)
 Separate parts from a shell.
bool UnifyOwnComplanarFaces (MbFaceShell &shell, const MbSNameMaker &nameMaker, bool checkBaseSurfaces)
 Unite complanar faces.
bool CheckIdenticalBaseSufaces (MbFaceShell &shell)
 Find and eliminate common underlying surfaces of faces.
void FacePropagate (MbeFacePropagation fp, RPArray< MbFace > &face_set, const MbVector3D &dir)
 Capture the faces in one of proposed methods.
void MouldCavitySolids (RPArray< MbSolid > &solids, MbCartPoint3D *fixedPoint, double deltaX, double deltaY, double deltaZ)
 Scale cavities of a mold.
bool IsSolidsIntersection (const MbSolid &solid1, const MbSolid &solid2, const MbSNameMaker &snMaker)
 Check intersection of solids.
bool IsSolidsIntersection (const MbSolid &solid1, const MbMatrix3D &matr1, const MbSolid &solid2, const MbMatrix3D &matr2, bool checkTangent, RPArray< MbIntersectionData > &intData)
 Check intersection of solids in an assembly.
void GetDistanceToSurface (const MbPlacement3D &pl, const MbCurve *curve, const MbSurface *surf, double &lPlus, double &lMinus)
 Find the distances from a contour on a plane to a surface.
void GetDistanceToCube (const MbSurface &surface, const MbVector3D &direction, const MbCurve &curve, const MbCube &cube, double &lPlus, double &lMinus, MbResultType &resType)
 Find the distances from a contour on a surface to the bounding box of a shell.
void GetDistanceToCube (const MbSurface &surface, const MbVector3D &direction, const RPArray< MbCurve > &curves, const MbCube &cube, double &lPlus, double &lMinus, MbResultType &resType)
 Find the distances from curves on a surface to the bounding box of a shell.
bool GetDistanceToCube (const MbPlacement3D &pl, const MbFaceShell *shell, double &dPlus, double &dMinus, bool findMax=true)
 Find the distances from a plane to the bounding box of a shell.
void GetRangeToCubeOrSurface (const MbCurve3D &curve, const MbVector3D &direction, const MbAxis3D &axis, const bool rotation, bool operationDirection, const MbCube *toCube, const MbSurface *toSurface, SweptValuesAndSides &params, MbResultType &resType)
 Find the distances/angles from a contour to a bounding box or to a surface.
bool GetNearestSolid (const MbPlacement3D &pl, RPArray< MbContour > &c, MbSweptLayout::Direction direction, RPArray< MbSolid > &solids, size_t &nPlus, size_t &nMinus)
 Find the nearest solids while extruding with option 'up to the nearest object'.
bool GetNearestSolid (RPArray< MbCurve3D > &curves, const MbVector3D &direction, MbSweptLayout::Direction operationDirection, RPArray< MbSolid > &solids, size_t &nPlus, size_t &nMinus)
 Find the nearest solids while extruding with option 'up to the nearest object'.
MbResultType CheckNurbsShell (const NurbsSurfaceValues &params, const MbSolid &nsSolid, IProgressIndicator *progBar)
 Check a shell or a solid that consists of NURBS surfaces.
bool AddTruncatingSketch (const MbPlacement3D &sketchPlace, RPArray< MbCurve > &sketchCurves, RPArray< MbSpaceItem > &items)
 Add a sketch to the array of truncating objects.
void AddTruncatingCurve (MbCurve3D &curve, RPArray< MbSpaceItem > &items)
 Add a curve to the array of truncating objects.
void CheckShellingFaces (const SweptValues &params, RPArray< MbFace > &faces)
 Check the correctness of shelling faces for creation of a thin-walled solid.
bool ProjectVectorOn (const MbVector3D &v3d, const MbSurface &surface, const MbCartPoint &p2d, MbVector &v2d)
 Calculate the components of projection of a vector defined at a point on the surface.
MbSurfaceGetExtendedSurfaceCopy (MbCube &gabarit, const MbSurface &surf, VERSION version)
 Extend a surface for cutting a solid.
void CreateFaces (const MbPlacement3D &place, const MbContour &contour, const MbVector3D &der, bool sense, const MbSNameMaker &n, RPArray< MbFace > &initFaces, bool useAddCount=false)
 Create a set of faces with topology of a prism.
void GetAutoReference (MbFaceShell &shell, const MbPlacement3D &place, const MbContour &contour, ptrdiff_t index, RibValues::ExtrudeSide &side, MbCartPoint3D &origin, MbVector3D &dir3D)
 Estimate parameters of extrusion for a rib.
MbCurveGetProjCurveOnSurface (const MbSurfaceIntersectionCurve &intersectCurve, bool first)
 Create a curve in the parameter space of a surface.
bool IsSameSpineDirection (const MbCurve3D &curve, VERSION srcVersion, VERSION dstVersion)
 Check the invariance of the vector of spine direction in different versions.
bool CalculateExtremeCurvatures (const MbSurface &surf, double &d_max, double &d_min, SArray< MbCartPoint > &maxPoints, SArray< MbCartPoint > &minPoints)
 Calculate extremals of normal curvature of the given surface.
bool FacesMaxMinCurvature (const RPArray< MbFace > &faces, double &d_max, double &d_min)
 Calculate the maximum and the minimum normal curvature for a shell.
bool IsSpaceNear (const MbCurve3D &curv, const MbSurface &surf, bool surfExt, double mEps, double devSag=5.0 *Math::deviateSag)
 Determine whether a curve is close to a surface.
bool SurfaceFace (const MbSurface &surface, SPtr< MbFace > &face)
 Create the face on the base of arbitrary surface.
MbGridSpaceGrid (const MbPlacement3D &place, const MbPlanarGrid &planarGrid, bool exact=false)
 Creating a three-dimensional grid on a two-dimensional grid.
MbItemReplaceByInstance (MbItem *item, double ratioThreashhold=-1.0, bool makeCopy=false)
 Replace an item by an instance if the length from it's bounding box to the world origin is greater than it's diagonal by specified factor.
MbResultType FloodFillResult (MbSolid &vessel, MbeCopyMode sameShell, const MbSweptData &bungData, const MbCartPoint3D &origin, const MbSNameMaker &names, MbSolid *&result)
 The construction of a "flood fill" volume located between the inner surface of the vessel and the bounding surface or body.
void CalculatePolygon (const MbCurve &curve, const MbPlacement3D &plane, double sag, MbPolygon3D &polygon)
 Calculation of polygon of curve.
MbResultType SmoothPhantom (const MbSolid &solid, RPArray< MbCurveEdge > &edges, const SmoothValues &params, RPArray< MbSurface > &result)
 Create phantom surfaces of fillet/chamfer.
MbResultType SmoothPhantom (const MbSolid &solid, SArray< MbEdgeFunction > &edges, const SmoothValues &params, RPArray< MbSurface > &result)
 Create phantom surfaces of fillet/chamfer.
MbResultType SmoothSequence (const MbSolid &solid, RPArray< MbCurveEdge > &edges, const SmoothValues &params, bool createSurfaces, RPArray< MbEdgeSequence > &sequences, RPArray< MbSurface > &result)
MbResultType SmoothSequence (const MbSolid &solid, SArray< MbEdgeFunction > &edges, const SmoothValues &params, bool createSurfaces, RPArray< MbEdgeSequence > &sequences, RPArray< MbSurface > &result)
bool TruncatDirection (const MbCurveEdge &truncatingEdge, MbPlacement3D &dirPlace)
 Determine a phantom direction of truncation.
MbResultType SmoothPositionData (const MbSolid &solid, RPArray< MbCurveEdge > &edges, const SmoothValues &params, RPArray< MbPositionData > &result, double edgeParam=0.5, const MbCurveEdge *dimensionEdge=NULL)
 Create support points of fillet/chamfer operation sizes.
MbResultType SmoothPositionData (const MbSolid &solid, SArray< MbEdgeFunction > &edges, const SmoothValues &params, RPArray< MbPositionData > &result, double edgeParam=0.5, const MbCurveEdge *dimensionEdge=NULL)
 Create support points of fillet/chamfer operation sizes.
template<class Type >
SArray< Type > * CreateArray (size_t cnt, MbResultType &res)
 Create an array.
template<class Type >
bool ReserveArray (SArray< Type > &arr, size_t n, MbResultType &res)
 Allocate memory in the array for n elements.
template<class Type >
bool AddItem (SArray< Type > &arr, const Type &item, MbResultType &res)
 Add an element to the array.
bool LineLineNearestParams (const MbCartPoint3D &origin1, const MbVector3D &direction1, const MbCartPoint3D &origin2, const MbVector3D &direction2, double &t1, double &t2)
 Determine the parameters of the nearest points of lines.
double LineLineNearestPoints (const MbLine3D &line1, const MbLine3D &line2, MbCartPoint3D &p1, MbCartPoint3D &p2)
 Determination of the distance between the nearest points p1 and p2 of lines line1 and line2.
bool LineLineNearestParams (const MbCartPoint &origin1, const MbVector &direction1, const MbCartPoint &origin2, const MbVector &direction2, double &t1, double &t2)
 Determine the parameters of the nearest points of lines.
double AreaSign (const MbCurve3D &curve, const MbAxis3D &axis, const MbVector3D &direction, bool rotation)
 Compute the area of a curve projection onto a virtual coordinate plane.
bool GetLineSegmentNURBSSurface (MbSurface &surf, RPArray< MbCurve3D > &segments)
 Create a characteristic polyline of a spline surface.
double GetFilletRadiusDelta (const MbCurve3D &filletCurve, double radius, bool sense, double len, const MbCurve3D &curve1, double t1, const MbCurve3D &curve2, double t2)
 Determine the radius variation while translating the middle point of the fillet curve.
double GetFilletRadiusDelta (const MbCurve3D &filletCurve, double radius, bool sense, double len)
 Determine the radius variation while translating the middle point of the fillet curve.
void RadiusDimension3D (const MbSurface &surface, const MbCartPoint &surface_uv, MbPlaneCurve *&plane_curve)
 Construct a circle or an arc for radial dimension of surface.
void RadiusDimension3D (const MbSurface &surface, const MbCartPoint3D &point, MbPlaneCurve *&plane_curve)
 Construct a circle or an arc for radial dimension of surface.
void RadiusDimension3D (const MbSurface &surface, const MbPlacement3D &place, MbPlaneCurve *&plane_curve)
 Construct a circle or an arc for radial dimension of surface.
bool IsPossibleRadiusDimension3D (const MbSurface &surface)
 Whether a circle or an arc can be constructed for radial dimension of surface.
MbeSurfAxesMeasureRes SurfAxesDistAngle (const MbSurface &surface1, bool sameSense1, const MbSurface &surface2, bool sameSense2, MbAxis3D &axis1, bool &exist1, MbAxis3D &axis2, bool &exist2, MbCartPoint3D &p1, MbCartPoint3D &p2, double &angle, double &distance, double angleEps=ANGLE_EPSILON)
 Distance between axes of surfaces.
MbeProcessState MinMaxDistances (const MbSurface &surface1, ptrdiff_t u1cnt, ptrdiff_t v1cnt, const MbVector3D *dir, const MbeSenseValue &orient, bool useEqualDistances, const MbSurface &surface2, ptrdiff_t &nMin, ptrdiff_t &nMax, MbMinMaxSurfDists &allResults, MbMinMaxSurfDists &minResults, MbMinMaxSurfDists &maxResults, IProgressIndicator *indicator=NULL)
 Extreme distances between surfaces.
bool MaxDistance (const MbCartPoint3D &pnt, const MbCurve3D &curv, double &t, double &distance)
 Find the maximal distance between a point and a curve.
bool MaxDistance (const MbCurve3D &curv1, const MbCurve3D &curv2, double &t1, double &t2, double &distance)
 Find the maximal distance between two curves.
bool MaxDistance (const MbCartPoint3D &pnt, const MbSurface &surf, MbCartPoint &uv, double &distance)
 Find the maximal distance between a point and a surface.
bool MaxDistance (const MbCurve3D &curv, const MbSurface &surf, double &t, MbCartPoint &uv, double &distance)
 Find the maximal distance between a curve and a surface.
bool MaxDistance (const MbSurface &surf1, const MbSurface &surf2, MbCartPoint &uv1, MbCartPoint &uv2, double &distance)
 Find the maximal distance between two surfaces.
bool MaxDistance (const MbAxis3D &axis, const MbCurve3D &curve, double &param, double &distance)
 Find the maximal distance between an axis an a curve.
void GetEpsilonBound (const MbCurve3D &crv, double t, MbCartPoint3D &pnt, double &eps, VERSION version)
 Calculate the tolerance of a point on a curve.
bool IsIncidence (const MbCurve3D &crv1, int t1, const MbCurve3D &crv2, int t2, VERSION version)
 Check the coincidence of two vertices.
double GetNearCurveParam (const MbCurve3D &curve, const MbCartPoint3D &point, const MbVector3D &direct)
 Get the curve parameter which is nearest to the ray.
double GetNearCurveParam (const MbCurve3D &curve, const MbCartPoint3D &point, const MbVector3D &direct, bool setOnSide, bool &isBegin)
 Get the curve parameter which is nearest to the ray.
MbCurveGetFlatCurve (const MbCurve3D &curve3D, const MbMatrix3D &into, MbRect1D *pRgn=NULL, VERSION version=Math::DefaultMathVersion())
 Construct a planar projection of a curve.
MbCurveGetFlatProjection (const MbCurve3D &curve3D, const MbPlacement3D &place, VERSION version=Math::DefaultMathVersion())
 Get a planar projection of a curve.
void SolidMixUp (MbSolid &solid, uint mixUpModes)
 A stress test for solid.
void CompareSolids (const MbSolid &solid1, const MbSolid &solid2, CompareItemsResult &compareResult, bool compareMassInertia, bool checkSense)
 Two solids comparison.
bool CompareSolidsByNames (const MbSolid &before, const MbSolid &after, CompareItemsResult &compareResult)
 Comparison of two solids by name.
bool IsDegeneratedCurve (const MbCurve3D &curve, double eps)
 (lenEps is an )
bool CheckShellClosure (const MbFaceShell &shell, bool checkChangedOnly=false)
 Check of solid's shell for closedness.
bool CheckSolidClosure (const MbSolid &solid)
 Check of solid's shell for closedness.
template<class Edges >
bool CheckBoundaryEdges (const Edges &allEdges, Edges *boundaryEdges)
 Search for the boundary edges of a closed shell.
bool CheckBadEdges (const RPArray< MbCurveEdge > &allEdges, RPArray< MbCurveEdge > *badEdges)
 Search of incorrect edges.
template<class Vertices >
bool CheckInexactVertices (const Vertices &vertArr, double mAcc, Vertices *inexactVerts)
 Search for inexact vertices.
bool IsInexactEdge (const MbCurveEdge &edge, double mMaxAcc)
 Is the curve of intersection edges inaccurate.
template<class Edges >
bool CheckInexactEdges (const Edges &allEdges, double mAcc, Edges *inexactEdges)
 Approximate search of inexact edges.
void CheckBadFaces (const MbFaceShell &shell, bool &areIdenticalBaseSurfaces, bool &areBadFacePointers)
 Check of substrates and pointers to faces.
bool CheckLoopsInterposition (const MbFace &face)
 Check interposition of face loops.
bool CheckLoopConnection (const MbSurface &surf, bool faceSense, const MbLoop &loop, double &lengthTolerance, double *paramTolerance, RPArray< const MbOrientedEdge > *badConnectedEdges=NULL, RPArray< const MbCurveEdge > *badVertexEdges=NULL)
 Check for connectivity of loop edges.
bool CheckLoopConnection (const MbFace &face, const MbLoop &loop, double &lengthTolerance, double *paramTolerance, RPArray< const MbOrientedEdge > *badConnectedEdges=NULL, RPArray< const MbCurveEdge > *badVertexEdges=NULL)
 Check for connectivity of a loop edges.
bool FindLoopsSelfIntersections (const MbFace &face, const MbSNameMaker &nameMaker, bool checkInsideEdges, std::vector< std::pair< c3d::IndicesPair, MbCartPoint3D > > *loopPnts)
 Find face loops with self-intersections.
bool CheckFacesConnection (const RPArray< MbFace > &faces)
 Check for connectivity of faces 'faces'.
bool FindOverlappingSimilarFaces (const MbFaceShell &srcShell, const MbFaceShell &dstShell, bool sameNormals, std::vector< c3d::IndicesPair > &simPairs)
 Find "parent" faces of a derived shell in the initial shell.
bool FindFacesEdgesCarriers (const c3d::ConstEdgesVector &edges, const MbFaceShell &shell, bool sameNormals, std::vector< c3d::IndicesPair > &efPairs)
 Find faces edges of the derived shell are based on.
bool GetDepthToFace (const MbFace &face, const MbPlacement3D &place, HoleValues &pars, double &depth)
 Determine the hole depth "to the specified surface" while creating a shell with a hole.
template<class Point >
bool c3d::EqualPoints (const Point &p1, const Point &p2, double xEpsilon, double yEpsilon, double zEpsilon)
 Check points for equality.
template<class Vector >
bool c3d::EqualVectors (const Vector &p1, const Vector &p2, double xEpsilon, double yEpsilon, double zEpsilon)
 Check equality of vectors with given tolerance.
bool LineTriangleIntersect (const MbFloatPoint3D &tri_v0, const MbFloatPoint3D &tri_v1, const MbFloatPoint3D &tri_v2, const MbFloatAxis3D &line, float epsilon, MbFloatPoint3D &crossPnt, float &tRes)
 Find the intersection of a line with a triangle.
bool LineGridIntersect (const MbGrid &grid, const MbFloatAxis3D &line, MbFloatPoint3D &crossPnt, float &tRes)
 Find the intersection of a straight line with the triangulation.
bool LineGridIntersect (const MbGrid &grid, const MbFloatAxis3D &line, const MbPlacement3D &cutPlace, MbFloatPoint3D &crossPnt, float &tRes)
 Find the intersection of a straight line with the triangulation.
bool LineGridIntersect (const MbGrid &grid, const MbFloatAxis3D &line, const std::vector< MbPlacement3D > &cutPlaces, MbFloatPoint3D &crossPnt, float &tRes)
 Find the intersection of a straight line with the triangulation.
bool LineGridIntersect (const MbGrid &grid, const MbFloatAxis3D &line, float &tRes)
 Find the intersection of a straight line with the triangulation.
float LineToGridEdgeDistanceSquared (const MbGrid &grid, size_t edgeInd, const MbFloatAxis3D &line, float delta, float &tRes)
 Calculate squared distance from a line to a polygon.
float LineToGridEdgeDistanceSquared (const MbGrid &grid, size_t edgeInd, const MbFloatAxis3D &line, const MbFloatVector3D &vDelta, MbFloatVector3D &vRes, float &tRes)
 Calculate squared distance from a line to a polygon.
float LineToSegmentDistanceSquared (const MbFloatPoint3D &seg_base, const MbFloatPoint3D &seg_end, const MbFloatAxis3D &line, float &tRes)
 Calculate squared distance from straight line to segment of polygon.
float LineToSegmentDistanceSquared (const MbFloatPoint3D &seg_base, const MbFloatPoint3D &seg_end, const MbFloatAxis3D &line, MbFloatVector3D &vRes, float &tRes)
 Calculate squared distance from straight line to segment of polygon.
float LineToPolyDistanceSquared (const MbPolygon3D &poly, const MbFloatAxis3D &line, float delta, MbFloatPoint3D &nearestPoint, float &tRes)
 Calculate squared distance from a line to a polygon.
float LineToPolyDistanceSquared (const MbPolygon3D &poly, const MbFloatAxis3D &line, float delta, const MbPlacement3D &cutPlace, MbFloatPoint3D &nearestPoint, float &tRes)
 Calculate squared distance from a line to a polygon.
float LineToPolyDistanceSquared (const MbPolygon3D &poly, const MbFloatAxis3D &line, float delta, const std::vector< MbPlacement3D > &cutPlaces, MbFloatPoint3D &nearestPoint, float &tRes)
 Calculate squared distance from a line to a polygon.
template<class Double , class Point , class Vector , class Axis >
Double LineToPointDistance (const Axis &line, const Point &to, Double &tRes)
 Calculate the distance from a line to a point.
template<class Double , class Point , class Vector , class Axis , class Placement >
Double LineToPointDistance (const Axis &line, const Point &to, const Placement &cutPlace, Double &tRes)
 Calculate the distance from a line to a point.
bool CreatePartSolidIndices (const MbSolid &solid, const SArray< MbPartSolidData > &partInfo, MbPartSolidIndices &partIndices)
 Create indices of the parts of the solid.
bool CreateElevationParam (const MbCurve3D &crvThis, const MbCurve3D &spine, MbCartPoint3D &wcThis, double &ct, MbVector3D *tau)
 Create parameter for specified curve.
bool CreateElevationParams (RPArray< MbCurve3D > &uCurves, bool vcls, const MbCurve3D &spine, SArray< double > &vParams, SArray< MbCartPoint3D > *tiePnts)
 Fill array of v-parameters and weight centers of given curves.
bool CreateLoftedParams (const RPArray< MbCurve3D > &uCurves, bool vcls, SArray< double > &vParams, SArray< MbCartPoint3D > *tiePnts, VERSION version)
 Fill array of v-parameters and weight centers of given curves.
double LinePlaneNearestPoints (const MbLine3D &line1, const MbPlane &plane2, MbCartPoint3D &p1, MbCartPoint3D &p2)
 Intersection or distance between infinite line and infinite plane.
MbLine3DPlanesIntersection (const MbPlane &plane1, const MbPlane &plane2)
 Intersection of two infinite planes.
bool DefineThroughPointsParams (ptrdiff_t degree, bool closed, const Array2< MbCartPoint3D > &points, bool alongLines, MbeSplineParamType spType, SArray< double > &params)
 Determine a parametric distribution of points for the construction of NURBS surface passing through these points.
bool DefineThroughPointsParams (ptrdiff_t degree, bool closed, const Array2< MbCartPoint3D > &points, bool alongLines, ptrdiff_t rowInd, MbeSplineParamType spType, SArray< double > &params)
 Determine a parametric distribution of points for the construction of NURBS surface passing through these points.
void SetMainName (MbName &name, SimpleName mainName, bool addOldMainName)
 Set main name.
void GetEdges (const RPArray< MbFace > &faceSet, RPArray< MbCurveEdge > &edges)
 Get a set of edges.

Enumeration Type Documentation

The result of measurement of dimension and angle between surfaces.

Enumerator:
samr_SurfSurf_Failed 

An error is occurred while working with surfaces.

samr_AxisSurf_Failed 

An error is occurred while working with axis and surface.

samr_AxisAxis_Failed 

An error is occurred while working with axes.

samr_Undefined 

Failed or didn't measured.

samr_AxisAxis_Coaxial 

Axes are coincident.

samr_AxisAxis_Parallel 

Axes are parallel.

samr_AxisAxis_Intersecting 

Axes are crossed.

samr_AxisAxis_Distant 

Axes are located at a distance.

samr_AxisSurf_Colinear 

The axis lies on the surface.

samr_AxisSurf_Parallel 

The axis is parallel to the surface.

samr_AxisSurf_Intersecting 

The axis crosses the surface.

samr_AxisSurf_Distant 

The axis is located at a distance from the surface.

samr_SurfSurf_Colinear 

One surface lies on another one.

samr_SurfSurf_Parallel 

Surfaces are parallel.

samr_SurfSurf_Intersecting 

Surfaces are intersecting inside domain.

Ways of shell components "mixing".

Enumerator:
smm_FacesReorder 

A change of faces order in array.

smm_LoopsReorder 

A change of loops order in faces (internal only).

smm_LoopsBegReset 

A change of first edge in loops of faces.

smm_EdgesRedirection 

A change of edges directions in loops of faces.

smm_EdgesSection 

Splitting of edges by vertex insertion.


Function Documentation

bool IsMultiShell ( const MbFaceShell shell,
bool  checkNesting = true 
)

Check if the closed shell can be subdivided into separate parts with inclusion analysis.

Parameters:
[in]shell- The initial shell.
Returns:
Returns 'true' if the shell consists of several parts.
size_t DetachShells ( MbFaceShell shell,
RPArray< MbFaceShell > &  parts,
bool  sort 
)

Separate parts from a shell without inclusion analysis. If 'sort' == 'true', the greatest part of the shell will remain in the initial shell, separated parts will be collected in array 'parts' sorted by bounding box size in descending order.

Parameters:
[in]shell- The initial shell.
[out]parts- The shells separated from 'shell'.
[in]sort- If 'sort' == true, the parts separated from the initial shell will be sorted by bounding box size in descending order.
Returns:
Returns number of shells in 'parts'.
size_t CreateShells ( MbFaceShell shell,
RPArray< MbFaceShell > &  parts 
)

Separate parts from a shell without inclusion analysis. The initial shell always remains unchangeable. If the initial shell is decomposed, all the parts are put into array 'parts'.

Parameters:
[in]shell- The initial shell.
[out]parts- The shells separated from 'shell'.
Returns:
Returns number of shells in 'parts'.
bool UnifyOwnComplanarFaces ( MbFaceShell shell,
const MbSNameMaker nameMaker,
bool  checkBaseSurfaces 
)

Unite complanar faces of a shell and validate the shell.

Parameters:
[in]shell- A shell to be modified.
[in]nameMaker- An object defining a name of the operation.
[in]checkBaseSurfaces- Find and eliminate common underlying surfaces of faces
Returns:
Returns 'true' if the shell has been successfully modified.
bool CheckIdenticalBaseSufaces ( MbFaceShell shell)

Find and eliminate common underlying surfaces of a shell faces.

Parameters:
[in]shell- A shell to be modified.
Returns:
Returns 'true' if the shell has been modified.
void FacePropagate ( MbeFacePropagation  fp,
RPArray< MbFace > &  face_set,
const MbVector3D dir 
)

Capture the faces in one of methods of propagation in connected shell.

Parameters:
[in]fp- A method of capturing the faces.
[in,out]face_set- A set of faces.
[in]dir- A direction of inclination.
Warning:
An auxillary function of operation DraftSolid.
void MouldCavitySolids ( RPArray< MbSolid > &  solids,
MbCartPoint3D fixedPoint,
double  deltaX,
double  deltaY,
double  deltaZ 
)

Scale cavities of a mold relative to a fixed point.

Parameters:
[in,out]solids- The solids to be modified.
[in]fixedPoint- The fixed point of scaling.
[in]deltaX- Relative increment of size in X-direction.
[in]deltaY- Relative increment of size in Y-direction.
[in]deltaZ- Relative increment of size in Z-direction.
bool IsSolidsIntersection ( const MbSolid solid1,
const MbSolid solid2,
const MbSNameMaker snMaker 
)

Check if solids intersect each other without definition of intersection type
(check until the first intersection is detected).

Parameters:
[in]solid1- The first solid.
[in]solid2- The second solid.
Returns:
Returns 'true' if at least one intersection is detected.
bool IsSolidsIntersection ( const MbSolid solid1,
const MbMatrix3D matr1,
const MbSolid solid2,
const MbMatrix3D matr2,
bool  checkTangent,
RPArray< MbIntersectionData > &  intData 
)

Check intersection of solids in an assembly.

Parameters:
[in]solid1- The first solid in local coordinate system (LCS).
[in]matr1- Matrix of transformation to the global coordinate system (GCS).
[in]solid2- The second solid in LCS.
[in]matr2- Matrix of transformation to GCS.
[in]checkTangent- Consider tangencies as intersections.
[out]intData- Information about two solids intersection.
Returns:
Returns 'true' if at least one intersection is detected.
void GetDistanceToSurface ( const MbPlacement3D pl,
const MbCurve curve,
const MbSurface surf,
double &  lPlus,
double &  lMinus 
)

Find the distances from a contour on a plane to a surface.
A forward direction is a direction of Z-axis of two-dimensional curve coordinate system.
The distance in a forward direction is found if the value is nonnegative.
The distance in a backward direction is found if the value is nonpositive.

Parameters:
[in]pl- A coordinate system of two-dimensional curve.
[in]curve- A two-dimensional curve.
[in]surf- A surface to measure the distances up to.
[out]lPlus- The distance in a forward direction.
[out]lMinus- The distance in a backward direction.
void GetDistanceToCube ( const MbSurface surface,
const MbVector3D direction,
const MbCurve curve,
const MbCube cube,
double &  lPlus,
double &  lMinus,
MbResultType resType 
)

Find the distances from a contour on a surface to the bounding box of a shell.
The distance in a forward direction is found if the value is nonnegative.
The distance in a backward direction is found if the value is nonpositive.

Parameters:
[in]surface- A surface that contains the two-dimensional curve.
[in]direction- A direction of the distance calculation (an extrusion direction).
[in]curve- A two-dimensional curve on surface 'surface'.
[in]cube- The bounding box of the shell.
[out]lPlus- The distance in a forward direction.
[out]lMinus- The distance in a backward direction.
[out]resType- Operation result code.
void GetDistanceToCube ( const MbSurface surface,
const MbVector3D direction,
const RPArray< MbCurve > &  curves,
const MbCube cube,
double &  lPlus,
double &  lMinus,
MbResultType resType 
)

Find the distances from curves on a surface to the bounding box of a shell.
The distance in a forward direction is found if the value is nonnegative.
The distance in a backward direction is found if the value is nonpositive.

Parameters:
[in]surface- A surface that contains two-dimensional curves.
[in]direction- A direction of the distance calculation (an extrusion direction).
[in]curves- A set of two-dimensional curves on the surface 'surface'.
[in]cube- The bounding box of the shell.
[out]lPlus- The distance in a forward direction.
[out]lMinus- The distance in a backward direction.
[out]resType- Operation result code.
bool GetDistanceToCube ( const MbPlacement3D pl,
const MbFaceShell shell,
double &  dPlus,
double &  dMinus,
bool  findMax = true 
)

Find the distances from a plane to the bounding box of a shell.
The distance in a forward direction is found if the value is nonnegative.
The distance in a backward direction is found if the value is nonpositive.
Calculation of the distance relative to the local coordinate system is used.
If a plane coordinate system is out of the bounding box,
then if the flag 'findMax' is set to 'true', the maximal distance to bounding box is calculated.

Parameters:
[in]pl- The plane coordinate system.
[in]shell- A target shell.
[out]dPlus- The distance in a forward direction.
[out]dMinus- The distance in a backward direction.
[in]findMax- The maximal distance to bounding box is to be calculated.
Returns:
Returns 'true' if at least one of the distances has been found.
void GetRangeToCubeOrSurface ( const MbCurve3D curve,
const MbVector3D direction,
const MbAxis3D axis,
const bool  rotation,
bool  operationDirection,
const MbCube toCube,
const MbSurface toSurface,
SweptValuesAndSides params,
MbResultType resType 
)

Find the distances/angles from a contour to a bounding box or to a surface.
The inclination in two directions is to be considered.

Parameters:
[in]curve- A curve.
[in]direction- An extrusion direction.
[in]axis- Rotation axis.
[in]rotation- Rotation (true) or extrusion (false)
[in]operationDirection- Forward (true) or backward (false)
[in]toCube- Up to a cube if the pointer is not null.
[in]toSurface- Up to a surface if the pointer is not null.
[in,out]params,:The following parameters should be defined:
params.side1.rake - The inclination in direction 'direction' (for a planar generatrix).
params.side2.rake - The inclination in direction opposite to 'direction' (for a planar generatrix).
params.thikness1 - Wall thickness in forward direction. (in the positive direction of the normal of an object (a face, a surface, the plane of a curve)).
params.thikness2 - The wall thickness in the backward direction.
The output parameters:
params.side1.scalarValue - The extrusion distance in the direction 'direction' (if 'operationDirection' == true), else in the opposite direction.
params.side2.scalarValue - The extrusion distance in the direction opposite to 'direction' (if 'operationDirection' == true), else in the forward direction.
[out]resType- Operation result code.
bool GetNearestSolid ( const MbPlacement3D pl,
RPArray< MbContour > &  c,
MbSweptLayout::Direction  direction,
RPArray< MbSolid > &  solids,
size_t &  nPlus,
size_t &  nMinus 
)

Find the nearest solids while extruding with option 'up to the nearest object'.
Returns the numbers (nPlus and nMinus) of nearest solids on the positive and the negative sides of the sketch.

Parameters:
[in]pl- A local coordinate system.
[in]c- An array of two-dimensional contours.
[in]direction- An extrusion direction.
[in]solids- A target set of solids.
[out]nPlus- The number of the nearest solid in the positive direction.
[out]nMinus- The number of the nearest solid in the negative direction.
Returns:
Returns 'true' if a solid is found in at least one of directions.
bool GetNearestSolid ( RPArray< MbCurve3D > &  curves,
const MbVector3D direction,
MbSweptLayout::Direction  operationDirection,
RPArray< MbSolid > &  solids,
size_t &  nPlus,
size_t &  nMinus 
)

Find the nearest solids while extruding with option 'up to the nearest object'.
returns numbers (nPlus and nMinus) of the nearest solids in the forward and the backward direction.

Parameters:
[in]curves- A set of curves.
[in]direction- An extrusion direction.
[in]operationDirection- Parameters of extrusion 'up to the nearest object'.
[in]solids- A target set of solids.
[out]nPlus- The number of the nearest solid in the positive direction.
[out]nMinus- The number of the nearest solid in the negative direction.
Returns:
Returns 'true' if a solid is found in at least one of directions.
MbResultType CheckNurbsShell ( const NurbsSurfaceValues params,
const MbSolid nsSolid,
IProgressIndicator progBar 
)

Check the correctness of a shell or a solid that consists of NURBS surfaces.

Parameters:
[in]params- Initial parameters of the operation.
[in]nsSolid- A solid - the result of the operation.
[in]progBar- A progress indicator of the operation.
Returns:
Returns rt_Success if the solid has successfully passed the validation.
Warning:
A checking function of the operation NurbsSurfacesShell.
bool AddTruncatingSketch ( const MbPlacement3D sketchPlace,
RPArray< MbCurve > &  sketchCurves,
RPArray< MbSpaceItem > &  items 
)

Add a sketch to the array of truncating objects by creation of spatial curves.

Parameters:
[in]sketchPlace- A local coordinate system of two-dimensional sketch.
[in]sketchCurves- Two-dimensional curves of the sketch.
[out]items- The output array of spatial objects.
Returns:
- Returns 'true' if elements are added into output array.
Warning:
Auxillary function of the operation TruncateShell.
void AddTruncatingCurve ( MbCurve3D curve,
RPArray< MbSpaceItem > &  items 
)

Add a curve to the array of truncating objects (with decomposition of the curve if necessary).

Parameters:
[in]curve- A space curve.
[out]items- The output array of spatial objects.
Warning:
Auxillary function of the operation TruncateShell.
void CheckShellingFaces ( const SweptValues params,
RPArray< MbFace > &  faces 
)

Check the correctness of shelling faces set for creation of a thin-walled solid.
Removes unsuitable for the operation faces from the array.

Parameters:
[in]params- Parameters of a thin wall.
[in,out]faces- An array of shelling faces of the solid.
Warning:
An auxillary function of thin-walled solid construction operation.
bool ProjectVectorOn ( const MbVector3D v3d,
const MbSurface surface,
const MbCartPoint p2d,
MbVector v2d 
)

Calculate x and y components of projection of a space vector defined at a point on a surface.

Parameters:
[in]v3d- A space vector.
[in]surface- A surface.
[in]p2d- A parametric point on the surface.
[out]v2d- The projection of the space vector on the surface.
Returns:
- Returns 'true' if the vector projection has been successfully calculated.
MbSurface* GetExtendedSurfaceCopy ( MbCube gabarit,
const MbSurface surf,
VERSION  version 
)

Extend a surface to a given bounding box for cutting a solid.

Parameters:
[in,out]gabarit- A desirable bounding box of the extended surface.
[in]surf- The initial surface.
[in]version- The version of construction.
Returns:
- Returns the extended surface if it has been successfully created.
void CreateFaces ( const MbPlacement3D place,
const MbContour contour,
const MbVector3D der,
bool  sense,
const MbSNameMaker n,
RPArray< MbFace > &  initFaces,
bool  useAddCount = false 
)

Create a set of faces with topology of a prism.

Parameters:
[in]place- A local coordinate system (LCS).
[in]contour- A two-dimensional curve in LCS.
[in]der- An extrusion direction.
[in]sense- An orientation of the output array of faces as a closed shell.
[in]n- An object for naming the new objects.
[in,out]initFaces- The array of created faces.
[in]useAddCount- The number of input faces initFaces is to be used for naming the new faces.
void GetAutoReference ( MbFaceShell shell,
const MbPlacement3D place,
const MbContour contour,
ptrdiff_t  index,
RibValues::ExtrudeSide side,
MbCartPoint3D origin,
MbVector3D dir3D 
)

Estimate parameters of extrusion for creating a rib.

Parameters:
[in]shell- A target shell.
[in]place- A local coordinate system of the contour.
[in]contour- A two-dimensional contour.
[in]index- A number of the contour segment.
[out]side- The side to place the rib on.
[out]origin- A point.
[out]dir3D- A vector.
Warning:
An auxillary function of the operation RibSolid.
MbCurve* GetProjCurveOnSurface ( const MbSurfaceIntersectionCurve intersectCurve,
bool  first 
)

Create a curve in the parameter space of a surface. The projection curve can be created if necessary.
If it is not required to create the projection curve, returns a copy of two-dimensional curve in the parameter space of the surface.
The curve is to be deleted after use.

Parameters:
[in]intersectCurve- The intersection curve
[in]first- True - The first surface, false - the second surface.
Returns:
Returns the curve if it has been successfully created.
bool IsSameSpineDirection ( const MbCurve3D curve,
VERSION  srcVersion,
VERSION  dstVersion 
)

Check if the spine direction can be preserved between versions without any change of the shape.

Parameters:
[in]curve- The spine curve.
[in]srcVersion- The current version.
[in]dstVersion- The target version.
bool CalculateExtremeCurvatures ( const MbSurface surf,
double &  d_max,
double &  d_min,
SArray< MbCartPoint > &  maxPoints,
SArray< MbCartPoint > &  minPoints 
)

Calculate extremals of normal curvature of surface surf.

Parameters:
[in]surf- A surface.
[out]d_max- The maximum of the normal curvature.
[out]d_min- The minimum of the normal curvature.
[out]maxPoints- The array of points for which the normal curvature is maximal.
[out]minPoints- The array of points for which the normal curvature is minimal.
Returns:
Returns true if the extremals of normal curvature have been successfully found.
Warning:
Implementation of the function is incomplete.
bool FacesMaxMinCurvature ( const RPArray< MbFace > &  faces,
double &  d_max,
double &  d_min 
)

Calculate the maximum and the minimum normal curvature for a shell that consists of faces 'faces'.

Parameters:
[in]faces- Faces of the shell.
[out]d_max- The maximum of the normal curvature.
[out]d_min- The minimum of the normal curvature.
Returns:
Returns true if the extremals of normal curvature have been successfully found.
Warning:
Implementation of the function is incomplete.
bool IsSpaceNear ( const MbCurve3D curv,
const MbSurface surf,
bool  surfExt,
double  mEps,
double  devSag = 5.0 *Math::deviateSag 
)

Determine whether a curve is close to a surface within the given tolerance.
The check uses sample points of curves obtained by sampling with maximal turning angle.

Parameters:
[in]curv- A curve.
[in]surf- A surface.
[in]surfExt- Perform the check for the extended surface.
[in]mEps- The metric proximity tolerance.
[in]devSag- The maximal turning angle for sampling the curve.
Returns:
Returns 'true' if the curve is close to the surface.
bool SurfaceFace ( const MbSurface surface,
SPtr< MbFace > &  face 
)

Create the face on the base of arbitrary surface without selfintersections.

Parameters:
[in]surface- A surface.
[out]face- The face.
Returns:
Returns 'true' if the face was created.
MbGrid* SpaceGrid ( const MbPlacement3D place,
const MbPlanarGrid planarGrid,
bool  exact = false 
)

Creating a three-dimensional grid on a two-dimensional grid.

Parameters:
[in]place- Local coordinate system in three dimensional space.
[out]planarGrid- Triangulation of a two-dimensional region.
Returns:
Returns 'true' if the face was created.
MbItem* ReplaceByInstance ( MbItem item,
double  ratioThreashhold = -1.0,
bool  makeCopy = false 
)

Обрабатываются только объекты, не являющиеся вставками. Нулевое или отрицательное значение параметра ratioThreashhold запрещает преобразование. The item or it's replica is moved bey the vector from the origin of the world to the center of the item's bounding box, then put in the instance, providing the displacement by the reversed vector. Function processes objects of all types except for instances. Null or negative value of the ratioThreashhold parameter blocks the transformation.

Parameters:
[out]item- Processabele item.
[in]ratioThreashhold- The replacement threashhold value of the ratio of the bounding box's center to the origin of the world to it's diagonal length.
[in]makeCopy- Is the copy of the object nust be transformed.
Returns:
Returns instance of object.
MbResultType FloodFillResult ( MbSolid vessel,
MbeCopyMode  sameShell,
const MbSweptData bungData,
const MbCartPoint3D origin,
const MbSNameMaker names,
MbSolid *&  result 
)

The body, an additional surface or an additional body and the coordinates of the source are fed to the input. On the output we get the volume, constructed from the source and bounded from all sides by the shell of the body and by additional objects.

Parameters:
[in]vessel- The vessel.
[in]sameShell- Whether to copy the vessel.
[in]bungData- The surface of the level or body of the bung.
[in]origin- The point inside the vessel.
[in]names- An object defining a name of the operation.
[out]result- The resultant solid.
Returns:
Returns operation result code.
void CalculatePolygon ( const MbCurve curve,
const MbPlacement3D plane,
double  sag,
MbPolygon3D polygon 
)

Calculation of three-dimensional polygon of two-dimensional curve located in the XOY-plane of a local coordinate system.

Parameters:
[in]curve- A two-dimensional curve.
[in]plane- Local coordinate system.
[in]sag- Maximum allowable deviation of polygon from the original by sag or by angle between neighboring elements.
[out]polygon- Calculated polygon.
MbResultType SmoothPhantom ( const MbSolid solid,
RPArray< MbCurveEdge > &  edges,
const SmoothValues params,
RPArray< MbSurface > &  result 
)

Create phantom surfaces of fillet/chamfer and store them in the container 'surfaces'.
After finish working with the surfaces they should be deleted.

Parameters:
[in]solid- The initial solid.
[in]edges- An array of edges for fillet/chamfer.
[in]params- Parameters of the fillet/chamfer operation.
[out]result- The fillet/chamfer surfaces.
Returns:
Returns the creation result code.
MbResultType SmoothPhantom ( const MbSolid solid,
SArray< MbEdgeFunction > &  edges,
const SmoothValues params,
RPArray< MbSurface > &  result 
)

Create phantom surfaces of fillet/chamfer and store them in the container 'surfaces'.
After finish working with the surfaces they should be deleted.

Parameters:
[in]solid- The initial solid.
[in]edges- An array of edges and radius laws for fillet/chamfer.
[in]params- Parameters of the fillet/chamfer operation.
[out]result- The fillet/chamfer surfaces.
Returns:
Returns the creation result code.
MbResultType SmoothSequence ( const MbSolid solid,
RPArray< MbCurveEdge > &  edges,
const SmoothValues params,
bool  createSurfaces,
RPArray< MbEdgeSequence > &  sequences,
RPArray< MbSurface > &  result 
)
Parameters:
[in]solid- The initial solid.
[in]edges- An array of edges for fillet/chamfer.
[in]params- Parameters of the fillet/chamfer operation.
[in]createSurfaces- Create a fillet/chamfer surfaces for phantom.
[out]sequences- Sequence of smooth mating edges.
[out]result- The fillet/chamfer surfaces.
Returns:
MbResultType SmoothSequence ( const MbSolid solid,
SArray< MbEdgeFunction > &  edges,
const SmoothValues params,
bool  createSurfaces,
RPArray< MbEdgeSequence > &  sequences,
RPArray< MbSurface > &  result 
)
Parameters:
[in]solid- The initial solid.
[in]edges- An array of edges and radius laws for fillet/chamfer.
[in]params- Parameters of the fillet/chamfer operation.
[in]createSurfaces- Create a fillet/chamfer surfaces for phantom.
[out]sequences- Sequence of smooth mating edges.
[out]result- The fillet/chamfer surfaces.
Returns:
bool TruncatDirection ( const MbCurveEdge truncatingEdge,
MbPlacement3D dirPlace 
)

Determine a phantom direction of truncation given the truncated face of the initial solid.

Parameters:
[in]truncatingEdge- An edge of truncated face of the initial solid.
[in]dirPlace- A coordinate system of truncation direction (Z-axis is a truncation direction).
Returns:
Returns true if the direction has been successfully determined.
MbResultType SmoothPositionData ( const MbSolid solid,
RPArray< MbCurveEdge > &  edges,
const SmoothValues params,
RPArray< MbPositionData > &  result,
double  edgeParam = 0.5,
const MbCurveEdge dimensionEdge = NULL 
)

Create support points of fillet/chamfer operation sizes and store them in container 'data'.
The first two points lie on the fillet/chamfer surface boundary.

Parameters:
[in]solid- The initial solid.
[in]edges- An array of edges for fillet/chamfer.
[in]params- Parameters of the fillet/chamfer operation.
[out]result- Support points of the fillet/chamfer operation sizes.
[in]edgeParam- The parameter of a point on the edge (0 <= edgeParam <= 1).
[in]dimensionEdge- The edge on which the support points are to be created.
Returns:
Returns the creation result code.
MbResultType SmoothPositionData ( const MbSolid solid,
SArray< MbEdgeFunction > &  edges,
const SmoothValues params,
RPArray< MbPositionData > &  result,
double  edgeParam = 0.5,
const MbCurveEdge dimensionEdge = NULL 
)

Create support points of fillet/chamfer operation sizes and store them in container 'data'.
The first two points lie on the fillet/chamfer surface boundary.

Parameters:
[in]solid- The initial solid.
[in]edges- The array of specified edges for fillet/chamfer and radius laws for fillet/chamfer.
[in]params- Parameters of the fillet/chamfer operation.
[out]result- Support points of the fillet/chamfer operation sizes.
[in]edgeParam- The parameter of a point on the edge (0 <= edgeParam <= 1).
[in]dimensionEdge- The edge on which the support points are to be created.
Returns:
Returns the creation result code.
template<class Type >
SArray<Type>* CreateArray ( size_t  cnt,
MbResultType res 
) [inline]

Create an array with memory allocation control.

Parameters:
[in]cnt- Number of elements in the array.
[out]res- The operation result.
Returns:
Returns an array of elements if it has been created, otherwise returns NULL.
template<class Type >
bool ReserveArray ( SArray< Type > &  arr,
size_t  n,
MbResultType res 
) [inline]

Allocate memory in the array for n elements with memory allocation control.

Parameters:
[in,out]arr- An array.
[in]n- Number of elements for allocation.
[out]res- The operation result.
Returns:
Returns true if the memory has been successfully allocated.
template<class Type >
bool AddItem ( SArray< Type > &  arr,
const Type &  item,
MbResultType res 
) [inline]

Add an element to the array with memory allocation control.

Parameters:
[in,out]arr- An array.
[in]item- The element to add.
[out]res- The operation result.
Returns:
Returns true if the element has been successfully added.
bool LineLineNearestParams ( const MbCartPoint3D origin1,
const MbVector3D direction1,
const MbCartPoint3D origin2,
const MbVector3D direction2,
double &  t1,
double &  t2 
)

Determine the parameters of the nearest points of lines which are defined by the given point and direction vector.

Parameters:
[in]origin1,direction1- A point and direction of the first line.
[in]origin2,direction2- A point and direction of the second line.
[out]t1- Parameter on the first line.
[out]t2- Parameter on the second line.
Returns:
Returns true, if lines are not parallel.
double LineLineNearestPoints ( const MbLine3D line1,
const MbLine3D line2,
MbCartPoint3D p1,
MbCartPoint3D p2 
)

Determination of the distance between the nearest points p1 and p2 of lines line1 and line2

bool LineLineNearestParams ( const MbCartPoint origin1,
const MbVector direction1,
const MbCartPoint origin2,
const MbVector direction2,
double &  t1,
double &  t2 
)

Determine the parameters of the nearest points of lines which are defined by the given point and direction vector.

Parameters:
[in]origin1,direction1- A point and direction of the first line.
[in]origin2,direction2- A point and direction of the second line.
[out]t1- Parameter on the first line.
[out]t2- Parameter on the second line.
Returns:
Returns true, if lines are not parallel.
double AreaSign ( const MbCurve3D curve,
const MbAxis3D axis,
const MbVector3D direction,
bool  rotation 
)

Compute the area of a curve projection onto a virtual coordinate plane
to determine the generating curve orientation in the shell of extrusion and revolution.
Parameters 'direction' and 'axis' determine the extrusion direction and the rotation axis, and parameter 'rotation' determines the operation type:

  • extrusion, the area of projection onto the plane XOY is computed,
  • revolution, the area of "projection" to the "plane" ROZ is computed. For an open curve "enclosure by a segment" is considered.
    Parameters:
    [in]curve- The curve.
    [in]axis- Rotation axis.
    [in]direction- An extrusion direction.
    [in]rotation- Revolution (true) or extrusion (false).
    Returns:
    Returns the projection area.
    Warning:
    An auxiliary function of operations ExtrusionSolid, RevolutionSolid, ExtrusionResult and RevolutionResult.
bool GetLineSegmentNURBSSurface ( MbSurface surf,
RPArray< MbCurve3D > &  segments 
)

Create a characteristic polyline of a spline surface.
The function accepts the surfaces of types st_SplineSurface, st_HermitSurface, st_TriBezierSurface, st_TriSplineSurface.

Parameters:
[in]surf- The surface.
[out]segments- The characteristic polyline.
Returns:
Returns true - if the characteristic polyline is obtained.
double GetFilletRadiusDelta ( const MbCurve3D filletCurve,
double  radius,
bool  sense,
double  len,
const MbCurve3D curve1,
double  t1,
const MbCurve3D curve2,
double  t2 
)

Determine the radius variation while translating the middle point of the fillet curve
from the centre on distance 'len' (signed).

Parameters:
[in]filletCurve- The fillet curve.
[in]radius- The radius of fillet.
[in]sense- A direction of the middle point of the fillet curve translation.
[in]len- A value of translation of the fillet curve middle point.
[in]curve1- The first curve to fillet.
[in]t1- The parameter of fillet curve start point on the first curve.
[in]curve2- The second curve to fillet.
[in]t2- The parameter of fillet curve end point on the second curve.
double GetFilletRadiusDelta ( const MbCurve3D filletCurve,
double  radius,
bool  sense,
double  len 
)

Determine the radius variation while translating the middle point of the fillet curve
from the centre on distance 'len' (signed).

Parameters:
[in]filletCurve- The fillet curve.
[in]radius- The radius of fillet.
[in]sense- A direction of the middle point of the fillet curve translation.
[in]len- A value of translation of the fillet curve middle point.
void RadiusDimension3D ( const MbSurface surface,
const MbCartPoint surface_uv,
MbPlaneCurve *&  plane_curve 
)

Construction is performed by the given parametric point on surface. A surface should have a circular parametric line u=const or v=const. The enumeration of surfaces which have a parametric line u=const or v=const. MbCylinderSurface v=const,
MbConeSurface v=const,
MbSphereSurface u=const,
MbTorusSurface u=const,
MbLoftedSurface v=const,
MbElevationSurface v=const,
MbExtrusionSurface v=const,
MbRevolutionSurface u=const,
MbEvolutionSurface u=const,
MbExactionSurface u=const.

Parameters:
[in]surface- The initial surface.
[in]surface_uv- Coordinates of the initial point on surface.
[out]plane_curve- The required circle or an arc.
void RadiusDimension3D ( const MbSurface surface,
const MbCartPoint3D point,
MbPlaneCurve *&  plane_curve 
)

Construction is performed by the given spatial point. A surface should have a circular parametric line u=const or v=const. The enumeration of surfaces which have a parametric line u=const or v=const. MbCylinderSurface v=const,
MbConeSurface v=const,
MbSphereSurface u=const,
MbTorusSurface u=const,
MbLoftedSurface v=const,
MbElevationSurface v=const,
MbExtrusionSurface v=const,
MbRevolutionSurface u=const,
MbEvolutionSurface u=const,
MbExactionSurface u=const.

Parameters:
[in]surface- The initial surface.
[in]point- Space coordinates of the initial point.
[out]plane_curve- The required circle or an arc.
void RadiusDimension3D ( const MbSurface surface,
const MbPlacement3D place,
MbPlaneCurve *&  plane_curve 
)

Construction is performed by the given placement. A surface should have a circular parametric line u=const or v=const. The enumeration of surfaces with a parametric line u=const or v=const. MbCylinderSurface v=const,
MbConeSurface v=const,
MbSphereSurface u=const,
MbTorusSurface u=const,
MbLoftedSurface v=const,
MbElevationSurface v=const,
MbExtrusionSurface v=const,
MbRevolutionSurface u=const,
MbEvolutionSurface u=const,
MbExactionSurface u=const.

Parameters:
[in]surface- The initial surface.
[in]place- The initial placement.
[out]plane_curve- The required circle or an arc.
bool IsPossibleRadiusDimension3D ( const MbSurface surface)

It can be constructed if the type of a base surface is st_CylinderSurface or st_ConeSurface, or st_SphereSurface, or st_TorusSurface.

Parameters:
[in]surface- The initial surface.
Returns:
true if it can be constructed.
MbeSurfAxesMeasureRes SurfAxesDistAngle ( const MbSurface surface1,
bool  sameSense1,
const MbSurface surface2,
bool  sameSense2,
MbAxis3D axis1,
bool &  exist1,
MbAxis3D axis2,
bool &  exist2,
MbCartPoint3D p1,
MbCartPoint3D p2,
double &  angle,
double &  distance,
double  angleEps = ANGLE_EPSILON 
)

Calculate distance between axes of revolution surfaces or distance between revolution surface and planar surface.

Parameters:
[in]surface1,sameSense1- The first surface and its direction.
[in]surface2,sameSense2- The second surface and its direction.
[out]axis1,exist1- The axis of the first surface and the flag of its existence.
[out]axis2,exist2- The axis of the second surface and the flag of its existence.
[out]p1- The point on the first axis or surface.
[out]p2- The point on the second axis or surface.
[out]angle- The angle between axes or between an axis and a surface.
[out]distance- Minimal distance between axes.
[in]angle- The angle accuracy.
Returns:
The variant of the obtained measurement or the variant of error.
MbeProcessState MinMaxDistances ( const MbSurface surface1,
ptrdiff_t  u1cnt,
ptrdiff_t  v1cnt,
const MbVector3D dir,
const MbeSenseValue orient,
bool  useEqualDistances,
const MbSurface surface2,
ptrdiff_t &  nMin,
ptrdiff_t &  nMax,
MbMinMaxSurfDists allResults,
MbMinMaxSurfDists minResults,
MbMinMaxSurfDists maxResults,
IProgressIndicator indicator = NULL 
)

Extreme distances between surfaces by mesh on the first surface, measurements are performed in a given direction (if the vector is set) or by normals of the first surface.

Parameters:
[in]surface1- The first surface.
[in]u1cnt- The number of points by u (the first surface)
[in]v1cnt- The number of points by v (the first surface)
[in]dir- The vector of direction (if not set then by the normal).
[in]orient- Direction of search.
[in]useEqualDistances- Whether to use the equal distances.
[in]surface2- The second surface.
[in,out]nMin- The number of registrated minimums.
[in,out]nMax- The number of registrated maximums.
[out]allResults- All results.
[out]minResults- Results-minimums.
[out]maxResults- Results-maximums.
[in,out]indicator- Interface-indicator of the execution process.
Returns:
Returns the result of measurement (obtained, not obtained, or the process has been aborted).
bool MaxDistance ( const MbCartPoint3D pnt,
const MbCurve3D curv,
double &  t,
double &  distance 
)

The maximal distance between a point and a curve.

Parameters:
[in]pnt- The initial point.
[in]curv- The initial curve.
[out]t- The parameter on a curve where the required distance is reached.
[out]distance- The required distance.
Returns:
true if the maximal distance has been found.
bool MaxDistance ( const MbCurve3D curv1,
const MbCurve3D curv2,
double &  t1,
double &  t2,
double &  distance 
)

Find the maximal distance between two curves.

Parameters:
[in]curv1,curv2- The initial curves.
[out]t1,t2- The parameters on curves where the required distance is reached.
[out]distance- The required distance.
Returns:
true if the maximal distance has been found.
bool MaxDistance ( const MbCartPoint3D pnt,
const MbSurface surf,
MbCartPoint uv,
double &  distance 
)

Find the maximal distance between a point and a surface.

Parameters:
[in]pnt- The initial point.
[in]surf- The initial surface.
[out]uv- The point parameters on a surface where the required distance is reached.
[out]distance- The required distance.
Returns:
true if the maximal distance has been found.
bool MaxDistance ( const MbCurve3D curv,
const MbSurface surf,
double &  t,
MbCartPoint uv,
double &  distance 
)

Find the maximal distance between a curve and a surface.

Parameters:
[in]curv- The initial curve.
[in]surf- The initial surface.
[out]t- The parameter on a curve where the required distance is reached.
[out]uv- The point parameters on a surface where the required distance is reached.
[out]distance- The required distance.
Returns:
true if the maximal distance has been found.
bool MaxDistance ( const MbSurface surf1,
const MbSurface surf2,
MbCartPoint uv1,
MbCartPoint uv2,
double &  distance 
)

Find the maximal distance between two surfaces.

Parameters:
[in]surf1,surf2- The initial surfaces.
[out]uv1,uv2- The parameters on surfaces where the required distance is reached.
[out]distance- The required distance.
Returns:
true if the maximal distance has been found.
bool MaxDistance ( const MbAxis3D axis,
const MbCurve3D curve,
double &  param,
double &  distance 
)

Find the maximal distance between an axis and a curve perpendicularly to an axis.

Parameters:
[in]axis- The initial axis.
[in]curve- The initial curve.
[out]param- The parameter on a curve where the required distance is reached.
[out]distance- The required distance.
Returns:
true if the maximal distance has been found.
void GetEpsilonBound ( const MbCurve3D crv,
double  t,
MbCartPoint3D pnt,
double &  eps,
VERSION  version 
)

The tolerance is a sphere bounding a point.

Parameters:
[in]crv- The initial curve.
[in]t- A coordinate of a point on a curve.
[out]pnt- A three-dimensional coordinate of a point on a curve.
[out]eps- The tolerance of a point.
[in]version- Version.
bool IsIncidence ( const MbCurve3D crv1,
int  t1,
const MbCurve3D crv2,
int  t2,
VERSION  version 
)

Curves are considered as edges.

Parameters:
[in]crv1- The curve 1.
[in]t1- If 't1' equals 1 then the end of a curve is considered, the start of a curve is considered otherwise.
[in]crv2- The curve 2.
[in]t2- If 't2' equals 1 then the end of a curve is considered, the start of a curve is considered otherwise.
[in]version- Version.
Returns:
true if vertices are coincident.
double GetNearCurveParam ( const MbCurve3D curve,
const MbCartPoint3D point,
const MbVector3D direct 
)

The ray is passed through the point 'point' in the direction of the vector 'direct'

Parameters:
[in]curve- The initial curve.
[in]point- The point of a ray.
[in]direct- The vector of ray direction.
Returns:
The nearest curve parameter to the ray.
double GetNearCurveParam ( const MbCurve3D curve,
const MbCartPoint3D point,
const MbVector3D direct,
bool  setOnSide,
bool &  isBegin 
)

The ray is passed through the point 'point' in the direction of the vector 'direct'.
if 'setOnSide' equals true then the parameter of curve should be set for the nearest end and the flag 'isBegin' determines the proximity to the curve start (true) or to the curve end (false).

Parameters:
[in]curve- The initial curve.
[in]point- The point of a ray.
[in]direct- The vector of a ray direction.
[in]setOnSide- Whether the parameter should be equated to the nearest end of a curve.
[out]isBegin- if true than the parameter is located closer to the start of a curve.
if false than the parameter is located closer to the end of a curve.
Returns:
The nearest curve parameter to the ray.
MbCurve* GetFlatCurve ( const MbCurve3D curve3D,
const MbMatrix3D into,
MbRect1D pRgn = NULL,
VERSION  version = Math::DefaultMathVersion() 
)

Construct a two-dimensional curve - projection of a curve to the plane XY of a coordinate system which is set by the matrix of transformation. Two-dimensional cubic splines of Hermite ('MbHermit') and cubic splines ('MbCubicSpline') are replaced by NURBS ('MbNurbs').

Parameters:
[in]curve3D- The initial curve.
[in]into- The transformation matrix from the global coordinate system into a plane of view.
[in]pRgn- The parametric region of a curve for the creation of a projection.
[in]version- The version of construction.
Returns:
The pointer to the obtained curve.
MbCurve* GetFlatProjection ( const MbCurve3D curve3D,
const MbPlacement3D place,
VERSION  version = Math::DefaultMathVersion() 
)

A curve is projected onto a given plane.

Parameters:
[in]curve3D- The initial curve.
[in]place- The plane the curve should be projected on.
Returns:
The pointer to the obtained projection curve.
void SolidMixUp ( MbSolid solid,
uint  mixUpModes 
)

A stress test for solid, shell components mixing.

Parameters:
[in]solid- The tested solid.
[in]mixUpModes- Flags from SolidMixUpMode.
void CompareSolids ( const MbSolid solid1,
const MbSolid solid2,
CompareItemsResult compareResult,
bool  compareMassInertia,
bool  checkSense 
)

Two solids comparison.

Parameters:
[in]solid1- The first solid.
[in]solid2- The second solid.
[in]compareMassInertia- Check mass-inertial properties at first.
[in]checkSense- Check orientations coincidence of edges and faces.
[out]compareResult- The result of comparison between two solids.
bool CompareSolidsByNames ( const MbSolid before,
const MbSolid after,
CompareItemsResult compareResult 
)

Comparison of two solids by name.

Parameters:
[in]before- The solid before construction.
[in]after- The solid after construction.
[out]compareResult- The result of comparison between two solids.
bool IsDegeneratedCurve ( const MbCurve3D curve,
double  eps 
)

Check for the curve degeneration in three-dimensional space.

Check for the curve degeneration in three-dimensional space.

Parameters:
[in]curve- Curve.
[in]eps- Indistinguishable metric domain.
Returns:
Returns the state of the curve degeneration.
bool CheckShellClosure ( const MbFaceShell shell,
bool  checkChangedOnly = false 
)

Check of solid's shell for closedness.

Parameters:
[in]shell- A shell.
[in]checkChangedOnly- Only modified faces of a shell are to be checked.
Returns:
Returns the state of shell closedness.
bool CheckSolidClosure ( const MbSolid solid)

Check of solid's shell for closedness.

template<class Edges >
bool CheckBoundaryEdges ( const Edges &  allEdges,
Edges *  boundaryEdges 
)

Search for the boundary edges of a closed shell.

Parameters:
[in]allEdges- Set of edges of a shell.
[in]boundaryEdges- Set of boundary edges.
Returns:
Returns true if at least one boundary edges is found.
bool CheckBadEdges ( const RPArray< MbCurveEdge > &  allEdges,
RPArray< MbCurveEdge > *  badEdges 
)

Search of incorrect edges. Does not look for the boundary edges of a closed shell.
Use function CheckBoundaryEdges for searching for boundary edges.

Parameters:
[in]allEdges- Set of edges of a shell.
[in]badEdges- Set of incorrect edges.
Returns:
Returns true if at least one incorrect edge is found.
template<class Vertices >
bool CheckInexactVertices ( const Vertices &  vertArr,
double  mAcc,
Vertices *  inexactVerts 
)

Search for inexact vertices of a shell.

Parameters:
[in]vertArr- Set of shell's vertices.
[in]mAcc- Accuracy of inexact vertices filtration.
[in]inexactVerts- Set of inexact vertices.
Returns:
Returns true if at least one inexact vertex is found.
bool IsInexactEdge ( const MbCurveEdge edge,
double  mMaxAcc 
)

Is the curve of intersection edges inaccurate (estimated). \ n

Parameters:
[in]edge- The edge of the shell.
[in]mMaxAcc- Accuracy selection inaccurate ribs.
Returns:
Returns true, if the edge is inaccurate.
template<class Edges >
bool CheckInexactEdges ( const Edges &  allEdges,
double  mAcc,
Edges *  inexactEdges 
)

Approximate search of inexact edges of a shell.

Parameters:
[in]allEdges- Set of edges of a shell.
[in]mAcc- Accuracy of inexact edges filtration.
[in]inexactEdges- Set of inexact edges.
Returns:
Returns true if at least one inexact edge is found.
void CheckBadFaces ( const MbFaceShell shell,
bool &  areIdenticalBaseSurfaces,
bool &  areBadFacePointers 
)

Check of substrates and pointers to faces of a shell.

Parameters:
[in]shell- A shell to check.
[out]areIdenticalBaseSurfaces- Whether there are common substrates.
[out]areBadFacePointers- Whether there are invalid pointers to neighboring faces.
bool CheckLoopsInterposition ( const MbFace face)

Check interposition of face loops.

Parameters:
[in]face- Face.
Returns:
Returns true if interposition of loops and their orientations are correct.
bool CheckLoopConnection ( const MbSurface surf,
bool  faceSense,
const MbLoop loop,
double &  lengthTolerance,
double *  paramTolerance,
RPArray< const MbOrientedEdge > *  badConnectedEdges = NULL,
RPArray< const MbCurveEdge > *  badVertexEdges = NULL 
)

Check for connectivity of loop edges. Returns the maximal metric and parametric (optionally) tolerances of the loop construction.

Parameters:
[in]surf- The base surface of a face that contains the loop under test.
[in]loop- Face loop.
[out]lengthTolerance- The maximal metric value of a gap between edges.
[out]paramTolerance- The maximal parametric value of a gap between edges.
[out]badConnectedEdges- Edges with bad connectivity.
[out]badVertexEdges- Edges with incorrect vertices.
Returns:
Returns true if the connectivity is good.
bool CheckLoopConnection ( const MbFace face,
const MbLoop loop,
double &  lengthTolerance,
double *  paramTolerance,
RPArray< const MbOrientedEdge > *  badConnectedEdges = NULL,
RPArray< const MbCurveEdge > *  badVertexEdges = NULL 
)

Check for connectivity of a loop edges. Returns the maximal metric and parametric (optionally) tolerances of the loop construction.

Parameters:
[in]face- Face containing the loop under test.
[in]loop- Face loop.
[out]lengthTolerance- The maximal metric value of a gap between edges.
[out]paramTolerance- The maximal parametric value of a gap between edges.
[out]badConnectedEdges- Edges with bad connectivity.
[out]badVertexEdges- Edges with incorrect vertices.
Returns:
Returns true if the connectivity is good.
bool FindLoopsSelfIntersections ( const MbFace face,
const MbSNameMaker nameMaker,
bool  checkInsideEdges,
std::vector< std::pair< c3d::IndicesPair, MbCartPoint3D > > *  loopPnts 
)

Find face loops with self-intersections. Returns the found loops with self-intersections.

Parameters:
[in]face- Face containing loops under test.
[in]nameMaker- An object for naming the new objects.
[in]checkInsideEdges- Find edges with self-intersections inside.
[out]loopPnts- Points of self-intersecting loops and the numbers of loops.
Returns:
Returns true if the self-intersection has been found.
bool CheckFacesConnection ( const RPArray< MbFace > &  faces)

Check for topological connectivity of faces 'faces'.

Parameters:
[in]faces- Set of faces under check.
Returns:
Returns true if all the faces are topologically connected.
bool FindOverlappingSimilarFaces ( const MbFaceShell srcShell,
const MbFaceShell dstShell,
bool  sameNormals,
std::vector< c3d::IndicesPair > &  simPairs 
)

Find "parent" faces of a derived shell in the initial shell by geometric search of similar faces with overlapping. Flag sameNormals is to be set to false if the initial shell was involved in the boolean subtraction of solids as a second operand.

Parameters:
[in]srcShell- The source shell.
[in]dstShell- The derived shell.
[in]sameNormals- Search with the same (true) or the opposite (false) direction of normals.
[out]simPairs- Set of correspondences - indices of faces in the initial and the derived shells.
Returns:
Returns true if at least one correspondence is found.
bool FindFacesEdgesCarriers ( const c3d::ConstEdgesVector &  edges,
const MbFaceShell shell,
bool  sameNormals,
std::vector< c3d::IndicesPair > &  efPairs 
)

Determine on which faces of the initial shell edges of the derived shell are based on by the geometric search. Search of the correspondence is performed by surfaces from faces the edge refers to, but not by surfaces from the intersection curve of the edge. Flag sameNormals is to be set to false if the initial shell was involved in the boolean subtraction of solids as a second operand.

Parameters:
[in]edges- Edges of an arbitrary shell.
[in]shell- The source shell.
[in]sameNormals- Search with the same (true) or the opposite (false) direction of normals.
[out]efPairs- Set of correspondence - indices of edges in the input array and numbers of faces in the input shell.
Returns:
Returns true if at least one correspondence is found.
bool GetDepthToFace ( const MbFace face,
const MbPlacement3D place,
HoleValues pars,
double &  depth 
)

Determine the hole depth "to the specified surface" while creating a shell with a hole. The hole depth "to the surface" is defined by the distance between the fasten point of the hole on the location surface and a point of intersection of the hole axis with the given surface limiting the depth.

Parameters:
[in]face- A face terminating the depth.
[in]place- Plane of the hole.
[in]pars- The hole parameters.
[out]depth- Depth.
Returns:
True if the distance was found
false - if the axis does not intersect the face
template<class Point >
bool c3d::EqualPoints ( const Point &  p1,
const Point &  p2,
double  xEpsilon,
double  yEpsilon,
double  zEpsilon 
)
Parameters:
[in]p1- The first cartesian point.
[in]p2- The second cartesian point.
[in]xEpsilon- The metric tolerance of points coincidence along the X axis.
[in]yEpsilon- The metric tolerance of points coincidence along the Y axis.
[in]zEpsilon- The metric tolerance of points coincidence along the Y axis.
Returns:
True if points coincide,
false otherwise.
template<class Vector >
bool c3d::EqualVectors ( const Vector &  p1,
const Vector &  p2,
double  xEpsilon,
double  yEpsilon,
double  zEpsilon 
)

Check equality of vectors with given tolerance. Vectors are equal if their coordinates differs less than given tolerance.

Parameters:
[in]p1- The first vector.
[in]p2- The second vector.
[in]xEpsilon- The metric tolerance of points coincidence along the X axis.
[in]yEpsilon- The metric tolerance of points coincidence along the Y axis.
[in]zEpsilon- The metric tolerance of points coincidence along the Y axis.
Returns:
Returns true if the vectors are equal.
bool LineTriangleIntersect ( const MbFloatPoint3D tri_v0,
const MbFloatPoint3D tri_v1,
const MbFloatPoint3D tri_v2,
const MbFloatAxis3D line,
float  epsilon,
MbFloatPoint3D crossPnt,
float &  tRes 
)

Find the intersection of a line with a triangle defined by its vertices. If a straight line crosses the triangle, then the value of parameter of a straight line at the intersection point is determined.

Parameters:
[in]tri_v0- The first vertex of the triangle.
[in]tri_v1- The second vertex of the triangle.
[in]tri_v2- The third vertex of the triangle.
[in]line- A straight line to calculate the intersection of triangle with.
[in]epsilon- A spatial tolerance.
[out]crossPnt- The intersection point.
[out]tRes- Parameter of the intersection point on the line.
Returns:
Whether the line intersects the triangle (true in case of line and triangle intersection).
bool LineGridIntersect ( const MbGrid grid,
const MbFloatAxis3D line,
MbFloatPoint3D crossPnt,
float &  tRes 
)

For all the triangles the intersection with the straight line is determined and the minimum value of the intersection point parameter on the secant straight line is calculated.

Parameters:
[in]grid- Triangulation.
[in]line- Straight line to calculate the intersection of triangulation with.
[out]crossPnt- The intersection point.
[out]tRes- Parameter of the intersection point on the line.
Returns:
Whether the intersection is found (true if success).
bool LineGridIntersect ( const MbGrid grid,
const MbFloatAxis3D line,
const MbPlacement3D cutPlace,
MbFloatPoint3D crossPnt,
float &  tRes 
)

For all the triangles the intersection with the straight line is determined and the minimum value of the intersection point parameter on the secant straight line is calculated.

Parameters:
[in]grid- Triangulation.
[in]line- Straight line to calculate the intersection of triangulation with.
[in]cutPlace- Cutting plane.
[out]crossPnt- The intersection point.
[out]tRes- Parameter of the intersection point on the line.
Returns:
Whether the intersection is found (true if success).
bool LineGridIntersect ( const MbGrid grid,
const MbFloatAxis3D line,
const std::vector< MbPlacement3D > &  cutPlaces,
MbFloatPoint3D crossPnt,
float &  tRes 
)

For all the triangles the intersection with the straight line is determined and the minimum value of the intersection point parameter on the secant straight line is calculated.

Parameters:
[in]grid- Triangulation.
[in]line- Straight line to calculate the intersection of triangulation with.
[in]cutPlaces- Cutting planes.
[out]crossPnt- The intersection point.
[out]tRes- Parameter of the intersection point on the line.
Returns:
Whether the intersection is found (true if success).
bool LineGridIntersect ( const MbGrid grid,
const MbFloatAxis3D line,
float &  tRes 
)

For all the triangles the intersection with the straight line is determined and the minimum value of the intersection point parameter on the secant straight line is calculated.

Parameters:
[in]grid- Triangulation.
[in]line- Straight line to calculate the intersection of triangulation with.
[out]tRes- Parameter of the intersection point on the line.
Returns:
Whether the intersection is found (true if success).
float LineToGridEdgeDistanceSquared ( const MbGrid grid,
size_t  edgeInd,
const MbFloatAxis3D line,
float  delta,
float &  tRes 
)

During calculation of squared distance from a line to a polygon the distance from each segment of the polygon is checked until the first getting to 'delta' neighborhood. Returns the value of the nearest point parameter on tRes line and the squared distance from this point to a segment of the polygon.

Parameters:
[in]grid- Triangulation.
[in]edgeInd- Index of polygon to check.
[in]line- Line to calculate the distance to.
[in]delta- Neighborhood radius around the line.
[out]tRes- The value of parameter of the nearest point on the line.
Returns:
Squared distance between the nearest point and the line.
float LineToGridEdgeDistanceSquared ( const MbGrid grid,
size_t  edgeInd,
const MbFloatAxis3D line,
const MbFloatVector3D vDelta,
MbFloatVector3D vRes,
float &  tRes 
)

During calculation of squared distance from a line to a polygon the distance from each segment of the polygon is checked until the first getting to 'delta' neighborhood. Returns the value of the nearest point parameter on the line, the vector between the nearest points and the squared distance from this point to a segment of the polygon.

Parameters:
[in]grid- Triangulation.
[in]edgeInd- Index of polygon to check.
[in]line- Line to calculate the distance to.
[in]vDelta- The dimensions of the area around the line.
[out]vRes- Vector from the nearest point on the line to the nearest point on the polygon.
[out]tRes- The value of parameter of the nearest point on the line.
Returns:
Squared distance between the nearest point and the line.
float LineToSegmentDistanceSquared ( const MbFloatPoint3D seg_base,
const MbFloatPoint3D seg_end,
const MbFloatAxis3D line,
float &  tRes 
)

Calculate squared distance from straight line to segment of polygon defined by start and end points.
Returns value of parameter of nearest point on tRes line and squared distance from this point to the segment.
Returns value of parameter of nearest point on tRes line and squared distance from this point to the segment.

Parameters:
[in]seg_base- Start point of the segment.
[in]seg_end- Start point of the segment.
[in]line- Straight line to calculate the distance to.
[out]tRes- Value of the nearest point parameter on the line.
Returns:
Squared distance between the nearest point and the line.
float LineToSegmentDistanceSquared ( const MbFloatPoint3D seg_base,
const MbFloatPoint3D seg_end,
const MbFloatAxis3D line,
MbFloatVector3D vRes,
float &  tRes 
)

Calculate squared distance from straight line to segment of polygon defined by start and end points.
Returns the value of parameter of nearest point on the line, the vector between the nearest points and the squared distance from this point to the segment.

Parameters:
[in]seg_base- Start point of the segment.
[in]seg_end- Start point of the segment.
[in]line- Straight line to calculate the distance to.
[out]vRes- Vector from the nearest point on the line to the nearest point on the segment.
[out]tRes- Value of the nearest point parameter on the line.
Returns:
Squared distance between the nearest point and the line.
float LineToPolyDistanceSquared ( const MbPolygon3D poly,
const MbFloatAxis3D line,
float  delta,
MbFloatPoint3D nearestPoint,
float &  tRes 
)

During calculation of squared distance from a line to a polygon the distance from each segment of the polygon is checked until the first getting to 'delta' neighborhood. Returns the value of the nearest point parameter on tRes line and the squared distance from this point to a segment of the polygon.

Parameters:
[in]poly- Polygon to check.
[in]line- Line to calculate the distance to.
[in]delta- Neighborhood radius around the line.
[out]nearestPoint- The nearest point of the polygon.
[out]tRes- The value of parameter of the nearest point on the line.
Returns:
Squared distance between the nearest point and the line.
float LineToPolyDistanceSquared ( const MbPolygon3D poly,
const MbFloatAxis3D line,
float  delta,
const MbPlacement3D cutPlace,
MbFloatPoint3D nearestPoint,
float &  tRes 
)

During calculation of squared distance from a line to a polygon the distance from each segment of the polygon is checked until the first getting to 'delta' neighborhood. Returns the value of the nearest point parameter on tRes line and the squared distance from this point to a segment of the polygon.

Parameters:
[in]poly- Polygon to check.
[in]line- Line to calculate the distance to.
[in]delta- Neighborhood radius around the line.
[in]cutPlace- Cutting plane.
[out]nearestPoint- The nearest point of the polygon.
[out]tRes- The value of parameter of the nearest point on the line.
Returns:
Squared distance between the nearest point and the line.
float LineToPolyDistanceSquared ( const MbPolygon3D poly,
const MbFloatAxis3D line,
float  delta,
const std::vector< MbPlacement3D > &  cutPlaces,
MbFloatPoint3D nearestPoint,
float &  tRes 
)

During calculation of squared distance from a line to a polygon the distance from each segment of the polygon is checked until the first getting to 'delta' neighborhood. Returns the value of the nearest point parameter on tRes line and the squared distance from this point to a segment of the polygon.

Parameters:
[in]poly- Polygon to check.
[in]line- Line to calculate the distance to.
[in]delta- Neighborhood radius around the line.
[in]cutPlaces- Cutting planes.
[out]nearestPoint- The nearest point of the polygon.
[out]tRes- The value of parameter of the nearest point on the line.
Returns:
Squared distance between the nearest point and the line.
template<class Double , class Point , class Vector , class Axis >
Double LineToPointDistance ( const Axis &  line,
const Point &  to,
Double &  tRes 
)

For correct calculating of the distance from a line to a point the line direction vector must be normalized.

Parameters:
[in]line- Line.
[in]to- Point.
[out]tRes- The value of parameter of the nearest point on the line.
Returns:
The distance from a point to a line.
template<class Double , class Point , class Vector , class Axis , class Placement >
Double LineToPointDistance ( const Axis &  line,
const Point &  to,
const Placement &  cutPlace,
Double &  tRes 
)

For correct calculating of the distance from a line to a point the line direction vector must be normalized.

Parameters:
[in]line- Line.
[in]to- Point.
[in]cutPlace- Cutting plane.
[out]tRes- The value of parameter of the nearest point on the line.
Returns:
The distance from a point to a line.
bool CreatePartSolidIndices ( const MbSolid solid,
const SArray< MbPartSolidData > &  partInfo,
MbPartSolidIndices partIndices 
)

When creating indices of solid parts it is assumed that the solid consists of parts. Information array must correspond to solid.

Parameters:
[in]solid- The initial solid is consisting of separate parts.
[in]partInfo- Information about the solid parts.
[out]partIndices- Index set of the parts of the solid.
Returns:
Whether indices of solid parts are created.
bool CreateElevationParam ( const MbCurve3D crvThis,
const MbCurve3D spine,
MbCartPoint3D wcThis,
double &  ct,
MbVector3D tau 
)

Profile curve should be planar. If guide curve intersects with plane of profile, then as parameter is used the coordinate along guide curve of intersection point of it with plane of profile which is nearest to center of mass of profile curve.
If guide curve not intersects with plane of profile, then as parameter is used the coordinate on guide curve of projection of center of mass of profile curve onto guide curve.

Parameters:
[in]crvThis- The profile curve.
[in]spine- The spine (guide) curve.
[in,out]wcThis- Center of mass of profile curve.
[in,out]ct- Required parameter.
[in,out]tau- Derivative of guide curve at point with 'ct' coordinate. If giving NULL to function, then derivative isn't calculated.
Returns:
True - if guide curve intersects with plane of profile, false - if not intersects.
bool CreateElevationParams ( RPArray< MbCurve3D > &  uCurves,
bool  vcls,
const MbCurve3D spine,
SArray< double > &  vParams,
SArray< MbCartPoint3D > *  tiePnts 
)

If all the profile curves are planar, then parameters are calculated by CreateElevationParam function. Otherwise parameter for each curve is calculated as coordinate along guide projection of center of mass of curve to guide.

Parameters:
[in]uCurves- Set of profile curves.
[in]vcls- Whether the surface is closed by parameter v.
[in]spine- The spine (guide) curve.
[in,out]vParams- Set of parameters.
[in,out]tiePnts- Set of centers of mass of profile curves. If giving NULL to function, then it isn't filled.
Returns:
True - if the array of parameters successfully created.
bool CreateLoftedParams ( const RPArray< MbCurve3D > &  uCurves,
bool  vcls,
SArray< double > &  vParams,
SArray< MbCartPoint3D > *  tiePnts,
VERSION  version 
)

If all the profile curves are planar, then parameters are calculated by CreateElevationParam function. Otherwise parameter for each curve is calculated as coordinate along guide projection of center of mass of curve to guide.

Parameters:
[in]uCurves- Set of profile curves.
[in]vcls- Whether the surface is closed by parameter v.
[in,out]vParams- Set of parameters.
[in,out]tiePnts- Set of centers of mass of profile curves. If giving NULL to function, then it isn't filled.
[in]version- Version.
Returns:
True - if the array of parameters successfully created.
double LinePlaneNearestPoints ( const MbLine3D line1,
const MbPlane plane2,
MbCartPoint3D p1,
MbCartPoint3D p2 
)

Intersection of infinite line and infinite plane.
or distance between infinite line and infinite plane.

Parameters:
[in]line1- Line
[in]plane2- Plane
[out]p1- Intersection point on curve
[out]p2- Intersection point on plane
Returns:
Distance between line and plane
MbLine3D* PlanesIntersection ( const MbPlane plane1,
const MbPlane plane2 
)

Intersection of two infinite planes

bool DefineThroughPointsParams ( ptrdiff_t  degree,
bool  closed,
const Array2< MbCartPoint3D > &  points,
bool  alongLines,
MbeSplineParamType  spType,
SArray< double > &  params 
)

Determine a parametric distribution of points for the construction of NURBS surface passing through these points. The parameter for which distribution of points is determined is set by the variable alongLines. (if true then there is a distribution by v, otherwise - by u). An average distribution by all rows is determined.

Parameters:
[in]degree- An order of a surface by the given parameter.
[in]closed- A closure of a surface by the given parameter.
[in]points- A matrix of points for which the parametric distribution should be determined.
[in]alongLines- Determines a parameter by which the distribution is sought (true - by v, false - by u).
[in]spType- The parameterization type of spline objects:
spt_Unstated - unspecified,
spt_EquallySpaced - uniform,
spt_ChordLength - by chord length (by distance between the points),
spt_Centripetal - centripetal (square root of the distance between the points).
[in]params- A set with the required distribution.
Returns:
True if the calculations were successfully performed..
bool DefineThroughPointsParams ( ptrdiff_t  degree,
bool  closed,
const Array2< MbCartPoint3D > &  points,
bool  alongLines,
ptrdiff_t  rowInd,
MbeSplineParamType  spType,
SArray< double > &  params 
)

Determine a parametric distribution of points for the construction of NURBS surface passing through these points. The parameter for which distribution of points is determined is set by the variable alongLines. (if true then there is a distribution by v, otherwise - by u).

Parameters:
[in]degree- An order of a surface by the given parameter.
[in]closed- A closure of a surface by the given parameter.
[in]points- A matrix of points for which the parametric distribution should be determined.
[in]alongLines- Determines a parameter by which the distribution is sought (true - by v, false - by u).
[in]rowInd- A row or a column by which the distribution is calculated.
[in]spType- The parameterization type of spline objects:
spt_Unstated - unspecified,
spt_EquallySpaced - uniform,
spt_ChordLength - by chord length (by distance between the points),
spt_Centripetal - centripetal (square root of the distance between the points).
[in]params- A set with the required distribution.
Returns:
True if the calculations were successfully performed..
void SetMainName ( MbName name,
SimpleName  mainName,
bool  addOldMainName 
) [inline]

Set the main name 'mainName' for the name 'name'.

Parameters:
[out]name- Name.
[in]mainName- The main name.
[in]addOldMainName- When it is true remember replaced main name in the copying index.
void GetEdges ( const RPArray< MbFace > &  faceSet,
RPArray< MbCurveEdge > &  edges 
)

Get a set of edges from a set of faces.

Parameters:
[in]faceSet- A set of faces.
[out]edges- A set of edges.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines