C3D Toolkit  Kernel - 109696, Vision - 2.4.0.76

C3D namespace declaration. More...

Classes

class  IEmbodimentNode
 Embodiments tree node. More...
 
class  IEmbodimentTree
 Embodiment Tree. More...
 
class  IModelTree
 Generic model tree. More...
 
class  IModelTreeNode
 Model tree node. More...
 
class  ItemAttrAnchor
 Data of Anchor attribute. More...
 
class  ItemAttrBool
 Data of Bool attribute. More...
 
class  ItemAttrChanged
 Data of Modification attribute. More...
 
class  ItemAttrColor
 Data of Color attribute. More...
 
class  ItemAttrDencity
 Data of Dencity attribute. More...
 
class  ItemAttrDouble
 Data of Double attribute. More...
 
class  ItemAttrEmbodiment
 Data of embodiment attribute. More...
 
class  ItemAttrIdentifier
 Data of Identifier attribute. More...
 
class  ItemAttrInt64
 Data of int64 attribute. More...
 
class  ItemAttrInteger
 Data of Integer attribute. More...
 
class  ItemAttrProductInfo
 Data of MbProductInfo attribute. More...
 
class  ItemAttrSelected
 Data of Selection attribute. More...
 
class  ItemAttrString
 Data of String attribute. More...
 
class  ItemAttrStyle
 Data of Style attribute. More...
 
class  ItemAttrUpdateStamp
 Data of Update timestamp attribute. More...
 
class  ItemAttrVisible
 Data of Visibility attribute. More...
 
class  ItemAttrWidth
 Data of Width attribute. More...
 
class  ItemDataBase
 A base class for user data of a tree node. More...
 
class  ItemDataBool
 Bool property. More...
 
class  ItemDataDouble
 Double property. More...
 
class  ItemDataInteger
 Integer property. More...
 
class  ItemDataString
 String property. More...
 
struct  LumpCompLess
 
class  MbEmbodimentNode
 Embodiments tree node. More...
 
struct  MbItemData
 Tree node data. More...
 
class  MbModelTree
 Tree of geometric model. More...
 
class  MbTreeNode
 Tree node. More...
 
class  UserDataMap
 A container for user data of a tree node. More...
 

Typedefs

typedef std::pair< size_t, size_t > IndicesPair
 Pair of non-negative integer indices.
 
typedef std::pair< ptrdiff_t, ptrdiff_t > NumbersPair
 Pair of integer numbers.
 
typedef std::pair< uint, uint > UintPair
 Pair of 32-bit non-negative integer indices.
 
typedef std::pair< bool, bool > BoolPair
 Bool pair.
 
typedef std::pair< double, double > DoublePair
 Pair of doubles.
 
typedef std::pair< IndicesPair, double > IndicesPairDouble
 A pair of indices and double.
 
typedef std::pair< double, IndicesPairDoubleIndicesPair
 Double and a pair of indices.
 
typedef std::pair< size_t, bool > IndexBool
 Index-double pair.
 
typedef std::pair< bool, size_t > BoolIndex
 Double-index pair.
 
typedef std::pair< size_t, double > IndexDouble
 Index-double pair.
 
typedef std::pair< double, size_t > DoubleIndex
 Double-index pair.
 
typedef std::pair< bool, double > FlagDouble
 Flag-double pair.
 
typedef std::pair< double, bool > DoubleFlag
 Double-flag pair.
 
typedef FlagDouble BoolDouble
 Flag-double pair.
 
typedef DoubleFlag DoubleBool
 Double-flag pair.
 
typedef std::vector< size_t > IndicesVector
 Vector of non-negative integer indices.
 
typedef std::vector< ptrdiff_t > NumbersVector
 Vector of integer numbers.
 
typedef std::vector< uint > UintVector
 Vector of 32-bit non-negative integer indices.
 
typedef std::vector< bool > BoolVector
 Bool vector.
 
typedef std::vector< double > DoubleVector
 Double vector.
 
typedef std::vector< IndicesPairIndicesPairsVector
 Vector of pairs of non-negative integer indices.
 
typedef std::vector< NumbersPairNumbersPairsVector
 Vector of pairs of integer indices.
 
