- C3d aggiornamento delle librerie ( 117948).
This commit is contained in:
SaraP
2023-05-11 10:00:28 +02:00
parent 38f1f5ed66
commit 3df46e611e
62 changed files with 1905 additions and 1839 deletions
-1
View File
@@ -19,7 +19,6 @@
#include <mb_cart_point3d.h>
#include <mb_enum.h>
#include <math_version.h>
#include <float.h>
#include <limits.h>
#include <vector>
+3
View File
@@ -136,6 +136,9 @@ public:
// \ru Дать все объекты указанного типа. \en Get all objects by type. \~
bool GetItems( MbeSpaceType type, const MbMatrix3D & from,
RPArray<MbItem> & items, SArray<MbMatrix3D> & matrs ) override;
// \ru Дать все объекты указанного типа. \en Get all objects by type. \~
bool GetItems( MbeSpaceType type, const MbMatrix3D & from,
std::vector<SPtr<MbItem>> & items, std::vector<MbMatrix3D> & matrs ) override;
// \ru Дать все полигональные объекты, отображающие геометрические элементы, участвующие в геометрических огриничениях.\en Get all polygonal objects for drawing the elements participated in geometric constraints. \~
bool GetConstraintMesh( std::vector<const MbMesh *> & meshes ) const;
// \ru Дать все уникальные объекты указанного типа. \en Get all unique objects by type . \~
+16 -16
View File
@@ -197,33 +197,33 @@ public :
/// \ru Выдать подтип атрибута. \en Get subtype of an attribute.
virtual MbUserAttribType AttrTypeEx() const = 0;
virtual MbAttribute & Duplicate( MbRegDuplicate * = nullptr ) const = 0; // \ru Сделать копию элемента. \en Create a copy of the element.
virtual bool IsSame( const MbAttribute &, double accuracy ) const = 0; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal.
virtual bool Init( const MbAttribute & ) = 0; // \ru Инициализировать данные по присланным. \en Initialize data.
virtual MbAttribute & Duplicate( MbRegDuplicate * = nullptr ) const override = 0; // \ru Сделать копию элемента. \en Create a copy of the element.
virtual bool IsSame( const MbAttribute &, double accuracy ) const override = 0; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal.
virtual bool Init( const MbAttribute & ) override = 0; // \ru Инициализировать данные по присланным. \en Initialize data.
// \ru Выполнить действия при изменении владельца, не связанное с другими действиями. \en Perform actions which are not associated with other actions when changing the owner.
void OnChangeOwner( const MbAttributeContainer & owner ) override;
// \ru Выполнить действия при конвертации владельца. \en Perform actions when converting the owner.
void OnConvertOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ) override;
virtual void OnChangeOwner( const MbAttributeContainer & owner ) override;
// \ru Выполнить действия при конвертации владельца. \en Perform actions when converting the owner.
virtual void OnConvertOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ) override;
// \ru Выполнить действия при трансформировании владельца. \en Perform actions when transforming the owner.
void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = nullptr ) override;
virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = nullptr ) override;
// \ru Выполнить действия при перемещении владельца. \en Perform actions when moving the owner.
void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = nullptr ) override;
virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = nullptr ) override;
// \ru Выполнить действия при вращении владельца. \en Perform actions when rotating the owner.
void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = nullptr ) override;
virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = nullptr ) override;
// \ru Выполнить действия при копировании владельца. \en Perform actions when copying the owner.
void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = nullptr ) override;
virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = nullptr ) override;
// \ru Выполнить действия при объединении владельца. \en Perform actions when merging the owner.
void OnMergeOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ) override;
virtual void OnMergeOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ) override;
// \ru Выполнить действия при замене владельца. \en Perform actions when replacing the owner.
void OnReplaceOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ) override;
virtual void OnReplaceOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ) override;
// \ru Выполнить действия при разделении владельца. \en Perform actions when splitting the owner.
void OnSplitOwner( const MbAttributeContainer & owner, const std::vector<MbAttributeContainer *> & others ) override;
virtual void OnSplitOwner( const MbAttributeContainer & owner, const std::vector<MbAttributeContainer *> & others ) override;
// \ru Выполнить действия при удалении владельца. \en Perform actions when deleting the owner.
void OnDeleteOwner( const MbAttributeContainer & owner ) override;
virtual void OnDeleteOwner( const MbAttributeContainer & owner ) override;
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта. \en Get properties of the object.
size_t SetProperties( const MbProperties & ) override; // \ru Установить свойства объекта. \en Set properties of the object.
virtual void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта. \en Get properties of the object.
virtual size_t SetProperties( const MbProperties & ) override; // \ru Установить свойства объекта. \en Set properties of the object.
MbePrompt GetPropertyName() override; // \ru Выдать заголовок свойства объекта. \en Get a name of object property.
OBVIOUS_PRIVATE_COPY( MbExternalAttribute )
+3 -1
View File
@@ -11,7 +11,7 @@
#define __ATTRIBUTE_ITEM_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <reference_item.h>
#include <math_define.h>
#include <mb_property_title.h>
@@ -566,6 +566,8 @@ namespace c3d // namespace C3D
constexpr TCHAR c3dStr_TextureUrl[] = _T("C3D_Texture_URL");
/// \ru Подсказка для атрибута хот-точки в уклоне. \en Prompt for attribute of hot point in draft operations.
constexpr TCHAR c3d_DraftOperationHotPoint[] = _T("c3d_DraftOperationHotPoint");
/// \ru Подсказка для типа замкнутости оболочки в исходных данных. \en Promt for shell closure type in source data.
constexpr TCHAR c3d_ShellOpenClosedOriginal[] = _T( "c3d_ShellOpenClosedOriginal" );
} // namespace C3D
-7
View File
@@ -65,7 +65,6 @@ private:
\en Bounding box of object is calculated only at the request. Bounding box of object is undefined after object constructor and after object modifications \n \~
*/
mutable MbCube cube;
mutable DPtr<MbGridTopology> topo; ///< \ru Дополнительная информация о топологии коллекции. \en Additional information about a topology of the collection.
private:
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en The copy constructor without implementation prevents from copying by default.
MbCollection( const MbCollection & init );
@@ -320,12 +319,6 @@ public:
void ConvertAllToTriangles();
/// \ru Удалить дублирующие с заданной точностью друг друга точки. \en Remove redundant points with a given tolerance (duplicates).
bool RemoveRedundantPoints( bool deleteNormals, double epsilon = LENGTH_EPSILON );
/// \ru Готова ли топология коллекции. \en Whether information about collection topology is ready.
bool IsGridTopologyReady() const { return topo != nullptr; }
/// \ru Создать новый временный объект информации о топологии. \en Create new temporary maintenance object information about collection topology.
const MbGridTopology * CreateGridTopology( bool keepExisting ) const;
/// \ru Удалить информацию о топологии. \en Delete a information about collection topology.
void ResetGridTopology() const;
/** \} */
private:
/// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
+1 -1
View File
@@ -93,7 +93,7 @@ public:
/// \ru Оператор копирования. \en Copy operator. \~
MtGeomArgument & operator = ( const MtGeomArgument & );
KNOWN_OBJECTS_RW_REF_OPERATORS( MtGeomArgument ) // Serializing into a file format
KNOWN_OBJECTS_RW_REF_OPERATORS_EX( MtGeomArgument, MATH_FUNC_EX ) // Serializing into a file format
}; // MtGeomArgument
+1
View File
@@ -28,6 +28,7 @@
#include <mt_ref_item.h>
#include <io_tape.h>
#include <mb_cart_point.h>
#include <hash32.h>
//----------------------------------------------------------------------------------------
+1
View File
@@ -15,6 +15,7 @@
#include <mb_placement3d.h>
#include <mb_data.h>
#include <conv_predefined.h>
#include <reference_item.h>
class MbProductInfo;
+36
View File
@@ -48,6 +48,7 @@ enum MbeModelExchangeFormat {
mxf_STEP, ///< \ru Интерпретировать содержимое как STEP (.stp или .step). \en Read data from buffer as STEP (.stp or .step).
mxf_STL, ///< \ru Интерпретировать содержимое как STL (.stl). \en Read data from buffer as STL (.stl).
mxf_VRML, ///< \ru Интерпретировать содержимое как VRML (.wrl). \en Read data from buffer as VRML (.wrl).
mxf_3MF, ///< \ru Интерпретировать содержимое как 3MF (.3mf). \en Read data from buffer as 3MF (.3mf).
mxf_OBJ, ///< \ru Интерпретировать содержимое как OBJ (.obj). \en Read data from buffer as OBJ (.obj).
mxf_GRDECL, ///< \ru Интерпретировать содержимое как GRDECL (.grdecl). \en Read data from buffer as GRDECL (.grdecl).
mxf_ASCIIPoint, ///< \ru Интерпретировать содержимое как облако точек в ASCII (.txt, .asc или .xyz). \en Read data from buffer as ASCII point cloud (.txt, .asc or .xyz).
@@ -733,6 +734,27 @@ public:
*/
virtual MbeConvResType VRMLWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0, MbRefItem* qeuryStitch = 0 ) = 0;
/** \brief \ru Записать файл формата 3MF.
\en Write a file of 3MF format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\param[in] qeuryStitch - \ru Диалог запроса на сшивку поверхностей (не используется).
\en Dialog of request for stitching the surfaces (not used). \~
\param[in] devSag - \ru Угловой шаг для расчёта триангуляционной сетки.
\en Deviate sag requiref for grid calculateion. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup VRML_Exchange
*/
virtual MbeConvResType ThreeMFWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0, MbRefItem* qeuryStitch = 0 ) = 0;
/** \brief \ru Прочитать файл формата GRDECL.
\en Read a file of GRDECL format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
@@ -1148,6 +1170,20 @@ CONV_FUNC( MbeConvResType ) GRDECLWrite( IConvertorProperty3D& prop, ItModelDocu
*/
CONV_FUNC( MbeConvResType ) VRMLWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Записать файл формата 3MF.
\en Write a file of 3MF format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup VRML_Exchange
*/
CONV_FUNC( MbeConvResType ) ThreeMFWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Прочитать файл с облаком точек в формате ASCII.
\en Read a file of ASCII Point Cloud format. \~
+8 -1
View File
@@ -457,7 +457,14 @@ public:
bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const override;
// \ru Заполнить плейсмент, если кривая плоская. \en Fill the placement if the curve is planar.
bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const override;
// \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы). \en Get a surface curve if a spatial curve is on a surface (call DeleteItem for arguments after use).
/**\ru Дать поверхностную кривую, если пространственная кривая поверхностная. После использования вызывать
DeleteItem на аргументы. В некоторых случаях переданная поверхность surface может быть
использована для устранения неопределённости выбора кривой (например, при стыке двух
одинаковых по IsSame или IsSimilar поверхностей).
\en Get a surface curve if a spatial curve lies on a surface. Call 'DeleteItem' for arguments after use.
In some cases the input 'surface' argument may be can be used to eliminate uncertainty in the choice
of a curve (e.g. curves on a junction of surfaces which are same by IsSame or IsSimilar checks).
*/
bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const override;
double GetParamToUnit() const override; // \ru Дать приращение параметра, осреднённо соответствующее единичной длине в пространстве. \en Get parameter increment which averagingly corresponds to the unit length in space.
+1
View File
@@ -25,6 +25,7 @@
#include <mb_rect1d.h>
#include <mb_data.h>
#include <templ_visitor.h>
#include <hash32.h>
class MATH_CLASS MbPlacement;
+2
View File
@@ -25,6 +25,8 @@
#include <mb_data.h>
#include <templ_sptr.h>
#include <templ_visitor.h>
#include <tool_mutex.h>
#include <hash32.h>
#include <vector>
#include <utility>
+20 -17
View File
@@ -25,25 +25,25 @@
*/
// ---
class MATH_CLASS MbCurveCoordinate : public MbFunction {
public :
SPtr<MbCurve3D> curve; ///< \ru Кривая. \en The curve.
size_t coordinate; ///< \ru Координата кривой: X(0), Y(1), Z(2). \en The curve coordinate: X(0), Y(1), Z(2).
private :
c3d::SpaceCurveSPtr curve; ///< \ru Кривая. \en The curve.
size_t coordinate; ///< \ru Координата кривой: X(0), Y(1), Z(2). \en The curve coordinate: X(0), Y(1), Z(2).
MbCartPoint3D origin; ///< \ru Точка отсчёта параметра функции. \en The origin point for parameter.
MbVector3D derive; ///< \ru Вектор перемещения по параметру. \en The vector of movement by parameter.
std::vector<double> tBreaks; ///< \ru Параметры функции, в которых она терпит излом. \en The function parameters for which the function have a break.
MbVector3D derive; ///< \ru Вектор перемещения по параметру. \en The vector of movement by parameter.
c3d::DoubleVector tBreaks; ///< \ru Параметры функции, в которых она терпит излом. \en The function parameters for which the function have a break.
public :
///< \ru Конструктор по значениям и параметрам. \en Constructor by values and parameters.
MbCurveCoordinate( const MbCurve3D & cur, size_t process, const MbPlacement3D & place, size_t coord );
private:
///< \ru Конструктор по кривой и индексу координаты. \en Constructor by curve and index of coordinate.
MbCurveCoordinate( MbCurve3D & cur, size_t coord );
MbCurveCoordinate( const MbCurveCoordinate & ); // \ru Не реализовано \en Not implemented
MbCurveCoordinate( const MbCurveCoordinate &, MbRegDuplicate * iReg );
public :
virtual ~MbCurveCoordinate();
public:
void Init( const MbCurve3D & cur, size_t process, const MbPlacement3D & place, size_t coord ); ///< \ru Инициализация по значениям и параметрам. \en Initialization by values and parameters.
/// \ru Создание объекта. \en Object creation.
static MbFunction * Create( const MbCurve3D & cur, size_t coord, const MbPlacement3D * place, MbResultType & res );
// \ru Общие функции математического объекта \en Common functions of mathematical object
MbeFunctionType IsA() const override; // \ru Тип элемента \en A type of element
@@ -59,14 +59,14 @@ public:
void SetClosed( bool cl ) override; // \ru Замкнутость функции \en A function closedness
double Value ( double & t ) const override; // \ru Значение функции для t \en The value of function for a given t
double FirstDer ( double & t ) const override; // \ru Первая производная по t \en The first derivative with respect to t
double SecondDer ( double & t ) const override; // \ru Вторая производная по t \en The second derivative with respect to t
double ThirdDer ( double & t ) const override; // \ru Третья производная по t \en The third derivative with respect to t
double FirstDer ( double & t ) const override; // \ru Первая производная по t. Может вернуть значение MB_INFINITY. \en The first derivative with respect to t. May return MB_INFINITY.
double SecondDer ( double & t ) const override; // \ru Вторая производная по t. Может вернуть значение MB_QNAN. \en The second derivative with respect to t. May return MB_QNAN.
double ThirdDer ( double & t ) const override; // \ru Третья производная по t. Может вернуть значение MB_QNAN. \en The third derivative with respect to t. May return MB_QNAN.
double _Value ( double t ) const override; // \ru Значение функции для t \en The value of function for a given t
double _FirstDer ( double t ) const override; // \ru Первая производная по t \en The first derivative with respect to t
double _SecondDer ( double t ) const override; // \ru Вторая производная по t \en The second derivative with respect to t
double _ThirdDer ( double t ) const override; // \ru Третья производная по t \en The third derivative with respect to t
double _FirstDer ( double t ) const override; // \ru Первая производная по t. Может вернуть значение MB_INFINITY. \en The first derivative with respect to t. May return MB_INFINITY.
double _SecondDer ( double t ) const override; // \ru Вторая производная по t. Может вернуть значение MB_QNAN. \en The second derivative with respect to t. May return MB_QNAN.
double _ThirdDer ( double t ) const override; // \ru Третья производная по t. Может вернуть значение MB_QNAN. \en The third derivative with respect to t. May return MB_QNAN.
// \ru Вычислить значение и производные. \en Calculate value and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
double & val, double & fir, double * sec, double * thr ) const override;
@@ -97,8 +97,11 @@ public:
void BreakPoints( std::vector<double> & vBreaks, double precision = ANGLE_REGION ) const override; // \ ru Определение точек излома функции. \en The determination of function smoothness break points.
private:
void SetOriginAndDerive();
double GetCurveParam( double & t, bool ext ) const;
static MbResultType CheckCurve( const MbCurve3D & curve, size_t coord );
void SetOriginAndDerive();
double GetCurveParam( double & t, bool ext ) const;
double GetFuncParam( double w ) const;
void ExploreFunctionDerivatives( double & t, bool ext, double * fir, double * sec, double * thr ) const;
void operator = ( const MbCurveCoordinate & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCurveCoordinate )
+2 -1
View File
@@ -11,7 +11,8 @@
#define __FUNCTION_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <mb_enum.h>
#include <mb_variables.h>
#include <reference_item.h>
#include <templ_sptr.h>
+7 -7
View File
@@ -1,8 +1,7 @@
//////////////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Программный интерфейс 3D решателя геометрических ограничений.
\en Program interface of three-dimensional geometric constraints solver. \~
\file \brief \ru Программный интерфейс 3D решателя геометрических ограничений.
\en Program interface of three-dimensional geometric constraints solver. \~
*/
//////////////////////////////////////////////////////////////////////////////////////////
@@ -10,11 +9,11 @@
#define __GCM_API_H
#include <math_define.h>
//
#include <gcm_types.h>
#include <mb_cart_point3d.h>
#include <mb_placement3d.h>
#include <gcm_types.h>
class reader;
class writer;
@@ -99,12 +98,12 @@ GCM_FUNC(bool) GCM_ReadSystem( GCM_system gSys, reader & in );
GCM_FUNC(bool) GCM_WriteSystem( GCM_system gSys, writer & out );
//----------------------------------------------------------------------------------------
/// Query to interrupt calculations
/// Query to interrupt calculations.
//---
typedef bool ( *GCM_abort )();
//----------------------------------------------------------------------------------------
/** \brief \ru Назначить функцию прерывания вычислений
/** \brief \ru Назначить функцию прерывания вычислений.
\en Set a callback to interrupt the calculations. \~
\param[in] gSys - \ru Система ограничений.
\en System of constraints. \~
@@ -1172,6 +1171,7 @@ GCM_FUNC(bool) GCM_SetJournal( GCM_system gSys, const char * fName );
/** \} */ // GCM_3D_API
struct GCT_diagnostic_pars;
//----------------------------------------------------------------------------------------
/*
It's used for testing purposes only.
+25 -15
View File
@@ -1,8 +1,12 @@
//////////////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Геометрические типы данных
\en Geometrical types of data \~
\file \brief \ru Геометрические типы данных C3D Solver.
\en Geometrical types of data C3D Solver. \~
\details \ru Геометрические типы данных для объектно-ориентированной части
программного интерфейса C3D Solver. См. также базовую часть
интерфейса <gcm_types.h>.
\en Geometry data types for the object-oriented part of C3D Solver API.
See also file <gcm_types.h> that represents basic part of the C3D Solver API. \~
*/
//////////////////////////////////////////////////////////////////////////////////////////
@@ -31,8 +35,6 @@ typedef GCM_geom MtPatternId;
typedef GCM_g_type MtGeomType;
typedef GCM_c_type MtMateType;
/** \} */
//----------------------------------------------------------------------------------------
/** \brief \ru Геометрический объект. \en Geometrical object. \~
\details \ru Геометрический объект этого типа данных, характеризуется матрицей
@@ -91,7 +93,7 @@ private: // It will be removed ... use GetPlacement instead.
/*
ItGeom as pointer type.
*/
typedef ItGeom * ItGeomPtr;
typedef ItGeom * ItGeomPtr;
//----------------------------------------------------------------------------------------
// \ru Трансформация из стандартного положения \en Transformation from the standard position
@@ -115,12 +117,11 @@ inline void ItGeom::GetTransMatrix( MbMatrix3D & mat ) const
}
//----------------------------------------------------------------------------------------
// Internal data types
// Internal data types forward declaration.
//---
struct MtUnifiedGeom;
class MtParGeom;
//----------------------------------------------------------------------------------------
/** \brief \ru Геометрический объект, аргумент геометрического ограничения.
\en Geometric object, argument of geometric constraint. \~
@@ -141,9 +142,12 @@ public:
public:
/// \ru Тип геометрии, которому удовлетворяет объект. \en Type of geometry which is satisfied by the object.
MtGeomType GeomType() const;
GCM_g_type GeomType() const;
/// \ru Выдать данные геометрии в унифицированной форме записи. \en Get the uniform geometry data record.
GCM_g_record GeomRecord() const;
/// \ru Выдать трансформацию объекта. \en Get transformation of the object.
MbMatrix3D & GetTransMatrix( MbMatrix3D & ) const;
/// \ru Определить, является ли объект пустым. \en Define whether the object is empty.
bool IsNull() const;
@@ -152,7 +156,7 @@ public: /* Assigning methods
MtGeomVariant & Assign( const MtGeomVariant & );
MtGeomVariant & Assign( MtParGeom & );
MtGeomVariant & Assign( const MtParGeom & );
MtGeomVariant & Assign( MtGeomType, const MbCartPoint3D & org, const MbVector3D & zAxis
MtGeomVariant & Assign( GCM_g_type, const MbCartPoint3D & org, const MbVector3D & zAxis
, const MbVector3D & xAxis, double r1 = 0.0, double r2 = 0.0 );
template<class GeomDS>
MtGeomVariant & Assign( GeomDS * );
@@ -423,7 +427,7 @@ inline void MtMatingGeometry::_SetLCSMatrix( const MbMatrix3D & gSpan )
}
//----------------------------------------------------------------------------------------
// \ru Задать пустой объект \en Specify an empty object
// \ru Задать пустой объект. \en Specify an empty object.
//---
inline void MtMatingGeometry::SetNull()
{
@@ -434,15 +438,21 @@ inline void MtMatingGeometry::SetNull()
}
//----------------------------------------------------------------------------------------
// \ru Конвертировать структуру MtMatingGeometry в аргумент ограничения \en Convert the structure MtMatingGeometry to the argument of constraint
/** \brief \ru Конвертировать структуру MtMatingGeometry в аргумент ограничения.
\en Convert the structure MtMatingGeometry to the argument of constraint. \~
\param[in] cVer - \ru Версия ограничений, для которого будет применяться аргумент.
\en The version of constraint using the resulting argument. \~
*/
//---
GCM_FUNC(MtGeomVariant) GeomArgument( const MtMatingGeometry &, VERSION constraintVersion );
GCM_FUNC(MtGeomVariant) GeomArgument( const MtMatingGeometry &, VERSION cVer );
/** \} */
//----------------------------------------------------------------------------------------
//
//---
typedef ItGeom * IfGeomPtr; // deprecated
typedef const ItGeom * IfConstGeomPtr; // deprecated
typedef ItGeom * IfGeomPtr; // deprecated.
typedef const ItGeom * IfConstGeomPtr; // deprecated.
#endif // __IT_GEOM_H
+1 -1
View File
@@ -16,7 +16,7 @@ class MbPlacement3D; // Local coordinate system that represents position an
struct MtSystemHolder {}; // An internal data object that provides the constraint system.
#define GCM_ID_TYPE 1 // 1 - MtObjectId is a pod struct, 0 - MtObjectId is simple integer.
#define GCM_SYSTEM_TYPE 1 // 1 - GCM_system is ptr <MtRefItem *>, 0 - GCM_system is a <MtSystemHolder*> ptr.
#define GCM_SYSTEM_TYPE 0 // 1 - GCM_system is ptr <MtRefItem *>, 0 - GCM_system is a <MtSystemHolder*> ptr.
#if ( GCM_ID_TYPE == 1 )
+3
View File
@@ -109,6 +109,9 @@ public :
// \ru Дать все объекты указанного типа. \en Get all objects by type. \~
bool GetItems( MbeSpaceType type, const MbMatrix3D & from,
RPArray<MbItem> & items, SArray<MbMatrix3D> & matrs ) override;
// \ru Дать все объекты указанного типа. \en Get all objects by type. \~
bool GetItems( MbeSpaceType type, const MbMatrix3D & from,
std::vector<SPtr<MbItem>> & items, std::vector<MbMatrix3D> & matrs ) override;
// \ru Дать все уникальные объекты указанного типа. \en Get all unique objects by type . \~
bool GetUniqItems( MbeSpaceType type, CSSArray<const MbItem *> & items ) const override;
// \ru Дать объект по его пути положения в модели и матрицу преобразования объекта в глобальную систему координат. \en Get the object by its path in the model and get the matrix of transformation of the object to the global coordinate system.
+2
View File
@@ -137,6 +137,8 @@ namespace io
skippedUnknAttr = 0x08000000L,
/// \ru Файл нулевой длины. \en Zero-length file.
emptyFile = 0x10000000L,
/// \ru Лицензия не найдена. \en License not found.
licenseMissing = 0x20000000L,
/// \ru Все ошибки. \en All errors.
//AR all = 0xffffffe0L
allMask = 0xffffffffL
+3 -1572
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+52
View File
@@ -32,8 +32,60 @@ struct MATH_CLASS MbCurvature
MbVector3D meanNormal; ///< \ru Нормаль (вычислена как взвешенное среднее нормалей соседних граней). \en Normal (calculated as weighted mean of the normals of neighboring faces).
MbVector3D cdir1; ///< \ru Направление максимальной кривизны. \en Maximum principal curvature direction.
MbVector3D cdir2; ///< \ru Направление минимальной кривизны. \en Minimum principal curvature direction.
/// \ru Конструктор по умолчанию. \en Default constructor.
MbCurvature() : k_h( 0.0 ), k_g( 0.0 ), k1 ( 0.0 ), k2 ( 0.0 ) {}
/// \ru Конструктор копирования. \en Copy constructor.
MbCurvature( const MbCurvature & that )
: k_h ( that.k_h )
, k_g ( that.k_g )
, k1 ( that.k1 )
, k2 ( that.k2 )
, normal ( that.normal )
, meanNormal( that.meanNormal )
, cdir1 ( that.cdir1 )
, cdir2 ( that.cdir2 )
{}
/// \ru Оператор присваивания. \en An assignment operator.
MbCurvature & operator = ( const MbCurvature & that )
{
k_h = that.k_h;
k_g = that.k_g;
k1 = that.k1;
k2 = that.k2;
normal = that.normal;
meanNormal = that.meanNormal;
cdir1 = that.cdir1;
cdir2 = that.cdir2;
return ( *this );
}
/// \ru Функция копирования данных. \en Copy function of data.
void Init( const MbCurvature & that )
{
k_h = that.k_h;
k_g = that.k_g;
k1 = that.k1;
k2 = that.k2;
normal = that.normal;
meanNormal = that.meanNormal;
cdir1 = that.cdir1;
cdir2 = that.cdir2;
}
/// \ru Очистка данных. \en Clear data.
void Clear()
{
k_h = 0.;
k_g = 0.;
k1 = 0.;
k2 = 0.;
normal = MbVector3D::zero;
meanNormal = MbVector3D::zero;
cdir1 = MbVector3D::zero;
cdir2 = MbVector3D::zero;
}
/// \ru Определена ли кривизна. \en Is curvature defined.
bool IsDefined() const { return meanNormal.Length2() > PARAM_EPSILON; }
};
+15
View File
@@ -132,6 +132,21 @@ namespace c3d {
x = -1.0;
return ::acos( x );
}
//------------------------------------------------------------------------------
/** \brief \ru Функция проверки является ли заданное число конечным.
\en Function to check whether the given number is finite. \~
\details \ru Функция проверки является ли заданное число конечным. \n
Если число имеет значение MB_INFINITY или MB_QNAN, то оно не является конечным. \n
\en Function to check whether the given number is finite. \n
If given number is MB_INFINITY or MB_QNAN then it is not finite. \n \~
\ingroup Base_Tools
*/
inline bool IsFinite( double val )
{
return isfinite( val );
}
}
//-----------------------------------------------------------------------------
+1 -30
View File
@@ -532,7 +532,7 @@ public :
/// \ru Является ли точка неопределенной? \en Is the point undefined?
bool IsUndefined() const { return (x == UNDEFINED_DBL || y == UNDEFINED_DBL); }
KNOWN_OBJECTS_RW_REF_OPERATORS( MbCartPoint )
KNOWN_OBJECTS_RW_REF_OPERATORS_EX( MbCartPoint, MATH_FUNC_EX )
DECLARE_NEW_DELETE_CLASS( MbCartPoint )
DECLARE_NEW_DELETE_CLASS_EX( MbCartPoint )
}; // MbCartPoint
@@ -1131,35 +1131,6 @@ inline void MbDirection::operator = ( const MbCartPoint & pnt )
}
////////////////////////////////////////////////////////////////////////////////
//
// \ru Глобальные функции \en Global functions
//
////////////////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------
/// \ru Чтение точки из потока. \en Reading of point from the stream.
// ---
inline reader & CALL_DECLARATION operator >> ( reader & in, MbCartPoint & obj ) {
in >> obj.x;
in >> obj.y;
return in;
}
//------------------------------------------------------------------------------
/// \ru Запись точки в поток. \en Writing of point to the stream.
// ---
inline writer & CALL_DECLARATION operator << ( writer & out, const MbCartPoint & obj ) {
out << obj.x;
out << obj.y;
return out;
}
////////////////////////////////////////////////////////////////////////////////
//
// \ru Глобальные функции \en Global functions
-1
View File
@@ -11,7 +11,6 @@
#define __MB_CROSS_POINT_H
#include <float.h>
#include <mb_cart_point.h>
+10 -1
View File
@@ -581,6 +581,8 @@ public:
bool switchFixFirstPointAtNoisy; ///< \ru Флаг фиксации сплайна в начальной точке. \en Flag of fixing a spline at the first point.
bool switchFixLastPointAtNoisy; ///< \ru Флаг фиксации сплайна в конечной точке. \en Flag of fixing a spline at the last point.
const MbNurbs3D * referenceCurve; ///< \ru Кривая для сравнения с результатом аппроксимации. \en Curve for result comparing.
/// \ru Выходные параметры. \en Output parameters.
MbeFairWarning warning; ///< \ru Предупреждение о работе. \en The operation warning. \~
MbResultType error; ///< \ru Ошибка о работе. \en The operation error. \~
@@ -608,8 +610,9 @@ public:
realAccuracyBSpl( METRIC_ACCURACY*0.1 ),
switchEndTangents( false ), switchEndCurvature( false ),
firstCurvature( 0.0 ), lastCurvature( 0.0 ), smoothTorsion( false ),
clearanceNoisy( 0.002 ), clearanceNoisyIteration( 200 ), scaleParam( 1.0 ),
clearanceNoisy( 0.002 ), clearanceNoisyIteration( 10 ), scaleParam( 1.0 ),
switchFixFirstPointAtNoisy( false ), switchFixLastPointAtNoisy( false ),
referenceCurve( nullptr ),
warning( fwarn_Success ), error( rt_Success ), errInfo() {}
~MbFairCurveData();
@@ -623,6 +626,12 @@ public:
//< \ru Получить данные для фиксации точек и касательных. \en Get данные для фиксации точек и касательных.
const IndexVectorArray & GetFixConstraints() const { return fixData; }
///< \ru Получить кривую для сравнения. \en Get curve for result comparing.
const MbNurbs3D * GetReferenceCurve() const { return referenceCurve; }
///< \ru Установить кривую для сравнения. \en Set curve for result comparing.
void SetReferenceCurve( const MbNurbs3D * pCurve ) { referenceCurve = pCurve; }
/// \ru Оператор присваивания. \en Assignment operator.
MbFairCurveData & operator = ( const MbFairCurveData & other );
+1 -19
View File
@@ -586,7 +586,7 @@ private:
void CheckRotation() const { ::CheckRotation( *this, flag, true ); }
public:
KNOWN_OBJECTS_RW_REF_OPERATORS( MbMatrix ) // \ru Для работы со ссылками и объектами класса \en For working with references and objects of the class.
KNOWN_OBJECTS_RW_REF_OPERATORS_EX( MbMatrix, MATH_FUNC_EX ) // \ru Для работы со ссылками и объектами класса \en For working with references and objects of the class.
DECLARE_NEW_DELETE_CLASS( MbMatrix )
DECLARE_NEW_DELETE_CLASS_EX( MbMatrix )
};
@@ -745,24 +745,6 @@ inline bool MbMatrix::IsSame( const MbMatrix & m2, double accuracy ) const
}
//------------------------------------------------------------------------------
// \ru чтение матрицы из потока \en Reading of matrix from stream
// ---
inline reader & CALL_DECLARATION operator >> ( reader & in, MbMatrix & obj ) {
in.readBytes( obj.el, sizeof(obj.el) );
obj.flag = MB_UNSET;
return in;
}
//------------------------------------------------------------------------------
// \ru Запись матрицы в поток \en Writing of matrix to the stream
// ---
inline writer & CALL_DECLARATION operator << ( writer & out, const MbMatrix & obj ) {
out.writeBytes( (double *)obj.el, sizeof(obj.el) );
return out;
}
//------------------------------------------------------------------------------
/**
\brief \ru Перемножить матрицы.
+1 -1
View File
@@ -11,7 +11,7 @@
#define __MB_MATRIX3D_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <mb_cart_point3d.h>
#include <mb_homogeneous3d.h>
+2
View File
@@ -278,6 +278,8 @@ enum MbResultType {
rt_CurveClosedBothSides, ///< \ru Кривая замкнулась с двух сторон. \en The curve has been closed at both sides.
rt_BeyondLimitsExtension, ///< \ru Продленная поверхностная кривая вышла за границы поверхности. \en Extended surface curve abandons surface boundary.
rt_NonBijectiveFunc, ///< \ru Отображение множества значений параметра функции во множество значений параметра кривой не является взаимно однозначным. \en A map from function parameter range to curve parameter range is not bijective.
// \ru !!! СТРОКИ ВСТАВЛЯТЬ СТРОГО ПЕРЕД ЭТОЙ СТРОКОЙ !!!! \en !!! INSERT LINES STRICTLY BEFORE THIS LINE !!!!
rt_ErrorTotal // \ru НИЖЕ НЕ ДОБАВЛЯТЬ! \en DON'T ADD BELOW!
};
+1 -1
View File
@@ -13,7 +13,7 @@
#include <templ_s_array.h>
#include <io_tape.h>
#include <io_tape_define.h>
#include <mb_enum.h>
#include <mb_property.h>
#include <mb_property_title.h>
+1
View File
@@ -17,6 +17,7 @@
#include <mb_cart_point3d.h>
#include <mb_cart_point.h>
#include <templ_sptr.h>
#include <vector>
+4
View File
@@ -19,6 +19,10 @@
/** \ru \name Общие константы
\en \name Common constants
\{ */
constexpr double MB_INFINITY = std::numeric_limits<double>::infinity(); ///< \ru Значение, обозначающее бесконечность для double. \en Value representing infinity for double.
constexpr double MB_QNAN = std::numeric_limits<double>::quiet_NaN(); ///< \ru "Тихое" нечисло. \en Quiet Not-A-Number.
constexpr double MB_MAXDOUBLE = 1.0E+300; ///< \ru Максимальное значение double 1.7976931348623158E+308. \en Maximum value of double 1.7976931348623158E+308.
constexpr double MB_MINDOUBLE = 1.0E-300; ///< \ru Минимальное значение double 2.2250738585072014E-308. \en Minimum value of double 2.2250738585072014E-308.
+3 -50
View File
@@ -15,7 +15,7 @@
#define __MB_VECTOR_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <mb_enum.h>
@@ -213,7 +213,7 @@ public :
/// \ru Являются ли объекты равными? \en Are the objects equal?
bool IsSame( const MbVector & other, double accuracy ) const;
KNOWN_OBJECTS_RW_REF_OPERATORS( MbVector )
KNOWN_OBJECTS_RW_REF_OPERATORS_EX( MbVector, MATH_FUNC_EX )
DECLARE_NEW_DELETE_CLASS( MbVector )
DECLARE_NEW_DELETE_CLASS_EX( MbVector )
}; // MbVector
@@ -711,7 +711,7 @@ public :
/// \ru Являются ли объекты равными? \en Are the objects equal?
bool IsSame( const MbDirection & other, double accuracy ) const;
KNOWN_OBJECTS_RW_REF_OPERATORS( MbDirection )
KNOWN_OBJECTS_RW_REF_OPERATORS_EX( MbDirection, MATH_FUNC_EX )
DECLARE_NEW_DELETE_CLASS( MbDirection )
DECLARE_NEW_DELETE_CLASS_EX( MbDirection )
}; // MbDirection
@@ -1054,53 +1054,6 @@ inline bool MbDirection::IsSame( const MbDirection & other, double accuracy ) co
////////////////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------
/// \ru Чтение вектора из потока. \en Reading vector from stream.
// ---
inline reader & CALL_DECLARATION operator >> ( reader & in, MbVector & obj ) {
in >> obj.x;
in >> obj.y;
return in;
}
//------------------------------------------------------------------------------
/// \ru Запись вектора в поток. \en Writing vector to stream.
// ---
inline writer & CALL_DECLARATION operator << ( writer & out, const MbVector & obj ) {
out << obj.x;
out << obj.y;
return out;
}
//------------------------------------------------------------------------------
/// \ru Чтение нормализованного вектора из потока. \en Reading normalized vector from stream.
// ---
inline reader & CALL_DECLARATION operator >> ( reader & in, MbDirection & obj ) {
in >> obj.ax;
in >> obj.ay;
return in;
}
//------------------------------------------------------------------------------
/// \ru Запись нормализованного вектора в поток. \en Writing normalized vector to stream.
// ---
inline writer & CALL_DECLARATION operator << ( writer & out, const MbDirection & obj ) {
out << obj.ax;
out << obj.ay;
return out;
}
////////////////////////////////////////////////////////////////////////////////
//
// \ru Глобальные функции \en Global functions
//
////////////////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------
/** \brief \ru Вычисление минимального угла между двумя векторами
\en Calculate minimal angle between two vectors \~
+21 -20
View File
@@ -11,7 +11,7 @@
#define __MB_VECTOR3D_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <mb_enum.h>
@@ -585,7 +585,8 @@ inline void MbVector3D::Add( const MbVector3D & v1, double t1, const MbVector3D
//------------------------------------------------------------------------------
// \ru Добавить к вектору значения. \en Add values to vector.
// ---
inline void MbVector3D::Add( const MbVector3D & v1, double t1, const MbVector3D & v2, double t2,
inline void MbVector3D::Add( const MbVector3D & v1, double t1,
const MbVector3D & v2, double t2,
const MbVector3D & v3, double t3 )
{
x += v1.x * t1 + v2.x * t2 + v3.x * t3;
@@ -641,9 +642,9 @@ inline MbVector3D operator * ( double factor, const MbVector3D & vector )
// ---
inline void MbVector3D::SetVecM( const MbVector3D & vF, const MbVector3D & vS )
{
x = vF.y * vS.z - vF.z * vS.y;
y = vF.z * vS.x - vF.x * vS.z;
z = vF.x * vS.y - vF.y * vS.x;
Init( vF.y * vS.z - vF.z * vS.y,
vF.z * vS.x - vF.x * vS.z,
vF.x * vS.y - vF.y * vS.x );
}
@@ -652,9 +653,9 @@ inline void MbVector3D::SetVecM( const MbVector3D & vF, const MbVector3D & vS )
// ---
inline void MbVector3D::SetVecM( const MbVector3D & vF, const MbVector3D & vS, double mulKoef )
{
x = ( vF.y * vS.z - vF.z * vS.y ) * mulKoef;
y = ( vF.z * vS.x - vF.x * vS.z ) * mulKoef;
z = ( vF.x * vS.y - vF.y * vS.x ) * mulKoef;
Init( ( vF.y * vS.z - vF.z * vS.y ) * mulKoef,
( vF.z * vS.x - vF.x * vS.z ) * mulKoef,
( vF.x * vS.y - vF.y * vS.x ) * mulKoef );
}
@@ -663,9 +664,9 @@ inline void MbVector3D::SetVecM( const MbVector3D & vF, const MbVector3D & vS, d
// ---
inline void MbVector3D::AddVecM( const MbVector3D & vF, const MbVector3D & vS )
{
x += vF.y * vS.z - vF.z * vS.y;
y += vF.z * vS.x - vF.x * vS.z;
z += vF.x * vS.y - vF.y * vS.x;
Init ( x + vF.y * vS.z - vF.z * vS.y,
y + vF.z * vS.x - vF.x * vS.z,
z + vF.x * vS.y - vF.y * vS.x);
}
@@ -674,9 +675,9 @@ inline void MbVector3D::AddVecM( const MbVector3D & vF, const MbVector3D & vS )
// ---
inline void MbVector3D::AddVecM( const MbVector3D & vF, const MbVector3D & vS, double mulKoef )
{
x += (vF.y * vS.z - vF.z * vS.y) * mulKoef;
y += (vF.z * vS.x - vF.x * vS.z) * mulKoef;
z += (vF.x * vS.y - vF.y * vS.x) * mulKoef;
Init ( x + (vF.y * vS.z - vF.z * vS.y) * mulKoef,
y + (vF.z * vS.x - vF.x * vS.z) * mulKoef,
z + (vF.x * vS.y - vF.y * vS.x) * mulKoef );
}
@@ -725,9 +726,9 @@ inline bool MbVector3D::IsSame( const MbVector3D & other, double accuracy ) cons
inline
void SetVecM( MbVector3D & vVec, const MbVector3D & vF, const MbVector3D & vS )
{
vVec.x = ( vF.y * vS.z - vF.z * vS.y );
vVec.y = ( vF.z * vS.x - vF.x * vS.z );
vVec.z = ( vF.x * vS.y - vF.y * vS.x );
vVec.Init( vF.y * vS.z - vF.z * vS.y,
vF.z * vS.x - vF.x * vS.z,
vF.x * vS.y - vF.y * vS.x );
}
//------------------------------------------------------------------------------
@@ -736,9 +737,9 @@ void SetVecM( MbVector3D & vVec, const MbVector3D & vF, const MbVector3D & vS )
inline
void SetVecM( MbVector3D & vVec, const MbVector3D & vF, const MbVector3D & vS, double mulKoef )
{
vVec.x = ( vF.y * vS.z - vF.z * vS.y ) * mulKoef;
vVec.y = ( vF.z * vS.x - vF.x * vS.z ) * mulKoef;
vVec.z = ( vF.x * vS.y - vF.y * vS.x ) * mulKoef;
vVec.Init( ( vF.y * vS.z - vF.z * vS.y ) * mulKoef,
( vF.z * vS.x - vF.x * vS.z ) * mulKoef,
( vF.x * vS.y - vF.y * vS.x ) * mulKoef );
}
+1 -1
View File
@@ -9,7 +9,7 @@
#ifndef __MESH_FLOAT_POINT3D_H
#define __MESH_FLOAT_POINT3D_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <mb_axis3d.h>
+1
View File
@@ -23,6 +23,7 @@
#ifndef __MESH_PLANE_GRID_H
#define __MESH_PLANE_GRID_H
#include <reference_item.h>
#include <templ_s_array.h>
#include <templ_p_array.h>
#include <mesh_float_point.h>
+2 -2
View File
@@ -1,4 +1,4 @@
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Полигоны.
@@ -12,7 +12,7 @@
#include <templ_s_array.h>
#include <io_tape.h>
#include <io_tape_define.h>
#include <mesh_primitive.h>
#include <mesh_float_point3d.h>
#include <mesh_float_point.h>
+4 -20
View File
@@ -31,7 +31,6 @@ class MATH_CLASS MbPolygon;
class MATH_CLASS MbFloatAxis3D;
class MATH_CLASS MbFloatPoint3D;
class MATH_CLASS MbGrid;
class MbGridTopology;
struct MbGridSearchTree;
@@ -64,8 +63,6 @@ typedef std::vector<const MbGrid *> ConstGridsVector;
typedef std::vector<GridSPtr> GridsSPtrVector;
typedef std::vector<ConstGridSPtr> ConstGridsSPtrVector;
typedef DPtr<MbGridTopology> GridTopologyPtr;
}
@@ -697,7 +694,6 @@ protected:
*/
mutable MbCube cube;
mutable MbGridSearchTree * searchTree; ///< \ru Дерево поиска элементов. \en Elements search tree.
mutable c3d::GridTopologyPtr topo; ///< \ru Дополнительная информация о топологии триангуляции. \en Additional information about a topology of the triangulation.
protected:
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en The copy constructor without implementation prevents from copying by default.
@@ -791,7 +787,6 @@ public:
AddPoint( pnts[k] );
}
DeleteSearchTree();
ResetGridTopology();
cube.SetEmpty();
}
/// \ru Добавить в триангуляцию нормали. \en Add normals to triangulation.
@@ -823,7 +818,6 @@ public:
for ( size_t k = 0; k < addCnt; ++k )
triangles.push_back( trngs[k] );
DeleteSearchTree();
ResetGridTopology();
}
/// \ru Добавить в триангуляцию объекты. \en Add objects to triangulation.
template <class QuadranglesVector>
@@ -834,7 +828,6 @@ public:
for ( size_t k = 0; k < addCnt; ++k )
quadrangles.push_back( qrngs[k] );
DeleteSearchTree();
ResetGridTopology();
}
/// \ru Добавить в коллекцию данных. \en Add scores to collection.
@@ -905,13 +898,13 @@ public:
virtual void NormalsInvert() = 0;
/// \ru Добавить треугольник. \en Add a triangle.
void AddTriangle( const MbTriangle & triangle ) { triangles.push_back( triangle ); DeleteSearchTree(); ResetGridTopology(); }
void AddTriangle( const MbTriangle & triangle ) { triangles.push_back( triangle ); DeleteSearchTree(); }
/// \ru Добавить треугольник с заданными номерами вершин. \en Add a triangle by the given indices of vertices
void AddTriangle( uint j0, uint j1, uint j2, bool o ) { MbTriangle t( j0, j1, j2, o ); triangles.push_back( t ); DeleteSearchTree(); ResetGridTopology(); }
void AddTriangle( uint j0, uint j1, uint j2, bool o ) { MbTriangle t( j0, j1, j2, o ); triangles.push_back( t ); DeleteSearchTree(); }
/// \ru Добавить четырёхугольник. \en Add a quadrangle.
void AddQuadrangle( const MbQuadrangle & quadrangle ) { quadrangles.push_back( quadrangle ); DeleteSearchTree(); ResetGridTopology(); }
void AddQuadrangle( const MbQuadrangle & quadrangle ) { quadrangles.push_back( quadrangle ); DeleteSearchTree(); }
/// \ru Добавить четырёхугольник с заданными номерами вершин. \en Add a quadrangle by the given indices of vertices.
void AddQuadrangle( uint j0, uint j1, uint j2, uint j3, bool o ) { MbQuadrangle t( j0, j1, j2, j3, o ); quadrangles.push_back( t ); DeleteSearchTree(); ResetGridTopology(); }
void AddQuadrangle( uint j0, uint j1, uint j2, uint j3, bool o ) { MbQuadrangle t( j0, j1, j2, j3, o ); quadrangles.push_back( t ); DeleteSearchTree(); }
/// \ru Добавить полигон. \en Add a polygon.
void AddGridLoop( MbGridLoop & poly ) { loops.push_back( &poly ); }
@@ -1236,15 +1229,6 @@ public:
\en Returns true if something was found. \~
*/
bool FindIntersectingElements( const MbAxis3D & ray, c3d::IndicesVector & triIndices, c3d::IndicesVector & quadIndices, double eps = METRIC_EPSILON ) const;
public:
/// \ru Готова ли топология триангуляции. \en Whether information about triangulation topology is ready.
bool IsGridTopologyReady() const { return topo != nullptr; }
/// \ru Создать новый временный объект информации о топологии. \en Create new temporary maintenance object information about triangulation topology.
const MbGridTopology * CreateGridTopology( bool keepExisting ) const;
/// \ru Получить временный объект информации о топологии. \en Get a temporary maintenance object information about triangulation topology.
const MbGridTopology * GetGridTopology() const { return topo.get(); }
/// \ru Удалить информацию о топологии. \en Delete a information about triangulation topology.
void ResetGridTopology() const;
protected:
/// \ru Переместить дерево поиска элементов. \en Move elements search tree.
void MoveSearchTree( const MbVector3D & ) const;
+1 -1
View File
@@ -9,7 +9,7 @@
#define __MODEL_TREE_DATA_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <templ_multimap.h>
#include <mb_cube.h>
#include <attribute_item.h>
+2 -2
View File
@@ -11,7 +11,7 @@
#define __NAME_FLAGS_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <math_define.h>
@@ -38,7 +38,7 @@ public:
/// \ru Получить все битовые флаги. \en Get all bit-flags.
uint8 GetFlags() const { return flags; }
KNOWN_OBJECTS_RW_REF_OPERATORS( MbFlags )
KNOWN_OBJECTS_RW_REF_OPERATORS_EX( MbFlags, MATH_FUNC_EX )
};
+1 -1
View File
@@ -15,7 +15,7 @@
#include <templ_s_array_rw.h>
#include <templ_css_array.h>
#include <reference_item.h>
#include <io_tape.h>
#include <io_tape_define.h>
#include <hash32.h>
#include <mb_enum.h>
#include <name_version.h>
+1
View File
@@ -13,6 +13,7 @@
#include <math_define.h>
#include <mb_variables.h>
#include <mb_cart_point3d.h>
#include <hash32.h>
class MATH_CLASS MbMatrix3D;
+16 -11
View File
@@ -217,9 +217,9 @@ public:
/// \ru Получить конец кривой на первой поверхности. \en Get the curve end on the first surface.
const MbCartPoint & GetSurf1End() const { return _uv1end; }
/// \ru Получить начало кривой на второй поверхности. \en Get the curve beginning on the second surface.
const MbCartPoint & GetSurf2Beg() const { return _uv1beg; }
const MbCartPoint & GetSurf2Beg() const { return _uv2beg; }
/// \ru Получить конец кривой на второй поверхности. \en Get the curve end on the second surface.
const MbCartPoint & GetSurf2End() const { return _uv1end; }
const MbCartPoint & GetSurf2End() const { return _uv2end; }
/// \ru Строить ли кривую на расширении первой поверхности. \en Whether to build the curve on the first surface extension.
bool IfSurf1Ext () const { return _ext1; }
@@ -255,9 +255,9 @@ enum MbeIntCurveBuildType {
//------------------------------------------------------------------------------
/** \brief \ru Параметры кривой пересечения поверхностей.
\en Parameters of an surface intersection curve. \~
\details \ru Параметры эквидистантной кривой в пространстве по трехмерной кривой и вектору направления. \n
\en Parameters of an offset curve in space from a three-dimensional curve and a direction vector. \n \~
\en Parameters of a surface intersection curve. \~
\details \ru Параметры кривой пересечения поверхностей. Варианты работы см. в #MbeIntCurveBuildType. \n
\en Parameters of a surface intersection curve. Work cases are in #MbeIntCurveBuildType. \n \~
\ingroup Curve3D_Building_Parameters
*/ // ---
class MATH_CLASS MbIntCurveParams {
@@ -736,10 +736,6 @@ public:
\en Parameters of extension from the end point. \~
\param[in] allowClosure - \ru Допустимо ли замыкание удлиненной кривой.
\en Whether closure of the extended curve is allowed. \~
\param[in] alongSurface - \ru Если true, то будет удлинена параметрическая (2D) кривая.
Если false, будет удлинена пространственная (3D) кривая.
\en If that is true then the parametric (2D) curve will be extended.
If that is false then the spatial (3D) curve will be extended.\~
\param[in] operName - \ru Именователь операции.
\en An object defining names generation in the operation. \~
*/
@@ -809,7 +805,7 @@ public:
VERSION GetVersion() const { return _operName->GetMathVersion(); }
/// \ru Минимальная величина зазора (в параметрическом пространстве) для случая, когда запрещено создания замкнутых кривых. \en Minimal gap value (in parametric space) for case when closed result curves are forbidden. \~
double GetMinUnclosedGap() const { return GetPrecision(); }
double GetMinUnclosedGap() const { return Math::metricPrecision; }
/// \ru Оператор присваивания. \en Assignment operator. \~
MbCurveExtensionParameters & operator=( const MbCurveExtensionParameters & other );
@@ -1543,6 +1539,8 @@ public:
bool _fixFirstPointNoisy; ///< \ru Флаг фиксации сплайна в начальной точке. \en Flag of fixing a spline at the first point.
bool _fixLastPointNoisy; ///< \ru Флаг фиксации сплайна в конечной точке. \en Flag of fixing a spline at the last point.
const MbNurbs3D * _referenceCurve; ///< \ru Кривая для сравнения с результатом аппроксимации. \en Curve for result comparing.
// \ru Диагностика. \en The diagnostics.
MbeFairWarning _warning; ///< \ru Предупреждение о работе. \en The operation warning. \~
MbResultType _error; ///< \ru Ошибка о работе. \en The operation error. \~
@@ -1558,8 +1556,9 @@ public:
_accountCurvature( fairCur_No ), _accountVectorInflect( fairVector_Tangent ), _fixPointTangent( fixPntTng_NotFix ),
_degree( 8 ), _approx( fairApprox_IsoSpline ), _tangentCorrect( true ),
_smoothTorsion( false ), _iterationsNumber( 1000 ),
_noisyDeviation( 0.002 ), _noisyIterations( 200 ),
_noisyDeviation( 0.002 ), _noisyIterations( 10 ),
_fixFirstPointNoisy( false ), _fixLastPointNoisy( false ),
_referenceCurve( nullptr ),
#ifdef C3D_DEBUG_FAIR_CURVES
prt( nullptr ),
#endif
@@ -1573,6 +1572,12 @@ public:
//< \ru Получить данные для фиксации точек и касательных. \en Get данные для фиксации точек и касательных.
const IndexVectorArray & GetFixConstraints() const { return _fixData; }
///< \ru Получить кривую для сравнения. \en Get curve for result comparing.
const MbNurbs3D * GetReferenceCurve() const { return _referenceCurve; }
///< \ru Установить кривую для сравнения. \en Set curve for result comparing.
void SetReferenceCurve( const MbNurbs3D * pCurve ) { _referenceCurve = pCurve; }
/// \ru Оператор присваивания. \en Assignment operator.
MbFairCreateData & operator = ( const MbFairCreateData & other );
+1 -1
View File
@@ -12,7 +12,7 @@
#include <math_x.h> // \ru СМВ для компиляции ICC \en СМВ for compilation by ICC
#include <io_tape.h>
#include <io_tape_define.h>
#include <templ_ifc_array.h>
#include <templ_sptr.h>
#include <pars_tree_variable.h>
+2 -1
View File
@@ -9,7 +9,8 @@
#ifndef __ITTREEVARS_H
#define __ITTREEVARS_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <templ_ss_array.h>
class DefRange;
class BTreeNode;
+1 -1
View File
@@ -11,7 +11,7 @@
#define __PARS_USER_FUNCTION_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <templ_p_array.h>
#include <templ_ifc_array.h>
#include <pars_tree_variable.h>
+1 -1
View File
@@ -25,7 +25,7 @@ struct ItIntervalTreeVariable;
/// \ru Максимальная длина переменной. \en Maximum length of variable.
constexpr size_t MAX_VARIABLE_NAME_LENGTH = 512;
/// \ru Максимальная длина выражения. \en Maximum length of expression.
constexpr size_t MAX_EQU_LENGTH = 2048;
constexpr size_t MAX_EQU_LENGTH = 8192; // C3D-5977.
//-------------------------------------------------------------------------------
+1 -1
View File
@@ -11,7 +11,7 @@
#define __PLANE_ITEM_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <reference_item.h>
#include <item_registrator.h>
#include <mb_variables.h>
+1 -1
View File
@@ -11,10 +11,10 @@
#define __POINT_FRAME_H
#include <space_item.h>
#include <templ_s_array.h>
#include <templ_rp_array.h>
#include <mb_cart_point3d.h>
#include <space_item.h>
#include <topology.h>
#include <model_item.h>
#include <math_define.h>
+1
View File
@@ -19,6 +19,7 @@
#include <system_cpp_standard.h>
#include <system_dependency.h>
#include <tool_memory_leaks_check.h>
#include <mb_variables.h>
#include <vector>
+3
View File
@@ -98,6 +98,9 @@ public :
// \ru Дать все объекты указанного типа. \en Get all objects by type. \~
bool GetItems( MbeSpaceType type, const MbMatrix3D & from,
RPArray<MbItem> & items, SArray<MbMatrix3D> & matrs ) override;
// \ru Дать все объекты указанного типа. \en Get all objects by type. \~
bool GetItems( MbeSpaceType type, const MbMatrix3D & from,
std::vector<SPtr<MbItem>> & items, std::vector<MbMatrix3D> & matrs ) override;
// \ru Дать все уникальные объекты указанного типа. \en Get all unique objects by type . \~
bool GetUniqItems( MbeSpaceType type, CSSArray<const MbItem *> & items ) const override;
+2 -2
View File
@@ -11,9 +11,9 @@
#define __SPACE_ITEM_H
#include <io_tape.h>
#include <templ_rp_array.h>
#include <io_tape_define.h>
#include <reference_item.h>
#include <templ_rp_array.h>
#include <item_registrator.h>
#include <mb_variables.h>
#include <mb_data.h>
+1
View File
@@ -224,6 +224,7 @@ public:
void CalculateLocalGabarit( const MbMatrix3D &, MbCube & ) const override; // \ru Рассчитать габарит относительно л.с.к. \en Calculate bounding box relative to the local coordinate system.
MbSplineSurface * NurbsSurface( double, double, double, double, bool bmatch = false ) const override; // \ru NURBS копия поверхности. \en NURBS copy of a surface.
MbSurface * NurbsSurface( const MbNurbsParameters & uParam, const MbNurbsParameters & vParam ) const override; // \ru NURBS копия поверхности. \en NURBS copy of a surface.
MbSurface * Offset( double d, bool same ) const override; // \ru Создание эквидистантной поверхности. \en Create an offset surface.
// \ru Подобные ли поверхности для объединения (слива) \en Whether the surfaces to union (joining) are similar
+1
View File
@@ -15,6 +15,7 @@
#include <templ_dptr.h>
#include <mb_placement3d.h>
#include <mb_matrix3d.h>
#include <tool_multithreading.h>
class MATH_CLASS MbSurfaceContiguousData;
+17 -28
View File
@@ -100,7 +100,6 @@ inline uint8 GetBValue(COLORREF rgb_color)
#include <algorithm>
#include <chrono>
// #error <thread> is not supported when compiling with /clr or /clr:pure.
// #include <thread>
@@ -123,6 +122,7 @@ inline uint8 GetBValue(COLORREF rgb_color)
#endif
class MbTimerImp;
//------------------------------------------------------------------------------
/** \brief \ru Высокоточный таймер.
\en High resolution timer. \~
@@ -131,17 +131,17 @@ inline uint8 GetBValue(COLORREF rgb_color)
\ingroup Base_Tools
*/
// ---
class MbAccurateTimer {
typedef std::chrono::high_resolution_clock::time_point TimePoint;
class MATH_CLASS MbAccurateTimer {
protected:
double lastTime; ///< \ru Время в секундах. \en Time in seconds.
double lastTime; ///< \ru Время в секундах. \en Time in seconds.
private:
TimePoint begTime; ///< \ru Засечка времени. \en Time stamp.
MbTimerImp * imp; ///< \ru Реализация таймера. \en Timer implementation.
public:
/// \ru Конструктор. \en Constructor.
MbAccurateTimer() : lastTime( 0.0 ) {}
virtual ~MbAccurateTimer() {}
MbAccurateTimer();
/// \ru Деструктор. \en Destructor.
virtual ~MbAccurateTimer();
/// \ru Сброшен ли таймер. \en Is empty timer?
virtual bool IsEmpty () const { return !(lastTime > 0.0); }
@@ -160,25 +160,6 @@ public:
};
//------------------------------------------------------------------------------
// \ru Начать отсчет. \en Start time measurement.
//---
inline void MbAccurateTimer::Begin()
{
begTime = std::chrono::high_resolution_clock::now();
}
//------------------------------------------------------------------------------
// \ru Закончить отсчет. \en Finish time measurement.
// ---
inline void MbAccurateTimer::End()
{
TimePoint endTime = std::chrono::high_resolution_clock::now();
double t = std::chrono::duration_cast< std::chrono::duration<double> >(endTime - begTime).count();
SetTime( t );
}
//------------------------------------------------------------------------------
/** \brief \ru Таймер со статистикой.
\en Average timer. \~
@@ -187,22 +168,30 @@ inline void MbAccurateTimer::End()
\ingroup Base_Tools
*/
// ---
class MbAverageTimer : public MbAccurateTimer
class MATH_CLASS MbAverageTimer : public MbAccurateTimer
{
double avgTime; ///< \ru Среднее время в секундах. \en Average time in seconds.
double minTime; ///< \ru Минимальное время в секундах. \en Min. time in seconds.
double maxTime; ///< \ru Максимальное время в секундах. \en Max. time in seconds.
uint runCount; ///< \ru Количество запусков. \en Number of samples.
uint runCount; ///< \ru Количество запусков. \en Number of launches.
public:
/// \ru Конструктор. \en Constructor.
MbAverageTimer() : avgTime( 0.0 ), minTime( 0.0 ), maxTime ( 0.0 ), runCount( 0 ) {}
/// \ru Деструктор. \en Destructor.
virtual ~MbAverageTimer() {}
///< \ru Пустой таймер? \en Empty timer?
virtual bool IsEmpty() const { return (runCount == 0); }
///< \ru Сбросить таймер. \en Reset timer.
virtual void SetEmpty();
///< \ru Добавить значение. \en Add value.
virtual bool SetTime( double );
///< \ru Получить cреднее время в секундах. \en Get average time in seconds.
double GetAvg() const { return avgTime; }
///< \ru Получить минимальное время в секундах. \en Get minimal time in seconds.
double GetMin() const { return minTime; }
///< \ru Получить максимальное время в секундах. \en Get maximal time in seconds.
double GetMax() const { return maxTime; }
};
+1 -1
View File
@@ -73,7 +73,7 @@ typedef uint32 VERSION; ///< \ru Версия. \en Version. \~
/** \} */ //addtogroup Base_Tools
#include <memory>
#include <float.h>
//------------------------------------------------------------------------------
// \ru Системные лимиты \en System limits
//---
+4
View File
@@ -550,6 +550,9 @@ public:
*/
CommonMutex * GetLock() const;
protected:
MbPersistentSyncItem( const MbPersistentSyncItem & );
MbPersistentSyncItem & operator = ( const MbPersistentSyncItem & );
};
//------------------------------------------------------------------------------
@@ -582,6 +585,7 @@ public:
\en Get a pointer to the mutex object.
*/
CommonRecursiveMutex * GetLock() const;
protected:
MbPersistentNestSyncItem( const MbPersistentNestSyncItem & );
MbPersistentNestSyncItem & operator = ( const MbPersistentNestSyncItem & );
+1 -1
View File
@@ -11,7 +11,7 @@
#define __TOPOLOGY_ITEM_H
#include <io_tape.h>
#include <io_tape_define.h>
#include <name_item.h>
#include <mb_enum.h>
#include <reference_item.h>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.