typedef std::vector< DoublePairDoublePairsVector
 Vector of double pairs.
 
typedef std::set< size_t > IndicesSet
 Set of non-negative integer indices.
 
typedef std::set< ptrdiff_t > NumbersSet
 Set of integer numbers.
 
typedef std::set< uint > UintSet
 Set of 32-bit non-negative integer indices.
 
typedef std::pair< MbCartPoint3D, MbVector3DPointVector3D
 Pair point-vector.
 
typedef std::pair< MbCube *, size_t > CubePtrIndex
 Bounding box and index.
 
typedef std::pair< const MbCube *, size_t > ConstCubePtrIndex
 Bounding box and index.
 
typedef std::vector< CubePtrIndexCubesPtrIndices
 Vector of bounding boxes and indices.
 
typedef std::vector< ConstCubePtrIndexConstCubesPtrIndices
 Vector of bounding boxes and indices.
 
typedef std::vector< MbCubeCubesVector
 Vector of bounding boxes.
 
typedef std::pair< MbRect *, size_t > RectPtrIndex
 Bounding box and index.
 
typedef std::pair< const MbRect *, size_t > ConstRectPtrIndex
 Bounding box and index.
 
typedef std::vector< RectPtrIndexRectsPtrIndices
 Vector of bounding boxes and indices.
 
typedef std::vector< ConstRectPtrIndexConstRectsPtrIndices
 Vector of bounding boxes and indices.
 
typedef std::vector< MbRectRectsVector
 Vector of bounding boxes.
 
typedef SPtr< MbSpaceItemSpaceItemSPtr
 Smart pointer of an geometrical object.
 
typedef SPtr< const MbSpaceItemConstSpaceItemSPtr
 Smart pointer of an geometrical object.
 
typedef std::pair< MbSpaceItem *, MbSpaceItem * > SpaceItemPair
 Pair of geometrical objects.
 
typedef std::vector< MbSpaceItem * > SpaceItemsVector
 Vector of geometrical objects.
 
typedef std::vector< const MbSpaceItem * > ConstSpaceItemsVector
 Vector of geometrical objects.
 
typedef std::vector< SpaceItemSPtrSpaceItemsSPtrVector
 Vector of geometrical objects.
 
typedef std::vector< ConstSpaceItemSPtrConstSpaceItemsSPtrVector
 Vector of geometrical objects.
 
typedef std::basic_string< TCHAR > string_t
 Definition of the string used by the C3D kernel.

 

Enumerations

enum  MbeItemDataType
 A type of user data of the model tree node. More...
 
Assert violation notification.
enum  eAssertViolationNotify { avn_Mute, avn_CERR, avn_ASSERT }
 

Functions

double CalcAngle0X (double dx, double dy)
 Calculate angle between line and 0X-axis. More...
 
long double CalcAngle0X (long double dx, long double dy)
 Calculate the angle between a line and 0X-axis. More...
 
double CalcAngle0X (const MbCartPoint &p1, const MbCartPoint &p2)
 Calculate the angle between a line and 0X-axis. More...
 
double & NormalizeAngle (double &angle, double angleEpsilon=Math::AngleEps)
 Normalize an angle. More...
 
void AngleToParam (double dir, bool left, double &t)
 Transform a circle angle to the curve parameter. More...
 
template<class Type >
double AngleBetweenVectors (const Type &v1, const Type &v2)
 Calculate the angle between two vectors. More...
 
double CalcAngle3Points (const MbCartPoint &p1, const MbCartPoint &centre, const MbCartPoint &p3)
 Calculate the minimal angle between lines. More...
 
template<class Vector >
bool ArFind (const Vector &arParam, double t, ptrdiff_t &id)
 Find a parameter in the array. More...
 
MbCartPoint LineSegDivide (const MbCartPoint &p1, const MbCartPoint &p2)
 Split segment by the middle. More...
 
ptrdiff_t mod (ptrdiff_t i, ptrdiff_t n)
 I by modulo n (cyclic case).
 
int Sign (double a)
 Determination of the sign of a real number.
 
int Round (double x)
 Round-off the real number.
 
int32 LRound (double x)
 Round-off the real number.
 
int32 CheckLRound (double x)
 Round-off the real number with validation.
 
bool InRange (double x1, double x2, double x)
 Check if the number is in range [x1, x2]. More...
 
bool IsParamOn (double tmin, double tmax, double t, double treg)
 Check if parameter is in the range of the curve. More...
 
bool InRangePlus (double x1, double x, double eps=FLT_EPSILON)
 Check if the number is in range [0, x1). More...
 
template<class TypeVector >
bool IsMonotonic (const TypeVector &items, bool isAscending, bool allowEqual=false)
 Whether vector of objects is ascending or descending. More...
 
template<class Point , class Vector , class PointsVector >
bool ArePointsOnLine (const PointsVector &pnts, double metricEps=METRIC_EPSILON)
 Whether points lie on the line. More...
 
template<class SpacePointsVector >
bool IsPlanar (const SpacePointsVector &pnts, MbPlacement3D *place, double mEps=METRIC_EPSILON)
 Whether the set of points lies on plane. More...
 
template<class Point >
bool IsPlanar2 (const Array2< Point > &pnts, MbPlacement3D *place, double mEps=METRIC_EPSILON)
 Whether the set of points lies on plane. More...
 
template<class DoubleVector >
void SetLimitParam (DoubleVector &tarr, double tmin, double tmax, double teps=Math::paramEpsilon)
 Set the range of parameter. More...
 
const c3d::string_t c3dStr_ShellFace (_T("c3d_ShellFace"))
 Hint for an offset face with the null value of offset.
 
const c3d::string_t c3dStr_OffsetFace (_T("c3d_OffsetFace"))
 Hint for an offset face.
 
const c3d::string_t c3dStr_OpenFace (_T("c3d_OpenFace"))
 Hint for an open face.
 
const c3d::string_t c3dStr_StuckOffset (_T("c3d_StuckOffset"))
 Hint for an offset of a stuck face.
 
const c3d::string_t c3dStr_StuckDelete (_T("c3d_StuckDelete"))
 Hint for a deleted stuck face.
 
const c3d::string_t c3dStr_UnstitchByEdge (_T("c3d_UnstitchByEdge"))
 Hint for separation neighbour faces by an edge.
 
const c3d::string_t c3dStr_CheckFlankId (_T("c3d_CheckFlankId"))
 Hint for checking flank's identifier.
 
const c3d::string_t c3dStr_ShellSequenceNumber (_T("c3d_ShellSequenceNumber"))
 Hint for shell sequence number.
 
const c3d::string_t c3dStr_KeptObject (_T("c3d_KeptObject"))
 Hint for kept object.
 
const c3d::string_t c3dStr_DeletingObject (_T("c3d_DeletingObject"))
 Hint for deleting object.
 
const c3d::string_t c3dStr_TemporalObject (_T("c3d_TemporalObject"))
 Hint for temporal object.
 
const c3d::string_t c3dStr_BendMinAnlge (_T("BendMinAnlge"))
 
const c3d::string_t c3dStr_UnbendMinAngle (_T("UnbendMinAngle"))
 For a cylindrical and conical face - parameter u which is less than corresponding parameter of any point on the face.
 
const c3d::string_t c3dStr_ExtendedFace (_T("c3d_ExtendedFace"))
 Hint for extended face.
 
const c3d::string_t c3dStr_ValidationPropertyMassExchange (_T("c3d_ValidationPropertyMassExchange"))
 Hint for the mass validation property.
 
const c3d::string_t c3dStr_ValidationPropertyVolumeExchange (_T("c3d_ValidationPropertyVolumeExchange"))
 Hint for the volume validation property.
 
const c3d::string_t c3dStr_ValidationPropertySurfaceAreaExchange (_T("c3d_ValidationPropertySurfaceAreaExchange"))
 Hint for the surface area validation property.
 
const c3d::string_t c3dStr_ItemIdentifierExchange (_T("c3d_ItemIdentifierExchange"))
 Hint for the item identifier in model exchange operations.
 
MbeConvResType ImportFromFile (MbModel &model, const path_string &fileName, IConvertorProperty3D *prop=0, IProgressIndicator *indicator=0)
 Read a file of an exchange format into model. More...
 
MbeConvResType ImportFromFile (c3d::ItemSPtr &item, const path_string &filePath, IConvertorProperty3D *prop, IProgressIndicator *indicator)
 Read a file of an exchange format into element. More...
 
MbeConvResType ImportFromFile (ItModelDocument &mDoc, const path_string &filePath, IConvertorProperty3D *prop, IProgressIndicator *indicator)
 Read a file of an exchange format into model. More...
 
MbeConvResType ExportIntoFile (MbModel &model, const path_string &filePath, IConvertorProperty3D *prop=0, IProgressIndicator *indicator=0)
 Write the model into an exchange format file. More...
 
MbeConvResType ExportIntoFile (MbItem &item, const path_string &filePath, IConvertorProperty3D *prop, IProgressIndicator *indicator)
 Write the model into an exchange format file. More...
 
MbeConvResType ImportFromBuffer (MbModel &model, const char *data, size_t length, MbeModelExchangeFormat modelFormat, IConvertorProperty3D *prop=0, IProgressIndicator *indicator=0)
 Import data from buffer into model. More...
 
MbeConvResType ImportFromBuffer (c3d::ItemSPtr &item, const char *data, size_t length, MbeModelExchangeFormat modelFormat, IConvertorProperty3D *prop=NULL, IProgressIndicator *indicator=NULL)
 Import data from buffer into model. More...
 
MbeConvResType ExportIntoBuffer (MbModel &model, MbeModelExchangeFormat modelFormat, char *&data, size_t &length, IConvertorProperty3D *prop=0, IProgressIndicator *indicator=0)
 Export model into buffer. More...
 
MbeConvResType ExportIntoBuffer (MbItem &item, MbeModelExchangeFormat modelFormat, char *&data, size_t &length, IConvertorProperty3D *prop=NULL, IProgressIndicator *indicator=NULL)
 Export model into buffer. More...
 
template<class Point >
bool EqualPoints (const Point &p1, const Point &p2, double eps)
 Check points for equality. More...
 
template<class Point >
bool EqualPoints (const Point &p1, const Point &p2, double xEpsilon, double yEpsilon)
 Check points for equality. More...
 
template<class Point >
bool EqualPoints (const Point &p1, const Point &p2, double xEpsilon, double yEpsilon, double zEpsilon)
 Check points for equality. More...
 
template<class Vector >
bool EqualVectors (const Vector &p1, const Vector &p2, double eps)
 Check equality of vectors with given tolerance. More...
 
template<class Vector >
bool EqualVectors (const Vector &p1, const Vector &p2, double xEpsilon, double yEpsilon)
 Check equality of vectors with given tolerance. More...
 
template<class Vector >
bool EqualVectors (const Vector &p1, const Vector &p2, double xEpsilon, double yEpsilon, double zEpsilon)
 Check equality of vectors with given tolerance. More...
 
template<class Matrix >
bool EqualMatrices (const Matrix &m1, const Matrix &m2, double accuracy)
 Compare matrices. More...
 
template<class BBox >
bool EqualCubes (const BBox &c1, const BBox &c2, double eps)
 Check for equality of boxes with controlled tolerance. More...
 
void GetCosSin (const double &tt, double &cosT, double &sinT)
 Calculation of the cosine and sine. More...
 
bool EqualLengths (double lx, double ly, double minLen=METRIC_EPSILON, double minDev=LENGTH_EPSILON)
 Check lengths for equality. More...
 
template<typename ParamContainer , typename PointContainer >
void SplitHomoVector (const SArray< MbHomogeneous > &hList, PointContainer &uvList, ParamContainer *tList=NULL)
 Separation of coordinates and weights. More...
 
MbVector Perpendicular (MbVector vec)
 Vector rotated by pi/2 radians counterclockwise.
 
bool IsNull (const MbVector &vec, double eps)
 Check vector length to be equaled to zero with given tolerance.
 
bool Nonzero (const MbVector3D &vec, double eps)
 Check equality of vector to zero with given tolerance. More...
 
float D2F (double v)
 Conversion of number from double to float with check before assignment.
 
c3d::t_ofstream & operator<< (c3d::t_ofstream &file, const IModelTreeNode &node)
 Operators for outputing a tree to xml. More...
 
c3d::t_ofstream & operator<< (c3d::t_ofstream &file, IModelTreeNode &node)
 Tree node writing to xml.
 
c3d::t_ofstream & operator<< (c3d::t_ofstream &file, const IModelTree &tree)
 Tree writing to xml.
 
c3d::t_ofstream & operator<< (c3d::t_ofstream &file, IModelTree &tree)
 Tree writing to xml.
 
ItemDataBaseCreateAttributeData (MbAttribute *attr)
 Create user data object for the attribute. Return NULL if this attribute is not supported in the model tree.
 
std_unique_ptr< MbAttributeContainerGetTreeNodeAttributes (const IModelTreeNode *node, reader &in)
 Read attributes for the model tree node.
 
 MTREE_ATTR_DATALESS_CLASS (ItemAttrVisual, idtAttrVisual)
 Definition of attribute dataless classes.
 
readeroperator>> (reader &in, UserDataMap &itemmap)
 UserDataMap reading.
 
writeroperator<< (writer &out, const UserDataMap &itemmap)
 UserDataMap writing.
 
size_t size_of (string_t s)
 Memory allocated by string.

 
std::wstring StdToWString (const std::string &s)
 String transformation from multibyte to wide-char.

 
std::string WToStdString (const std::wstring &s)
 String transformation from wide-char to multibyte.

 
string_t ToC3Dstring (const std::string &s)
 String transformation to the C3D form.

 
std::string ToSTDstring (const string_t &s)
 String transformation to the standard form.

 
string_t ToC3Dstring (const std::wstring &s)
 String transformation to the C3D form.
 
path_string WToPathstring (const std::wstring &s)
 String transformation to the standard form.
 
std::wstring ToWstring (const string_t &s)
 String transformation to the standard form.
 
std::string PathToSTDstring (const path_string &s)
 String transformation to the standard form.
 
string_t PathToC3Dstring (const path_string &s)
 String transformation to the standard form.
 
path_string StdToPathstring (const std::string &s)
 String transformation to the standard form.
 
path_string C3DToPathstring (const string_t &s)
 String transformation to the standard form.
 
void ToLower (::std::string &v)
 convert symbols to lower case.
 
void ToLower (::std::wstring &v)
 convert symbols to lower case.
 
void EnableMemoryLeakDump ()
 Enable memory leakage control. More...
 

Variables

const_expr size_t MATRIX_MAX_COUNT = 1000000000
 Maximum number of MxN matrix elements.
 
const_expr size_t ARRAY_MAX_COUNT = 1000000
 Maximum size of array.
 
const_expr double METRIC_PORTION = 0.075
 Proportion of distance between control points.
 
const_expr double METRIC_DELTA = 0.05
 Metric offset.
 
const_expr double PARAM_DELTA_MIN = 0.005
 Minimal portion of parameter increment.
 
const_expr double PARAM_DELTA_MAX = 1.0
 Maximal portion of parameter increment.
 
const_expr double MIN_LENGTH = 1.0E-4
 Minimal object length.
 
const_expr double MAX_LENGTH = 5.0E+7
 Maximal object length.
 
const_expr double MIN_RADIUS = 1.0E-4
 Minimal object radius.
 
const_expr double MAX_RADIUS = 2.5E+7
 Maximal object radius.
 
const_expr double DELTA_MIN = 1E-3
 Reduction factor.
 
const_expr double DELTA_MID = 1E-2
 Reduction factor.
 
const_expr double DELTA_MOD = 1E-1
 Reduction factor.
 
const_expr double DELTA_MAX = 1E+3
 Magnification factor.
 
const_expr double POWER_1 = 1E+1
 Magnification factor.
 
const_expr double POWER_2 = 1E+2
 Magnification factor.
 
const_expr double POWER_3 = 1E+3
 Magnification factor.
 
const_expr double POWER_4 = 1E+4
 Magnification factor.
 
const_expr double POWER_5 = 1E+5
 Magnification factor.
 
const_expr double ONE_THIRD = 0.33333333333333333333
 1/3.
 
const_expr double TWO_THIRD = 0.66666666666666666666
 2/3.
 
const_expr double ONE_SIXTH = 0.166666666666666666667
 1/6.
 
const_expr double ONE_FIFTH = 0.2
 1/5.
 
const_expr double TWO_FIFTH = 0.4
 2/5.
 
const_expr double ONE_QUARTER = 0.25
 1/4.
 
const_expr double ONE_HALF = 0.5
 1/2.
 
const_expr double ONE_SEVENTH = 0.14285714285714285714
 1/7.
 
const_expr double ONE_EIGHTH = 0.125
 1/8.
 
const_expr double _CONIC_MIN_ = 0.05
 Minimum factor of smooth surface section completeness (0.5 for parabola, less for ellipse).
 
const_expr double _CONIC_MAX_ = 0.95
 Maximum factor of smooth surface section completeness (0.5 for parabola, greater for hyperbola).
 
const_expr double _ARC_ = 0.0
 Factor of smooth surface section completeness in case of u = const corresponds to circle arc.
 
const_expr int32 TEN = 10
 Number 10.
 
const_expr int32 TWENTY = 20
 Number 20.
 
const_expr int32 TESSERA_MAX = 4000
 Maximum count of cell in rows and columns for triangulation grid.
 
const_expr int32 COUNT_MAX = 512
 Magnification factor.
 
const_expr int32 COUNT_MID = 256
 Magnification factor.
 
const_expr int32 COUNT_MIN = 128
 Magnification factor.
 
const_expr int32 COUNT_BIN = 64
 Inclusion level.
 
const_expr int32 WIRE_MAX = 256
 The maximum number of mesh lines.
 
const_expr int32 ITERATE_COUNT = 16
 Number of approximations in iterative method.
 
const_expr int32 ITERATE_LIMIT = 32
 Count of iterations for construction of tangent circles.
 
const_expr int32 NEWTON_COUNT = 8
 Number of approximations in iterative method.
 
const_expr int32 NEWTON_COUNT_2X = 16
 Number of approximations in iterative method.
 
const_expr int32 NEWTON_COUNT_3X = 24
 Number of approximations in iterative method.
 
const_expr int32 NEWTON_COUNT_4X = 32
 Number of approximations in iterative method.
 
const_expr int32 NEWTON_COUNT_8X = 64
 Number of approximations in iterative method.
 
const_expr int32 LIMIT_COUNT = 4
 Number of approximations in iterative method.
 
const_expr int32 COUNT_DELTA = 10
 Reduction or magnification factor.
 
const_expr int32 COUNT_DELTA_2X = 20
 Reduction or magnification factor.
 
const_expr int32 ITEMS_COUNT = 12
 Number of points in step method.
 
const_expr int32 BEZIER_DEGREE = 4
 Default degree of Bezier-spline.
 
const_expr int32 NURBS_DEGREE = 4
 Degree of NURBS.
 
const_expr int32 NURBS_POINTS_COUNT = 6
 Default number of points for NURBS direct editing.
 
const_expr int32 NURBS_POINTS_MAX_COUNT = 100
 Default maximum number of points for NURBS direct editing.
 
const_expr int32 APPROX_POINTS_MUL_COEFF = 3
 Factor of points count incrementing in method of least squares.
 
const_expr int32 SPACE_DIM = 3
 Dimension of 3D space.
 
const_expr int32 TRT_FREE = 0
 No conjugation.
 
const_expr int32 TRT_TANGENT = 1
 Tangent conjugation.
 
const_expr int32 TRT_NORMAL = 2
 Normal conjugation.
 

Detailed Description

C3D namespace declaration.

Enumeration Type Documentation

◆ eAssertViolationNotify

Enumerator
avn_Mute 

Mute assert violations.

avn_CERR 

Write message into error stream.

avn_ASSERT 

ASSERT macro application.

Function Documentation

◆ c3dStr_BendMinAnlge()

const c3d::string_t c3d::c3dStr_BendMinAnlge ( _T("BendMinAnlge")  )

For a planar face bended in cylinder - u-parameter which is less than corresponding parameter of any point on the face, bended in cone - angular parameter of the ray which goes out from the parameters plane origin and does not intersect contours of the face.

◆ operator<<()

c3d::t_ofstream& c3d::operator<< ( c3d::t_ofstream &  file,
const IModelTreeNode node 
)

Operators for outputing a tree to xml.

Tree node writing to xml.