Extern :
- C3d aggiornamento librerie ( 118027).
This commit is contained in:
@@ -488,8 +488,10 @@ MATH_FUNC( MbResultType ) ConvertCollectionToShell( MbCollection & collection, M
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
\ingroup Polygonal_Objects
|
||||
\deprecated
|
||||
*/
|
||||
// ---
|
||||
DEPRECATE_DECLARE_REPLACE( MbSurfaceFitter )
|
||||
MATH_FUNC( MbResultType ) FitSurfaceToGrid( const MbGrid & grid, const MbSurfaceFitToGridParameters & params, MbSurfaceFitToGridResults & results );
|
||||
|
||||
#endif // __ACTION_B_SHAPER_H
|
||||
|
||||
@@ -199,16 +199,40 @@ MATH_FUNC (MbResultType) CollectFacesForModification( MbFaceShell * shell,
|
||||
\en Results of the modifcation. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
Возможные коды ошибок:
|
||||
Для всех типов:
|
||||
rt_Success -- Ошибок нет.
|
||||
rt_Error -- Неизвестная ошибка.
|
||||
rt_IncorrectData -- Некорректные данные.
|
||||
rt_ParameterError -- Ошибочный параметр.
|
||||
Для типа dmm_ReplaceGroupFaces:
|
||||
rt_StitchShellsError -- Невозможно сшить итоговоую оболочку.
|
||||
rt_CuttingError -- Невозможно усечь оболочку новой группой граней.
|
||||
rt_NoFacesForModification -- Ошибка в параметрах. Отсутствуют заменяемые грани.
|
||||
rt_NoReplacementFaces -- Ошибка в параметрах. Отсутствуют заменяющие грани.
|
||||
rt_ConnectionError -- Ошибка в параметрах. Нарушена связность группы граней.
|
||||
rt_FacesGroupsOverlapError -- Ошибка в параметрах. Среди заменяющих граней есть заменяемые, массивы не должны пересекаться.
|
||||
rt_NoEdgesForBuild -- Отсутствуют граничные рёбра в заменяемой оболочке.
|
||||
rt_OffsetError -- Невозможно эквидистантно сдвинуть оболочку.
|
||||
rt_ExtensionOutOfRange -- Невозможно продлить оболочку.
|
||||
rt_SolidError -- Невозможно собрать оболочку из заменяющих граней.
|
||||
rt_CuttingError -- Невозможно усечь оболочку новой группой граней.
|
||||
rt_StitchShellsError -- Невозможно сшить итоговую оболочку.
|
||||
\en Returns operation result code.
|
||||
Possible error codes:
|
||||
For all types:
|
||||
rt_Success -- No errors.
|
||||
rt_Error -- Unknown error.
|
||||
rt_IncorrectData -- Incorrect data.
|
||||
rt_ParameterError -- Wrong parameter.
|
||||
For the type dmm_ReplaceGroupFaces:
|
||||
rt_StitchShellsError -- Impossible to stitch the final shell.
|
||||
rt_CuttingError -- Impossible to cut the shell with the new faces group
|
||||
rt_FacesGroupsOverlapError -- Parameter error. There are replacement faces among the replaced faces. Those arrays must not overlap. \~
|
||||
rt_NoFacesForModification -- Parameter error. There are no replaced faces.
|
||||
rt_NoReplacementFaces -- Parameter error. There are no replacement faces.
|
||||
rt_ConnectionError -- Parameter error. Broken connectivity of the face group.
|
||||
rt_FacesGroupsOverlapError -- Parameter error. There are replacement faces among the replaced faces. Those arrays must not overlap.
|
||||
rt_NoEdgesForBuild -- There are no boundary edges in the replaced shell.
|
||||
rt_OffsetError -- Cannot move the shell equidistantly.
|
||||
rt_ExtensionOutOfRange -- The shell cannot be extended.
|
||||
rt_SolidError -- Cannot make the shell from replacement faces.
|
||||
rt_CuttingError -- Impossible to cut the shell with the new faces group.
|
||||
rt_StitchShellsError -- Impossible to stitch the final shell. \~
|
||||
\ingroup Direct_Modeling
|
||||
*/
|
||||
// ---
|
||||
|
||||
@@ -31,6 +31,8 @@ class MbMeshSmoothingParams;
|
||||
class MbPolyline3D;
|
||||
class MbPolylinePolymeshProjectParams;
|
||||
class MbPolylinePolymeshProjectResults;
|
||||
class MbFillClosedCurveParams;
|
||||
class MbFillPolymeshHoleParams;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -94,11 +96,11 @@ MATH_FUNC( void ) GetConnectedRegionGroups( const MbPolymesh &
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Разбить сетку на регионы согласно критерию границы.
|
||||
\en Divide a polymesh into regions according to a given border criterion. \~
|
||||
\en Divide a polymesh into regions according to a given boundary criterion. \~
|
||||
\param[in] mesh - \ru Полигональный объект с топологией.
|
||||
\en A polygonal object with topology. \~
|
||||
\param[in] crit - \ru Критерий границы.
|
||||
\en Border criterion. \~
|
||||
\en Boundary criterion. \~
|
||||
\param[out] facets - \ru Группы фасетов, разделенные по регионам.
|
||||
\en Groups of facets divided into regions. \~
|
||||
\warning \ru В разработке.
|
||||
@@ -111,11 +113,11 @@ MATH_FUNC( void ) GetPolymeshRegions( const MbPolymesh & me
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить регион сетки согласно критерию границы по указанному фасету-затравке.
|
||||
\en Get the region containing a given facet according to a given border criterion. \~
|
||||
\en Get the region containing a given facet according to a given boundary criterion. \~
|
||||
\param[in] mesh - \ru Полигональный объект с топологией.
|
||||
\en A polygonal object with topology. \~
|
||||
\param[in] crit - \ru Критерий границы.
|
||||
\en Border criterion. \~
|
||||
\en Boundary criterion. \~
|
||||
\param[in] seed - \ru Фасет-затравка.
|
||||
\en A seed facet. \~
|
||||
\param[out] facets - \ru Все фасеты региона.
|
||||
@@ -129,6 +131,23 @@ MATH_FUNC( void ) GetPolymeshRegion( const MbPolymesh & mes
|
||||
c3d::IndicesVector & facets );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить границы региона фасетов.
|
||||
\en Get the boundary edges of a given region. \~
|
||||
\param[in] mesh - \ru Полигональный объект с топологией.
|
||||
\en A polygonal object with topology. \~
|
||||
\param[in] region - \ru Набор фасетов, составляющих регион.
|
||||
\en Facet array which forms a region. \~
|
||||
\param[out] boundaries - \ru Границы региона (набор граничных ребер).
|
||||
\en Boundary edges of a region. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/ // ---
|
||||
MATH_FUNC( void ) GetPolymeshRegionBoundaries( const MbPolymesh & mesh,
|
||||
const c3d::IndicesVector & region,
|
||||
std::vector<c3d::IndicesVector> & boundaries );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить границы региона фасетов.
|
||||
\en Get the border edges of a given region. \~
|
||||
@@ -141,11 +160,25 @@ MATH_FUNC( void ) GetPolymeshRegion( const MbPolymesh & mes
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/ // ---
|
||||
MATH_FUNC( void ) GetPolymeshRegionBorders( const MbPolymesh & mesh,
|
||||
const c3d::IndicesVector & region,
|
||||
DEPRECATE_DECLARE_REPLACE( GetPolymeshRegionBoundaries )
|
||||
MATH_FUNC( void ) GetPolymeshRegionBorders( const MbPolymesh & mesh,
|
||||
const c3d::IndicesVector & region,
|
||||
std::vector<c3d::IndicesVector> & borders );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить открытые границы сетки.
|
||||
\en Get the open boundary edges of a polymesh. \~
|
||||
\param[in] mesh - \ru Полигональный объект с топологией.
|
||||
\en A polygonal object with topology. \~
|
||||
\param[out] boundaries - \ru Открытые границы (наборы граничных ребер).
|
||||
\en Arrays of open boundary edges. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/ // ---
|
||||
MATH_FUNC( void ) GetPolymeshOpenBoundaries( const MbPolymesh & mesh, std::vector<c3d::IndicesVector> & boundaries );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить открытые границы сетки.
|
||||
\en Get the open border edges of a polymesh. \~
|
||||
@@ -156,9 +189,23 @@ MATH_FUNC( void ) GetPolymeshRegionBorders( const MbPolymesh &
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/ // ---
|
||||
DEPRECATE_DECLARE_REPLACE( GetPolymeshOpenBoundaries )
|
||||
MATH_FUNC( void ) GetPolymeshOpenBorders( const MbPolymesh & mesh, std::vector<c3d::IndicesVector> & borders );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить открытые границы сегментации.
|
||||
\en Get open segmentation boundaries. \~
|
||||
\param[in] mesh - \ru Полигональный объект с топологией.
|
||||
\en A polygonal object with topology. \~
|
||||
\param[out] boundaries - \ru Открытые границы (наборы граничных ребер сегментации).
|
||||
\en Arrays of open boundary edges of a segmentation. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/ // ---
|
||||
MATH_FUNC( void ) GetSegmOpenBoundaries( const MbPolymesh & mesh, std::vector<c3d::IndicesVector> & boundaries );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить открытые границы сегментации.
|
||||
\en Get open segmentation borders. \~
|
||||
@@ -169,6 +216,7 @@ MATH_FUNC( void ) GetPolymeshOpenBorders( const MbPolymesh & mesh, std::vector<c
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/ // ---
|
||||
DEPRECATE_DECLARE_REPLACE( GetSegmOpenBoundaries )
|
||||
MATH_FUNC( void ) GetSegmOpenBorders( const MbPolymesh & mesh, std::vector<c3d::IndicesVector> & borders );
|
||||
|
||||
|
||||
@@ -342,7 +390,6 @@ MATH_FUNC( MbResultType ) MergePolymeshes( const MbPolymesh & meshFrom, const Mb
|
||||
MATH_FUNC( MbResultType ) SmoothPolymesh( const MbMeshSmoothingParams & params, MbPolymesh & mesh );
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Спроецировать полилинию на полигональный объект.
|
||||
\en Project a polyline on a polygonal object. \~
|
||||
@@ -365,4 +412,41 @@ MATH_FUNC( MbResultType ) SmoothPolymesh( const MbMeshSmoothingParams & params,
|
||||
MATH_FUNC( MbResultType ) ProjectPolylineOnPolymesh( MbPolymesh & mesh, const MbPolylinePolymeshProjectParams & params, MbPolylinePolymeshProjectResults & results );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Заполнить отверстие, заданное замкнутой кривой.
|
||||
\en Fill a hole defined by a closed curve. \~
|
||||
\details \ru Заполнить отверстие, заданное замкнутой кривой.
|
||||
\en Fill a hole defined by a closed curve. \~
|
||||
\param[in] params - \ru Параметры заполнения.
|
||||
\en Filling parameters. \~
|
||||
\param[out] patch - \ru Заплатка.
|
||||
\en A patch. \~
|
||||
\return \ru Код результата операции.
|
||||
\en Returns the operation result code. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/ // ---
|
||||
MATH_FUNC( MbResultType ) FillClosedCurve( const MbFillClosedCurveParams & params, MbPolymesh & patch );
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Заполнить отверстие полигонального объекта.
|
||||
\en Fill a polygonal object hole. \~
|
||||
\details \ru Заполнить отверстие полигонального объекта.
|
||||
В результате операции в полигональном объекте могут появиться неактивные элементы.
|
||||
Впоследствии их можно удалить вручную функцией DeleteInactive.
|
||||
\en Fill a polygonal object hole.
|
||||
Some inactive elements can appear during the operation.
|
||||
They should be explicitly removed by the DeleteInactive function afterwards. \~
|
||||
\param[in] params - \ru Параметры заполнения.
|
||||
\en Filling parameters. \~
|
||||
\param[in-out] mesh - \ru Полигональный объект.
|
||||
\en A polygonal object. \~
|
||||
\return \ru Код результата операции.
|
||||
\en Returns the operation result code. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/ // ---
|
||||
MATH_FUNC( MbResultType ) FillPolymeshHole( const MbFillPolymeshHoleParams & params, MbPolymesh & mesh );
|
||||
|
||||
|
||||
#endif // __ACTION_POLYMESH_H
|
||||
|
||||
@@ -114,10 +114,8 @@ public:
|
||||
void GetBasisPoints( MbControlData3D & ) const override; // \ru Выдать контрольные точки объекта. \en Get control points of object.
|
||||
void SetBasisPoints( const MbControlData3D & ) override; // \ru Изменить объект по контрольным точкам. \en Change the object by control points.
|
||||
|
||||
// \ru Выдать локальную систему координат объектов сборки. \en Get the local coordinate system of assembly items.
|
||||
bool GetPlacement( MbPlacement3D & ) const override;
|
||||
// \ru Установить локальную систему координат объектов сборки. \en Set coordinate system of assembly items.
|
||||
bool SetPlacement( const MbPlacement3D & ) override;
|
||||
// \ru Выдать локальную систему координат. Объект сборки не имеет локальной системы координат, для него всегда возвращается глобальная система координат. \en Get the local coordinate system. An assembly object does not have a local coordinate system, the global coordinate system is always returned for it.
|
||||
inline bool GetPlacement( MbPlacement3D & p ) const { p = MbPlacement3D::global; return true; }
|
||||
// \ru Перестроить объект по журналу построения. \en Rebuild object according to the history tree.
|
||||
bool RebuildItem( MbeCopyMode sameShell, RPArray<MbSpaceItem> * items, IProgressIndicator * progInd ) override;
|
||||
// \ru Создать полигональный объект - упрощенную копию данного объекта. \en Create a polygonal object - a simplified copy of the given object.
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <math_define.h>
|
||||
#include <mb_placement3d.h>
|
||||
#include <mb_data.h>
|
||||
#include <op_mesh_parameter.h>
|
||||
#include <conv_predefined.h>
|
||||
#include <reference_item.h>
|
||||
#include <conv_requestor.h>
|
||||
@@ -131,6 +132,8 @@ enum MbeIOPermiss {
|
||||
iop_wStyle, ///< \ru Разрешение на запись элементов оформления (цвет, начертание, и т.п.). \en Export appearance
|
||||
iop_rCS, ///< \ru Разрешение на чтение систем координат. \en Import coordinate sistems.
|
||||
iop_wCS, ///< \ru Разрешение на запись систем координат. \en Export coordinate sistems.
|
||||
iop_rBounds, ///< \ru Разрешение на чтение объектов, ограничивающих объем или площадь. \en Import items that is the boundary of an area or volume.
|
||||
iop_wBounds, ///< \ru Разрешение на запись объектов, ограничивающих объем или площадь. \en Export items that is the boundary of an area or volume.
|
||||
iop_END
|
||||
};
|
||||
|
||||
@@ -410,6 +413,7 @@ public:
|
||||
/// \ru Получить имя документа. \en Get document's name.
|
||||
virtual const std::string GetDocumentName () const = 0; //{ return std::string( GetDocName().get_str() ); };
|
||||
/// \ru Получить имя файла для конвертирования. \en Get file name for converting.
|
||||
//DEPRECATE_DECLARE
|
||||
virtual const c3d::path_string FullFilePath() const = 0;//{ return c3d::path_string( GetFileName().c_str() ); };
|
||||
/// \ru Является ли файл текстовым. \en Whether the file is a text file.
|
||||
virtual bool IsFileAscii () const = 0;
|
||||
@@ -418,6 +422,7 @@ public:
|
||||
/// \ru Следует ли экспортировать только поверхности ( введено для работы конвертера IGES ). \en Whether to export only surfaces (introduced for work with converter IGES ).
|
||||
virtual bool IsOutOnlySurfaces() const = 0;
|
||||
/// \ru Является ли экспортируемый документ сборкой. \en Whether the document for export is an assembly.
|
||||
DEPRECATE_DECLARE
|
||||
virtual bool IsAssembling () const = 0;
|
||||
/// \ru Получить значение разрешения на импорт экспорт объектов определенного типа. \en Get the value of permission for import-export of objects of a certain type.
|
||||
virtual bool GetIoPermission( MbeIOPermiss nPermission ) const = 0;
|
||||
@@ -425,17 +430,19 @@ public:
|
||||
virtual void GetIoPermissions( std::vector<bool>& ioPermissions ) const = 0;
|
||||
/// \ru Установить разрешение на импорт экспорт объектов определенного типа. \en Set permission for import-export of objects of a certain type.
|
||||
virtual void SetIoPermission( MbeIOPermiss nPermission, bool set ) = 0;
|
||||
/// \ru Получить значение специфичной строки для конвертера. \en Get the value of a certain string for the converter.
|
||||
/// \ru Получить строку заголовка файла. \en Get file header string.
|
||||
virtual bool GetPropertyString ( MbeConverterStrings nString, std::string & propertyString ) const = 0;
|
||||
/// \ru Установить значение специфичной строки для конвертера. \en Set the value of a certain string for the converter.
|
||||
/// \ru Установить строку заголовка файла. \en Set file header string.
|
||||
virtual void SetPropertyString ( MbeConverterStrings nString, const std::string & propertyString ) = 0;
|
||||
/// \ru Представление текста в аннотационных объектах. \en Text representation in annotation objects.
|
||||
DEPRECATE_DECLARE
|
||||
virtual eTextForm GetAnnotationTextRepresentation () const { return exf_TextOnly; }
|
||||
/** \brief \ru Следует ли компоненты экспортировать в разные файлы (если позволяет формат).
|
||||
\en Export components into separate files ( if provided in format). \~
|
||||
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
|
||||
\en EXPEREIMENTAL \~.
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
virtual bool ExportComponentsSeparately() const { return false; }
|
||||
/// \ru Получить ЛСК, относительно которой позиционирована модель. \en Get the location, the model is placed in.
|
||||
virtual MbPlacement3D GetOriginLocation() const = 0;
|
||||
@@ -532,6 +539,9 @@ public:
|
||||
|
||||
/// \ru Импортировать полигональные объекты как объекты с топологической информацией. \en Import polygonal objects as objects with topological information.
|
||||
virtual bool ImportMeshesWithTopology() const { return false; }
|
||||
|
||||
/// \ru Лечить ли неправильные сетки, и параметры для лечения. \en Whether to repair inconsistent meshes, and parameters for repairing.
|
||||
virtual bool RepairInconsistentMesh(MbRepairInconsistentMeshParams&) { return false; }
|
||||
}; // IConvertorProperty3D
|
||||
|
||||
|
||||
@@ -580,6 +590,8 @@ public:
|
||||
bool attatchIdAttributes; ///< \ru Следует ли формировать атрибут на основе идентификатора элемнта в файле. \en Whether to attatch the element's id in file as attribute.
|
||||
bool auditEnabled;
|
||||
bool importMeshesWithTopology; ///< \ru Сохранять сетки в MbMesh (false) или в MbPolymesh (true). \en Save meshes to MbMesh (false) or to MbPolymesh (true).
|
||||
bool repairInconsistentMesh; /// \ru Лечить ли неправильные сетки. \en Whether to repair inconsistent meshes.
|
||||
MbRepairInconsistentMeshParams repairInconsistentMeshParams; /// \ru Параметры для лечения неправильных сеток. \en Parameters for repairing inconsistent meshes.
|
||||
ColorProcessing visualPropertiesFormation; ///< \ru Способ формирования визуальных свойст при чтении из C3D. \en The way how visual properties form while reading from C3D.
|
||||
SPtr<IProductIdMaker> pruductIdMaker; ///< \ru Генератор однострочного идентификатора по данным об изделии. \en Generator of a single-line id based on product information attribute.
|
||||
SPtr<IScaleRequestor> scaleRequester; /// \ru Запросчик масштабного коэффициента единиц длины. \en Scale requester.
|
||||
@@ -604,6 +616,7 @@ public:
|
||||
const std::string GetDocumentName () const override { return docName; };
|
||||
|
||||
/// \ru Получить имя файла для конвертирования. \en Get file name for converting.
|
||||
//DEPRECATE_DECLARE
|
||||
const c3d::path_string FullFilePath () const override { return fileName; };
|
||||
|
||||
/// \ru Является ли файл текстовым. \en Whether the file is a text file.
|
||||
@@ -616,6 +629,7 @@ public:
|
||||
bool IsOutOnlySurfaces() const override;
|
||||
|
||||
/// \ru Является ли экспортируемый документ сборкой. \en Whether the document for export is an assembly.
|
||||
DEPRECATE_DECLARE
|
||||
bool IsAssembling () const override { return true; };
|
||||
|
||||
/// \ru Получить значение разрешения на импорт экспорт объектов определенного типа. \en Get the value of permission for import-export of objects of a certain type.
|
||||
@@ -627,20 +641,21 @@ public:
|
||||
/// \ru Установить разрешение на импорт экспорт объектов определенного типа. \en Set permission for import-export of objects of a certain type.
|
||||
void SetIoPermission( MbeIOPermiss nPermission, bool isSet ) override;
|
||||
|
||||
/// \ru Получить значение специфичной строки для конвертера. \en Get the value of a certain string for the converter.
|
||||
/// \ru Получить строку заголовка файла. \en Get file header string.
|
||||
bool GetPropertyString ( MbeConverterStrings nString, std::string & propertyString ) const override;
|
||||
|
||||
/// \ru Установить значение специфичной строки для конвертера. \en Set the value of a certain string for the converter.
|
||||
/// \ru Установить строку заголовка файла. \en Set file header string.
|
||||
void SetPropertyString ( MbeConverterStrings nString, const std::string & propertyString ) override;
|
||||
|
||||
/// \ru Представление текста в аннотационных объектах. \en Text representation in annotation objects.
|
||||
DEPRECATE_DECLARE
|
||||
eTextForm GetAnnotationTextRepresentation () const override;
|
||||
/** \brief \ru Следует ли компоненты экспортировать в разные файлы (если позволяет формат).
|
||||
\en Export components into separate files ( if provided in format). \~
|
||||
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
|
||||
\en EXPEREIMENTAL \~.
|
||||
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
bool ExportComponentsSeparately() const override;
|
||||
|
||||
/// \ru Получить ЛСК, относительно которой позиционирована модель. \en Get the location, the model is placed in.
|
||||
@@ -722,6 +737,9 @@ public:
|
||||
/// \ru Импортировать полигональные объекты как объекты с топологической информацией. \en Import polygonal objects as objects with topological information.
|
||||
bool ImportMeshesWithTopology() const override { return importMeshesWithTopology; }
|
||||
|
||||
/// \ru Получить параметры для лечения неправильных сеток. \en Get parameters for repairing inconsistent meshes.
|
||||
bool RepairInconsistentMesh( MbRepairInconsistentMeshParams ¶ms ) override;
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( ConvConvertorProperty3D )
|
||||
|
||||
}; // IConvertorProperty3D
|
||||
|
||||
+186
-140
@@ -52,16 +52,16 @@ class CONV_CLASS ItModelDocument : public MbRefItem
|
||||
public:
|
||||
/// \ru Это сборка? \en Is it an assembly?
|
||||
virtual bool IsAssembly() const = 0;
|
||||
/// \ru Это ни сборка, ни деталь? \en Is it neither an assembly nor a part?
|
||||
/// \ru Модельный документ не содержит данных. \en There is no data.
|
||||
virtual bool IsEmpty() const = 0;
|
||||
|
||||
/** \brief \ru Прообраз новой интерфейсной функции - задать модель ЛСК, относительно которой позиционируется модель.
|
||||
\en Prototype of a new interface function - get the placement the model is defined in. \~
|
||||
\en Prototype of a new interface function - get the placement the model is defined in. \~
|
||||
*/
|
||||
//virtual MbPlacement3D GetOriginLocation() const = 0;
|
||||
|
||||
/** \brief \ru Прообраз новой интерфейсной функции - задать модель для наполнения.
|
||||
\en Prototype of a new interface function - set a model to fill. \~
|
||||
\en Prototype of a new interface function - set a model to fill. \~
|
||||
*/
|
||||
virtual void SetContent( MbItem* /*content*/) = 0;
|
||||
|
||||
@@ -71,73 +71,76 @@ public:
|
||||
virtual MbItem * GetContent() /*{ return nullptr; }*/ = 0;
|
||||
|
||||
/** \brief \ru Создать документ с новой сборкой при импорте.
|
||||
\en Create a document with a new assembly while importing. \~
|
||||
\en Create a document with a new assembly while importing. \~
|
||||
\details \ru Увеличить счётчик ссылок результирующего документа на 1.
|
||||
\en Increase the reference counter of the resultant document by 1. \~
|
||||
\param[in] fileName - \ru Имя сборки.
|
||||
\en Assembly name. \~
|
||||
\param[in] solids - \ru Тела, добавляемые в сборку.
|
||||
\en Solids to add into the assembly. \~
|
||||
\en Increase the reference counter of the resultant document by 1. \~
|
||||
\param[in] componentItems - \ru Элементы, добавляемые в сборку.
|
||||
\en Items to add into the assembly. \~
|
||||
\param[in] fileName - \ru Имя сборки.
|
||||
\en Assembly name. \~
|
||||
\return \ru Экземпляр сборки, если операция прошла успешно, nullptr в противном случае.
|
||||
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
|
||||
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
|
||||
*/
|
||||
virtual ModelAssemblyPtr CreateAssembly( const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) = 0;
|
||||
|
||||
|
||||
/** \brief \ru Создать документ с новой деталью при импорте.
|
||||
\en Create a document with a new part while importing. \~
|
||||
\en Create a document with a new part while importing. \~
|
||||
\details \ru Увеличить счётчик ссылок результирующего документа на 1.
|
||||
\en Increase the reference counter of the resultant document by 1. \~
|
||||
\param[in] solids - \ru Тела, добавляемые в деталь.
|
||||
\en Solids to add into a part. \~
|
||||
\param[in] fileName - \ru Имя детали.
|
||||
\en A part name. \~
|
||||
\en Increase the reference counter of the resultant document by 1. \~
|
||||
\param[in] componentItems - \ru Элементы, добавляемые в сборку.
|
||||
\en Items to add into the assembly. \~
|
||||
\param[in] fileName - \ru Имя детали.
|
||||
\en A part name. \~
|
||||
\return \ru Экземпляр детали, если операция прошла успешно, nullptr в противном случае.
|
||||
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
|
||||
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
|
||||
*/
|
||||
virtual ModelPartPtr CreatePart( const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) = 0;
|
||||
|
||||
/** \brief \ru Получить сборку для экспорта.
|
||||
\en Get an assembly for export. \~
|
||||
\en Get an assembly for export. \~
|
||||
\details \ru Увеличить счётчик ссылок результирующей сборки на 1.
|
||||
\en Increase the reference counter of the resultant assembly by 1. \~
|
||||
\en Increase the reference counter of the resultant assembly by 1. \~
|
||||
\return \ru Экземпляр сборки, если операция прошла успешно, nullptr в противном случае.
|
||||
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
|
||||
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
|
||||
*/
|
||||
virtual ModelAssemblyPtr GetInstanceAssembly( ) = 0;
|
||||
|
||||
|
||||
/** \brief \ru Получить деталь для экспорта.
|
||||
\en Get the detail for export. \~
|
||||
\details \ru Увеличить счётчик ссылок результирующей детали на 1.
|
||||
\en Increase the reference counter of the resultant part by 1. \~
|
||||
\return \ru Экземпляр детали, если операция прошла успешно, nullptr в противном случае.
|
||||
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
|
||||
\en Get the detail for export. \~
|
||||
\details \ru Увеличить счётчик ссылок результирующей детали на 1.
|
||||
\en Increase the reference counter of the resultant part by 1. \~
|
||||
\return \ru Экземпляр детали, если операция прошла успешно, nullptr в противном случае.
|
||||
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
|
||||
*/
|
||||
virtual ModelPartPtr GetInstancePart( ) = 0;
|
||||
|
||||
/** \brief \ru Завершить импорт и сохранить документ.
|
||||
\en Complete the import and save the document. \~
|
||||
\en Complete the import and save the document. \~
|
||||
\return \ru true, если операция прошла успешно, false в противном случае.
|
||||
\en true if the operation succeeded, false - otherwise. \~
|
||||
\en true if the operation succeeded, false - otherwise. \~
|
||||
\param[in] \ru indicator Объект для отображения хода процесса.
|
||||
\en indicator An object indicating a process progress. \~
|
||||
\en indicator An object indicating a process progress. \~
|
||||
*/
|
||||
virtual bool FinishImport( IProgressIndicator * indicator ) = 0;
|
||||
|
||||
/** \brief \ru Получить элементы аннотации, соответствующие элементам геометрической модели.
|
||||
\en Get elements of annotation, corresponding items of geometric model. \~
|
||||
\en Get elements of annotation, corresponding items of geometric model. \~
|
||||
\param[in] eTextForm - \ru Форма представления текста.
|
||||
\en Text representation form. \~
|
||||
\en Text representation form. \~
|
||||
\return \ru Контейнер объектов аннотации.
|
||||
\en Vector of annotation objects. \~
|
||||
\en Vector of annotation objects. \~
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
virtual map_of_visual_items GetAnnotationItems( eTextForm ) const = 0;
|
||||
|
||||
/// \ru Задать размеры. \en Set sizes.
|
||||
DEPRECATE_DECLARE
|
||||
virtual void SetAnnotationItems( const map_of_visual_items& ) = 0;
|
||||
|
||||
/// \ru Открыть документ. \en Open a document.
|
||||
DEPRECATE_DECLARE
|
||||
virtual void OpenDocument() = 0;
|
||||
|
||||
};
|
||||
@@ -225,16 +228,20 @@ public:
|
||||
// Завершить импорт.
|
||||
virtual bool FinishImport( IProgressIndicator * );
|
||||
// Выдать элементы аннотации.
|
||||
DEPRECATE_DECLARE
|
||||
virtual map_of_visual_items GetAnnotationItems( eTextForm ) const;
|
||||
// Задать элементы аннотации.
|
||||
DEPRECATE_DECLARE
|
||||
virtual void SetAnnotationItems( const map_of_visual_items& vi );
|
||||
// Открыть документ.
|
||||
DEPRECATE_DECLARE
|
||||
virtual void OpenDocument();
|
||||
|
||||
/// \ru Включены ли PMI в элемент модели. \en If PMI is included into model item.
|
||||
SPtr<C3DPmiToItem> PmiInContent() const;
|
||||
|
||||
/// \ru Зарегистрировать элемент аннотации. \en Register annotation object.
|
||||
DEPRECATE_DECLARE
|
||||
void RegisterAnnotation( c3d::ItemSPtr component, const AnnotationSptrVector& annotation, const AnnotationSptrVector& requirements );
|
||||
|
||||
/// \ru Сбросить итераторы вставок. \en Reset instances itrerators.
|
||||
@@ -258,22 +265,19 @@ typedef C3dModelDocument ConvModelDocument;
|
||||
class ItModelInstanceProperties : public MbRefItem
|
||||
{
|
||||
public:
|
||||
|
||||
/// \ru Атрибуты. \en Attributes.
|
||||
|
||||
/// \ru Задать атрибуты. \en Set attributes.
|
||||
virtual bool SetAttributes( const c3d::AttrSPtrVector& /*attributes*/ ) = 0;
|
||||
|
||||
/// \ru Получить атрибуты. \en Get attributes.
|
||||
virtual c3d::AttrSPtrVector GetAttributes( ) const = 0;// { return c3d::AttrSPtrVector(); }
|
||||
virtual c3d::AttrSPtrVector GetAttributes() const = 0;// { return c3d::AttrSPtrVector(); }
|
||||
|
||||
|
||||
/// \ru Технические требования. \en Technical requirements.
|
||||
|
||||
/// \ru Получить технические требования. \en Get technical requirements.
|
||||
virtual void GetRequirements( AnnotationSptrVector &, eTextForm ) const = 0;
|
||||
/// \ru Технические требования. \en Technical requirements.
|
||||
/// \ru Получить технические требования. \en Get technical requirements.
|
||||
DEPRECATE_DECLARE
|
||||
virtual void GetRequirements( AnnotationSptrVector &, eTextForm ) const = 0;
|
||||
|
||||
/// \ru Задать технические требования. \en Set technical requirements.
|
||||
DEPRECATE_DECLARE
|
||||
virtual void SetRequirements( const AnnotationSptrVector & ) = 0;
|
||||
|
||||
};
|
||||
@@ -298,65 +302,67 @@ public:
|
||||
virtual bool IsEmpty() const = 0;
|
||||
|
||||
/** \brief \ru Создать пустую сборку при импорте и увеличить счётчик ссылок на 1.
|
||||
\en Create an empty assembly while importing and increase the reference counter by 1. \~
|
||||
\param[in] place - \ru ЛСК сборки в родительской модели.
|
||||
\en LCS of the assembly in the parent's model. \~
|
||||
\param[in] fileName - \ru Имя сборки.
|
||||
\en Assembly name. \~
|
||||
\en Create an empty assembly while importing and increase the reference counter by 1. \~
|
||||
\param[in] place - \ru ЛСК сборки в родительской модели.
|
||||
\en LCS of the assembly in the parent's model. \~
|
||||
\param[in] componentItems - \ru Элементы, добавляемые в сборку.
|
||||
\en Items to add into the assembly. \~
|
||||
\param[in] fileName - \ru Имя сборки.
|
||||
\en Assembly name. \~
|
||||
\return \ru Экземпляр сборки, если операция прошла успешно, nullptr в противном случае.
|
||||
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
|
||||
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
|
||||
*/
|
||||
virtual ModelAssemblyPtr CreateAssembly( const MbPlacement3D &place, const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) = 0;
|
||||
|
||||
/** \brief \ru Создать деталь при импорте.
|
||||
\en Create a part while importing. \~
|
||||
\en Create a part while importing. \~
|
||||
\details \ru Увеличить счётчик ссылок детали на 1.
|
||||
\en Increase the reference counter of a part by 1. \~
|
||||
\param[in] place - \ru ЛСК детали.
|
||||
\en LCS of a part. \~
|
||||
\param[in] solids - \ru Тела, включаемые в деталь.
|
||||
\en Solids included in the part. \~
|
||||
\param[in] fileName - \ru Название детали.
|
||||
\en Solid's name. \~
|
||||
\en Increase the reference counter of a part by 1. \~
|
||||
\param[in] place - \ru ЛСК детали.
|
||||
\en LCS of a part. \~
|
||||
\param[in] componentItems - \ru Элементы, добавляемые в сборку.
|
||||
\en Items to add into the assembly. \~
|
||||
\param[in] fileName - \ru Имя детали.
|
||||
\en A part name. \~
|
||||
\return \ru Экземпляр детали, если операция прошла успешно, nullptr в противном случае.
|
||||
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
|
||||
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
|
||||
*/
|
||||
virtual ModelPartPtr CreatePart( const MbPlacement3D &place, const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) = 0;
|
||||
|
||||
/** \brief \ru Получить сборку для экспорта.
|
||||
\en Get an assembly for export. \~
|
||||
\en Get an assembly for export. \~
|
||||
\return \ru Экземпляр сборки, если операция прошла успешно, nullptr в противном случае.
|
||||
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
|
||||
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
|
||||
*/
|
||||
virtual ModelAssemblyPtr GetInstanceAssembly( ) = 0;
|
||||
|
||||
|
||||
/** \brief \ru Получить деталь для экспорта.
|
||||
\en Get the detail for export. \~
|
||||
\en Get the detail for export. \~
|
||||
\return \ru Экземпляр детали, если операция прошла успешно, nullptr в противном случае.
|
||||
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
|
||||
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
|
||||
*/
|
||||
virtual ModelPartPtr GetInstancePart( ) = 0;
|
||||
|
||||
/** \brief \ru Создать подсборку при импорте, и её вставку.
|
||||
\en Create a subassembly and its instance while importing. \~
|
||||
\param[in] place - \ru ЛСК сборки в родительской модели.
|
||||
\en LCS of the assembly in the parent's model. \~
|
||||
\en Create a subassembly and its instance while importing. \~
|
||||
\param[in] place - \ru ЛСК сборки в родительской модели.
|
||||
\en LCS of the assembly in the parent's model. \~
|
||||
\param[in] existing - \ru Сборка, подлежащая вставке.
|
||||
\en An assembly to insert. \~
|
||||
\en An assembly to insert. \~
|
||||
\return \ru true, если операция прошла успешно, false в противном случае.
|
||||
\en true if the operation succeeded, false - otherwise. \~
|
||||
\en true if the operation succeeded, false - otherwise. \~
|
||||
*/
|
||||
virtual bool SetAssembly( const MbPlacement3D & place, const ItModelAssembly * existing ) = 0;
|
||||
|
||||
/** \brief \ru Создать деталь при импорте, и её вставку.
|
||||
\en Create a part while importing and its instance. \~
|
||||
\param[in] place - \ru ЛСК детали в родительской модели.
|
||||
\en LCS of a part in the parent's model. \~
|
||||
\en Create a part while importing and its instance. \~
|
||||
\param[in] place - \ru ЛСК детали в родительской модели.
|
||||
\en LCS of a part in the parent's model. \~
|
||||
\param[in] existing - \ru Деталь, подлежащая вставке.
|
||||
\en Detail to insert. \~
|
||||
\en Detail to insert. \~
|
||||
\return \ru true, если операция прошла успешно, false в противном случае.
|
||||
\en true if the operation succeeded, false - otherwise. \~
|
||||
\en true if the operation succeeded, false - otherwise. \~
|
||||
*/
|
||||
virtual bool SetPart( const MbPlacement3D & place, const ItModelPart * existing ) = 0;
|
||||
|
||||
@@ -380,7 +386,8 @@ enum MbeGettingItemType {
|
||||
git_Polygonal, ///< \ru Получить полгональные объекты (MbMesh). !!! ЭКСПЕРИМЕНТАЛЬНЫЙ ФУНКЦИОНАЛ !!! \en Get polygonal objects (MbMesh). !!! EXPEREIMENTAL FUNCTIONALITY !!!
|
||||
git_PMI, ///< \ru Получить размеры и иные элементы аннотации. \en Get dimensions and other annotation items.
|
||||
git_TechnicalRquirments, ///< \ru Получить технические требования. \en Get thecnical requirements.
|
||||
git_Placement ///< \ru Получить системы координат. \en Get placements.
|
||||
git_Placement, ///< \ru Получить системы координат. \en Get placements.
|
||||
git_Count ///< \ru Счетчик типов. \en Types counter.
|
||||
};
|
||||
|
||||
|
||||
@@ -400,25 +407,25 @@ class ItModelAssembly : public ItModelInstanceProperties
|
||||
{
|
||||
public:
|
||||
/** \brief \ru Получить имя файла сборки без пути и расширения для экспорта.
|
||||
\en Get the file name of an assembly without the path and the extension for export. \~
|
||||
\en Get the file name of an assembly without the path and the extension for export. \~
|
||||
\return \ru Имя файла сборки.
|
||||
\en An assembly file name. \~
|
||||
\en An assembly file name. \~
|
||||
*/
|
||||
virtual c3d::path_string PureFileName() const = 0;
|
||||
|
||||
/** \brief \ru Получить пустой интерфейс вставки для создания подсборки или детали при импорте.
|
||||
\en Get an empty interface of the insertion for creation of subassembly or a part while importing. \~
|
||||
\en Get an empty interface of the insertion for creation of subassembly or a part while importing. \~
|
||||
\details \ru Увеличить счётчик ссылок на 1.
|
||||
\en Increase the reference counter by 1. \~
|
||||
\en Increase the reference counter by 1. \~
|
||||
\return \ru Интерфейс вставки, если операция прошла успешно или nullptr в противном случае.
|
||||
\en Interface of the instance if the operation succeeded and nullptr otherwise. \~
|
||||
\en Interface of the instance if the operation succeeded and nullptr otherwise. \~
|
||||
*/
|
||||
virtual ModelInstancePtr PrepareInstance() = 0;
|
||||
|
||||
/** \brief \ru Получить интерфейс следующей вставки для создания подсборки или детали при экспорте.
|
||||
\en Get the interface of the next insertion for creation of a subassembly or a part while exporting. \~
|
||||
\return \ru Интерфейс вставки, если операция прошла успешно или nullptr в противном случае.
|
||||
\en Interface of the insertion if the operation succeeded and nullptr otherwise. \~
|
||||
\en Get the interface of the next insertion for creation of a subassembly or a part while exporting. \~
|
||||
\return \ru Интерфейс вставки, если операция прошла успешно или nullptr в противном случае.
|
||||
\en Interface of the insertion if the operation succeeded and nullptr otherwise. \~
|
||||
*/
|
||||
virtual ModelInstancePtr NextInstance( bool includeInvisible ) = 0;
|
||||
|
||||
@@ -426,85 +433,106 @@ public:
|
||||
virtual bool GetPlacement( MbPlacement3D & ) const { return false; };
|
||||
|
||||
/** \brief \ru Получить объекты из корня сборки при экспорте.
|
||||
\en Get objects from the assembly root while exporting. \~
|
||||
\param[out] items - \ru Наполняемый массив (состоит из объектов классов MbSolid, MbCurve3D, MbCartPoint3D).
|
||||
\en Array to fill (consist of objects of classes MbSolid, MbCurve3D, MbCartPoint3D). \~
|
||||
\en Get objects from the assembly root while exporting. \~
|
||||
\param[out] items - \ru Наполняемый массив (состоит из объектов классов MbSolid, MbCurve3D, MbCartPoint3D).
|
||||
\en Array to fill (consist of objects of classes MbSolid, MbCurve3D, MbCartPoint3D). \~
|
||||
\param[in] includeInvisible - \ru Если true, то выдаются все тела, включая невидимые, если false - только видимые.
|
||||
\en If true, then all the solids are returned, including invisible ones, if false - only visible ones. \~
|
||||
\en If true, then all the solids are returned, including invisible ones, if false - only visible ones. \~
|
||||
*/
|
||||
virtual void GetItems( c3d::ItemsSPtrVector & items, MbeGettingItemType itemType, bool includeInvisible ) const = 0;
|
||||
|
||||
/** \brief \ru Добавить объекты в корень сборки при импорте.
|
||||
\en Add objects to the assembly root while importing. \~
|
||||
\en Add objects to the assembly root while importing. \~
|
||||
\param[in] items - \ru Объекты, добавляемые в модель (тела, кривые и точки).
|
||||
\en Objects to add to the model (solids, curves and points). \~
|
||||
\en Objects to add to the model (solids, curves and points). \~
|
||||
*/
|
||||
virtual void AddItems( const c3d::ItemsSPtrVector & items ) = 0;
|
||||
|
||||
/** \brief \ru Получить элементы аннотации из сборки.
|
||||
\en Get elements of annotation from the assembly. \~
|
||||
\en Get elements of annotation from the assembly. \~
|
||||
\param[in] eTextForm - \ru Форма представления текста.
|
||||
\en Text representation form. \~
|
||||
\en Text representation form. \~
|
||||
\param[in] includeInvisible - \ru Если true, то выдаются все объекты аннотации, включая невидимые, если false - только видимые.
|
||||
\en If true, all the annotation objects are returned, including invisible ones, if false - only visible ones. \~
|
||||
\en If true, all the annotation objects are returned, including invisible ones, if false - only visible ones. \~
|
||||
\return \ru Контейнер объектов аннотации.
|
||||
\en Vector of annotation objects. \~
|
||||
\en Vector of annotation objects. \~
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
virtual AnnotationSptrVector GetAnnotationItems( eTextForm, bool ) const { return AnnotationSptrVector(); }; // Реализация будет удалена после того, как она будет осуществлена на стороне 3D
|
||||
|
||||
DEPRECATE_DECLARE
|
||||
virtual AnnotationSptrVector GetAnnotationItems( eTextForm ) const { return AnnotationSptrVector(); }; // Будет удалена после её реализации на стороне 3D
|
||||
|
||||
/** \brief \ru Задать элементы аннотации в сборке.
|
||||
\en Set elements of annotation in the assembly. \~
|
||||
\en Set elements of annotation in the assembly. \~
|
||||
\param[in] sourceDim - \ru Элементы аннотации
|
||||
\en Elements of annotation. \~
|
||||
\en Elements of annotation. \~
|
||||
*/
|
||||
|
||||
DEPRECATE_DECLARE
|
||||
virtual void SetAnnotationItems( const AnnotationSptrVector & ) = 0;
|
||||
|
||||
/** \brief \ru Добавить объект с заданной ЛСК в корень сборки при импорте.
|
||||
\en Add object with a placement to the assembly root while importing. \~
|
||||
\en Add object with a placement to the assembly root while importing. \~
|
||||
\param[in] item - \ru Объект, добавляемые в модель.
|
||||
\en Object to add to the model. \~
|
||||
\en Object to add to the model. \~
|
||||
\param[in] placement - \ru ЛСК.
|
||||
\en Placement. \~
|
||||
\en Placement. \~
|
||||
*/
|
||||
virtual void AddMappedItem( MbItem &, MbPlacement3D const &, c3d::AttrSPtrVector const& ) {};
|
||||
|
||||
/** \brief \ru Получить следующий объект с заданной ЛСК.
|
||||
\en Get the next item with placement. \~
|
||||
\en Get the next item with placement. \~
|
||||
\return \ru Объект с заданной ЛС или nullptr.
|
||||
\en Item with placement and nullptr otherwise. \~
|
||||
\en Item with placement and nullptr otherwise. \~
|
||||
*/
|
||||
virtual SPtr<MbInstance> NextMappedItem() const { return {}; }
|
||||
|
||||
/** \brief \ru Получить следующую группу конструкционных осей.
|
||||
\en Get the next construction axes grid. \~
|
||||
\en Get the next construction axes grid. \~
|
||||
\return \ru Очередная группа конструкционных осей или нуль в случае исчерпания.
|
||||
\en Next construction axes grid or null in case of depletion. \~
|
||||
\en Next construction axes grid or null in case of depletion. \~
|
||||
*/
|
||||
virtual c3d::ItemSPtr NextAxesGrid() const { return c3d::ItemSPtr{}; }
|
||||
|
||||
|
||||
/** \brief \ru Добавить следующую группу конструкционных осей.
|
||||
\en Add next construction axes grid. \~
|
||||
\en Add next construction axes grid. \~
|
||||
\param[in] group \ru Очередная группа конструкционных осей.
|
||||
\en Next construction axes grid. \~
|
||||
\en Next construction axes grid. \~
|
||||
*/
|
||||
virtual void AddAxesGrid( c3d::ItemSPtr const & ) {}
|
||||
|
||||
/** \brief \ru Получить следующую систему координат.
|
||||
\en Get the next coordinate system. \~
|
||||
\en Get the next coordinate system. \~
|
||||
\return \ru Очередная система координат или нуль в случае исчерпания.
|
||||
\en Next coordinate system or null in case of depletion. \~
|
||||
\en Next coordinate system or null in case of depletion. \~
|
||||
*/
|
||||
virtual SPtr<MbAssistingItem> NextCoordinateSystem() const { return {}; }
|
||||
|
||||
|
||||
/** \brief \ru Добавить систему координат.
|
||||
\en Add a coordinate system. \~
|
||||
\en Add a coordinate system. \~
|
||||
\param[in] group \ru Система координат.
|
||||
\en Coordinate system. \~
|
||||
\en Coordinate system. \~
|
||||
*/
|
||||
virtual void AddCoordinateSystem( SPtr<MbAssistingItem> const & ) {}
|
||||
|
||||
|
||||
/** \brief \ru Получить следующий объект, ограничивающий площадь или объем .
|
||||
\en Get the next item that is the boundary of an area or volume. \~
|
||||
\return \ru Очередной объект, ограничивающий площадь или объем, или нуль в случае исчерпания.
|
||||
\en Next item that is the boundary of an area or volume or null in case of depletion. \~
|
||||
*/
|
||||
virtual c3d::ItemSPtr NextBoundaryItem() const { return c3d::ItemSPtr {}; }
|
||||
|
||||
|
||||
/** \brief \ru Добавить объект, ограничивающий площадь или объем (IfcSpace ).
|
||||
\en Add an item that is the boundary of an area or volume. \~
|
||||
\param[in] group \ru Очередной объект, ограничивающий площадь или объем.
|
||||
\en Next item that is the boundary of an area or volume. \~
|
||||
*/
|
||||
virtual void AddBoundaryItem( c3d::ItemSPtr const & ) {}
|
||||
};
|
||||
|
||||
|
||||
@@ -524,25 +552,25 @@ class ItModelPart : public ItModelInstanceProperties
|
||||
{
|
||||
public:
|
||||
/** \brief \ru Получить имя файла детали без пути и расширения для экспорта.
|
||||
\en Get the file name of a part without the path and extension for export. \~
|
||||
\en Get the file name of a part without the path and extension for export. \~
|
||||
\return \ru Имя файла детали.
|
||||
\en A part file name. \~
|
||||
\en A part file name. \~
|
||||
*/
|
||||
virtual c3d::path_string PureFileName() const = 0;
|
||||
|
||||
/** \brief \ru Получить пустой интерфейс вставки для создания подсборки или детали при импорте.
|
||||
\en Get an empty interface of the insertion for creation of subassembly or a part while importing. \~
|
||||
\en Get an empty interface of the insertion for creation of subassembly or a part while importing. \~
|
||||
\details \ru Увеличить счётчик ссылок на 1.
|
||||
\en Increase the reference counter by 1. \~
|
||||
\en Increase the reference counter by 1. \~
|
||||
\return \ru Интерфейс вставки, если операция прошла успешно или nullptr в противном случае.
|
||||
\en Interface of the instance if the operation succeeded and nullptr otherwise. \~
|
||||
\en Interface of the instance if the operation succeeded and nullptr otherwise. \~
|
||||
*/
|
||||
virtual ModelInstancePtr PrepareInstance() = 0;
|
||||
|
||||
/** \brief \ru Получить интерфейс следующей вставки для создания подсборки или детали при экспорте.
|
||||
\en Get the interface of the next insertion for creation of a subassembly or a part while exporting. \~
|
||||
\en Get the interface of the next insertion for creation of a subassembly or a part while exporting. \~
|
||||
\return \ru Интерфейс вставки, если операция прошла успешно или nullptr в противном случае.
|
||||
\en Interface of the insertion if the operation succeeded and nullptr otherwise. \~
|
||||
\en Interface of the insertion if the operation succeeded and nullptr otherwise. \~
|
||||
*/
|
||||
virtual ModelInstancePtr NextInstance( bool includeInvisible ) = 0;
|
||||
|
||||
@@ -550,88 +578,106 @@ public:
|
||||
virtual bool GetPlacement( MbPlacement3D & ) const { return false; };
|
||||
|
||||
/** \brief \ru Получить объекты из детали при экспорте.
|
||||
\en Get objects from the part while exporting. \~
|
||||
\param[out] items - \ru Наполняемый массив (состоит из объектов классов MbSolid, MbWireFrame, MbPointFrame).
|
||||
\en Array to fill (consists of objects of classes MbSolid, MbWireFrame, MbPointFrame). \~
|
||||
\en Get objects from the part while exporting. \~
|
||||
\param[out] items - \ru Наполняемый массив (состоит из объектов классов MbSolid, MbWireFrame, MbPointFrame).
|
||||
\en Array to fill (consists of objects of classes MbSolid, MbWireFrame, MbPointFrame). \~
|
||||
\param[in] itemType - \ru Тип объектов, которыми нужно наполнить массив.
|
||||
\en Type of objects the array should be filled with. \~
|
||||
\en Type of objects the array should be filled with. \~
|
||||
\param[in] includeInvisible - \ru Если true, то выдаются все тела, включая невидимые, если false - только видимые.
|
||||
\en If true, all the solids are returned, including invisible ones, if false - only visible ones. \~
|
||||
\en If true, all the solids are returned, including invisible ones, if false - only visible ones. \~
|
||||
*/
|
||||
virtual void GetItems( c3d::ItemsSPtrVector & items, MbeGettingItemType itemType, bool includeInvisible ) const = 0;
|
||||
|
||||
/** \brief \ru Добавить объекты в деталь при импорте.
|
||||
\en Add objects to a part while importing. \~
|
||||
\en Add objects to a part while importing. \~
|
||||
\param[in] items - \ru Объекты, добавляемые в модель (кривые и точки).
|
||||
\en Objects to be added to the model (curves and points). \~
|
||||
\en Objects to be added to the model (curves and points). \~
|
||||
*/
|
||||
virtual void AddItems( const c3d::ItemsSPtrVector & items ) = 0;
|
||||
|
||||
/** \brief \ru Получить элементы аннотации из детали.
|
||||
\en Get elements of annotation from the detail. \~
|
||||
\en Get elements of annotation from the detail. \~
|
||||
\param[in] eTextForm - \ru Форма представления текста.
|
||||
\en Text representation form. \~
|
||||
\en Text representation form. \~
|
||||
\param[in] includeInvisible - \ru Если true, то выдаются все объекты аннотации, включая невидимые, если false - только видимые.
|
||||
\en If true, all the annotation objects are returned, including invisible ones, if false - only visible ones. \~
|
||||
\en If true, all the annotation objects are returned, including invisible ones, if false - only visible ones. \~
|
||||
\return \ru Контейнер объектов аннотации.
|
||||
\en Vector of annotation objects. \~
|
||||
\en Vector of annotation objects. \~
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
virtual AnnotationSptrVector GetAnnotationItems( eTextForm, bool ) const { return AnnotationSptrVector(); }; // Реализация будет удалена после того, как она будет осуществлена на стороне 3D
|
||||
DEPRECATE_DECLARE
|
||||
virtual AnnotationSptrVector GetAnnotationItems( eTextForm ) const { return AnnotationSptrVector(); }; // Будет удалена после её реализации на стороне 3D
|
||||
|
||||
|
||||
/** \brief \ru Задать элементы аннотации в детали.
|
||||
\en Set elements of annotation in the part. \~
|
||||
\en Set elements of annotation in the part. \~
|
||||
\param[in] sourceDim - \ru Элементы аннотации
|
||||
\en Elements of annotation. \~
|
||||
\en Elements of annotation. \~
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
virtual void SetAnnotationItems( const AnnotationSptrVector & ) = 0;
|
||||
|
||||
/** \brief \ru Добавить объект с заданной ЛСК в корень сборки при импорте.
|
||||
\en Add object with a placement to the assembly root while importing. \~
|
||||
\en Add object with a placement to the assembly root while importing. \~
|
||||
\param[in] item - \ru Объект, добавляемые в модель.
|
||||
\en Object to add to the model. \~
|
||||
\en Object to add to the model. \~
|
||||
\param[in] placement - \ru ЛСК.
|
||||
\en Placement. \~
|
||||
\en Placement. \~
|
||||
*/
|
||||
virtual void AddMappedItem( MbItem &, MbPlacement3D const &, c3d::AttrSPtrVector const& ) {};
|
||||
|
||||
/** \brief \ru Получить следующий объект с заданной ЛСК.
|
||||
\en Get the next item with placement. \~
|
||||
\en Get the next item with placement. \~
|
||||
\return \ru Объект с заданной ЛС или nullptr.
|
||||
\en Item with placement and nullptr otherwise. \~
|
||||
\en Item with placement and nullptr otherwise. \~
|
||||
*/
|
||||
virtual SPtr<MbInstance> NextMappedItem() const { return {}; }
|
||||
|
||||
/** \brief \ru Получить следующую группу конструкционных осей.
|
||||
\en Get the next conxtruction axes grid. \~
|
||||
\en Get the next conxtruction axes grid. \~
|
||||
\return \ru Очередная группа конструкционных осей или нуль в случае исчерпания.
|
||||
\en Next construction axes grid or null in case of depletion. \~
|
||||
\en Next construction axes grid or null in case of depletion. \~
|
||||
*/
|
||||
virtual c3d::ItemSPtr NextAxesGrid() const { return c3d::ItemSPtr{}; }
|
||||
|
||||
|
||||
/** \brief \ru Добавить следующую группу конструкционных осей.
|
||||
\en Get the next conxtruction axes grid. \~
|
||||
\en Get the next conxtruction axes grid. \~
|
||||
\param[in] group \ru Очередная группа конструкционных осей или нуль в случае исчерпания.
|
||||
\en Next construction axes grid or null in case of depletion. \~
|
||||
\en Next construction axes grid or null in case of depletion. \~
|
||||
*/
|
||||
virtual void AddAxesGrid( c3d::ItemSPtr const & ) {}
|
||||
|
||||
/** \brief \ru Получить следующую систему координат.
|
||||
\en Get the next coordinate system. \~
|
||||
\en Get the next coordinate system. \~
|
||||
\return \ru Очередная система координат или нуль в случае исчерпания.
|
||||
\en Next coordinate system or null in case of depletion. \~
|
||||
\en Next coordinate system or null in case of depletion. \~
|
||||
*/
|
||||
virtual SPtr<MbAssistingItem> NextCoordinateSystem() const { return {}; }
|
||||
|
||||
|
||||
/** \brief \ru Добавить систему координат.
|
||||
\en Add a coordinate system. \~
|
||||
\en Add a coordinate system. \~
|
||||
\param[in] group \ru Система координат.
|
||||
\en Coordinate system. \~
|
||||
\en Coordinate system. \~
|
||||
*/
|
||||
virtual void AddCoordinateSystem( SPtr<MbAssistingItem> const & ) {}
|
||||
|
||||
/** \brief \ru Получить следующий объект, ограничивающий площадь или объем .
|
||||
\en Get the next item that is the boundary of an area or volume. \~
|
||||
\return \ru Очередной объект, ограничивающий площадь или объем, или нуль в случае исчерпания.
|
||||
\en Next item that is the boundary of an area or volume or null in case of depletion. \~
|
||||
*/
|
||||
virtual c3d::ItemSPtr NextBoundaryItem() const { return c3d::ItemSPtr {}; }
|
||||
|
||||
|
||||
/** \brief \ru Добавить объект, ограничивающий площадь или объем (IfcSpace ).
|
||||
\en Add an item that is the boundary of an area or volume. \~
|
||||
\param[in] group \ru Очередной объект, ограничивающий площадь или объем.
|
||||
\en Next item that is the boundary of an area or volume. \~
|
||||
*/
|
||||
virtual void AddBoundaryItem( c3d::ItemSPtr const & ) {}
|
||||
};
|
||||
|
||||
|
||||
@@ -639,13 +685,13 @@ namespace c3d
|
||||
{
|
||||
namespace converter {
|
||||
/** \brief \ru Проверить корректность набора осей.
|
||||
\en Validate axes grid. \~
|
||||
\en Validate axes grid. \~
|
||||
\details \ru Либо это объект типа MbPlaneInstance либо MbAssembly, содержащий только MbPlaneInstance с одинаковыми ЛСК плоскостей\~
|
||||
\en. The item is or MbPlaneInstance or MbAssembly containing only MbPlaneInstance items with same LCS of the plane.\~
|
||||
\en. The item is or MbPlaneInstance or MbAssembly containing only MbPlaneInstance items with same LCS of the plane.\~
|
||||
\return \ru Пройдена ли валидация.
|
||||
\en Wether validation passed. \~
|
||||
\en Wether validation passed. \~
|
||||
\param[in] item - \ru Группа конструкционных осей.
|
||||
\en Construction axes grid. \~
|
||||
\en Construction axes grid. \~
|
||||
*/
|
||||
CONV_FUNC (bool) IsAxesGridValid( c3d::ItemSPtr const & );
|
||||
}
|
||||
|
||||
@@ -71,8 +71,8 @@ namespace c3d {
|
||||
В противном случае импорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
|
||||
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
|
||||
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for import.
|
||||
\param[out] model - \ru Модель.
|
||||
\en The model. \~
|
||||
\param[out] model - \ru Импортируемая модель.
|
||||
\en The imported model. \~
|
||||
\param[in] filePath - \ru Путь файла.
|
||||
\en File path. \~
|
||||
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
|
||||
@@ -84,9 +84,9 @@ namespace c3d {
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ImportFromFile( MbModel& model,
|
||||
const path_string& fileName,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
const path_string& fileName,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
|
||||
/** \brief \ru Прочитать файл обменного формата в элемент.
|
||||
@@ -95,22 +95,22 @@ namespace c3d {
|
||||
В противном случае импорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
|
||||
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
|
||||
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for import.
|
||||
\param[out] item - \ru Замещаемый элемент.
|
||||
\en The element to replace. \~
|
||||
\param[in] filePath - \ru Путь файла.
|
||||
\en File path. \~
|
||||
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
|
||||
\en Implementation of converter's properties interface. \~
|
||||
\param[in] indicator - \ru Индикатор хода процесса.
|
||||
\en The process progress indicator. \~
|
||||
\param[out] item - \ru Корневой элемент импортированной модели.
|
||||
\en The imported element. \~
|
||||
\param[in] filePath - \ru Путь файла.
|
||||
\en File path. \~
|
||||
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
|
||||
\en Implementation of converter's properties interface. \~
|
||||
\param[in] indicator -\ru Индикатор хода процесса.
|
||||
\en The process progress indicator. \~
|
||||
\return \ru Код завершения операции.
|
||||
\en Code of the operation termination. \~
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ImportFromFile( c3d::ItemSPtr& item,
|
||||
const path_string& filePath,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
const path_string& filePath,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
/** \brief \ru Прочитать файл обменного формата в модель.
|
||||
\en Read a file of an exchange format into model. \~
|
||||
@@ -118,8 +118,8 @@ namespace c3d {
|
||||
В противном случае импорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
|
||||
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
|
||||
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for import.
|
||||
\param[out] mDoc - \ru Модельный документ.
|
||||
\en The model. \~
|
||||
\param[out] mDoc - \ru Импортированный модельный документ.
|
||||
\en The imported model document. \~
|
||||
\param[in] filePath - \ru Путь файла.
|
||||
\en File path. \~
|
||||
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
|
||||
@@ -131,9 +131,9 @@ namespace c3d {
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ImportFromFile( ItModelDocument& mDoc,
|
||||
const path_string& filePath,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
const path_string& filePath,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
/** \brief \ru Записать модель в файл обменного формата.
|
||||
\en Write the model into an exchange format file. \~
|
||||
@@ -141,8 +141,8 @@ namespace c3d {
|
||||
В противном случае экспорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
|
||||
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
|
||||
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for export.
|
||||
\param[out] model - \ru Модель.
|
||||
\en The model. \~
|
||||
\param[out] model - \ru Экспортируемая модель.
|
||||
\en The exported model. \~
|
||||
\param[in] filePath - \ru Путь файла.
|
||||
\en File path. \~
|
||||
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
|
||||
@@ -154,9 +154,9 @@ namespace c3d {
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ExportIntoFile( MbModel& model,
|
||||
const path_string& filePath,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
const path_string& filePath,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
/** \brief \ru Записать модель в файл обменного формата.
|
||||
\en Write the model into an exchange format file. \~
|
||||
@@ -164,22 +164,22 @@ namespace c3d {
|
||||
В противном случае экспорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
|
||||
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
|
||||
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for export.
|
||||
\param[out] model - \ru Экспортируемый лемент.
|
||||
\en The exported element. \~
|
||||
\param[in] filePath - \ru Путь файла.
|
||||
\en File path. \~
|
||||
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
|
||||
\en Implementation of converter's properties interface. \~
|
||||
\param[in] indicator - \ru Индикатор хода процесса.
|
||||
\en The process progress indicator. \~
|
||||
\param[out] item - \ru Экспортируемый элемент.
|
||||
\en The exported element. \~
|
||||
\param[in] filePath - \ru Путь файла.
|
||||
\en File path. \~
|
||||
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
|
||||
\en Implementation of converter's properties interface. \~
|
||||
\param[in] indicator -\ru Индикатор хода процесса.
|
||||
\en The process progress indicator. \~
|
||||
\return \ru Код завершения операции.
|
||||
\en Code of the operation termination. \~
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ExportIntoFile( MbItem& item,
|
||||
const path_string& filePath,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
const path_string& filePath,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
/** \brief \ru Записать модельный документ в файл обменного формата.
|
||||
\en Write the model into an exchange format file. \~
|
||||
@@ -187,29 +187,29 @@ namespace c3d {
|
||||
В противном случае экспорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
|
||||
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
|
||||
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for export.
|
||||
\param[in] mDoc - \ru Экспортируемый модельный документ.
|
||||
\en The exported model document. \~
|
||||
\param[in] mDoc - \ru Экспортируемый модельный документ.
|
||||
\en The exported model document. \~
|
||||
\param[in] filePath - \ru Путь файла.
|
||||
\en File path. \~
|
||||
\en File path. \~
|
||||
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
|
||||
\en Implementation of converter's properties interface. \~
|
||||
\en Implementation of converter's properties interface. \~
|
||||
\param[in] indicator - \ru Индикатор хода процесса.
|
||||
\en The process progress indicator. \~
|
||||
\en The process progress indicator. \~
|
||||
\return \ru Код завершения операции.
|
||||
\en Code of the operation termination. \~
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ExportIntoFile( ItModelDocument& mDoc,
|
||||
const path_string& filePath,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
const path_string& filePath,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
|
||||
/** \brief \ru Импортировать данные из буфера в модель.
|
||||
\en Import data from buffer into model. \~
|
||||
\param[out] model - \ru Модель.
|
||||
\en The model. \~
|
||||
\param[in] buffer - \ru Буфер.
|
||||
\param[out] model - \ru Импортируемая модель.
|
||||
\en The imported model. \~
|
||||
\param[in] buffer - \ru Буфер.
|
||||
\en Buffer. \~
|
||||
\param[in] modelFormat - \ru Формат модели.
|
||||
\en Model format. \~
|
||||
@@ -222,62 +222,62 @@ namespace c3d {
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ImportFromBuffer( MbModel& model,
|
||||
const C3DExchangeBuffer& buffer,
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
const C3DExchangeBuffer& buffer,
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
|
||||
/** \brief \ru Импортировать данные из буфера в модель.
|
||||
\en Import data from buffer into model. \~
|
||||
\param[out] item - \ru Замещаемый элемент.
|
||||
\en The item to replace. \~
|
||||
\param[out] item - \ru Импортируемый элемент.
|
||||
\en The imported item. \~
|
||||
\param[in] buffer - \ru Буфер.
|
||||
\en Buffer. \~
|
||||
\param[in] modelFormat - \ru Формат модели.
|
||||
\en Model format. \~
|
||||
\en Model format. \~
|
||||
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
|
||||
\en Implementation of converter's properties interface. \~
|
||||
\en Implementation of converter's properties interface. \~
|
||||
\param[in] indicator - \ru Индикатор хода процесса.
|
||||
\en The process progress indicator. \~
|
||||
\en The process progress indicator. \~
|
||||
\return \ru Код завершения операции.
|
||||
\en Code of the operation termination. \~
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ImportFromBuffer( c3d::ItemSPtr& item,
|
||||
const C3DExchangeBuffer& buffer,
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
const C3DExchangeBuffer& buffer,
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
|
||||
/** \brief \ru Импортировать данные из буфера в модель.
|
||||
\en Import data from buffer into model. \~
|
||||
\param[out] mDoc - \ru Модельный документ.
|
||||
\en Model document. \~
|
||||
\param[out] mDoc - \ru Импортируемый модельный документ.
|
||||
\en The imported model document. \~
|
||||
\param[in] buffer - \ru Буфер.
|
||||
\en Buffer. \~
|
||||
\param[in] modelFormat - \ru Формат модели.
|
||||
\en Model format. \~
|
||||
\en Model format. \~
|
||||
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
|
||||
\en Implementation of converter's properties interface. \~
|
||||
\en Implementation of converter's properties interface. \~
|
||||
\param[in] indicator - \ru Индикатор хода процесса.
|
||||
\en The process progress indicator. \~
|
||||
\en The process progress indicator. \~
|
||||
\return \ru Код завершения операции.
|
||||
\en Code of the operation termination. \~
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ImportFromBuffer( ItModelDocument& mDoc,
|
||||
const C3DExchangeBuffer& buffer,
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
const C3DExchangeBuffer& buffer,
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
|
||||
/** \brief \ru Экспортировать модель в буфер.
|
||||
\en Export model into buffer. \~
|
||||
\param[in] model - \ru Модель.
|
||||
\en The model. \~
|
||||
\param[in] model - \ru Экспортируемая модель.
|
||||
\en The exported model. \~
|
||||
\param[in] modelFormat - \ru Формат модели.
|
||||
\en Model format. \~
|
||||
\param[out] buffer - \ru Буфер.
|
||||
@@ -291,16 +291,16 @@ namespace c3d {
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ExportIntoBuffer( MbModel& model,
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
C3DExchangeBuffer& buffer,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
C3DExchangeBuffer& buffer,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
|
||||
/** \brief \ru Экспортировать модель в буфер.
|
||||
\en Export model into buffer. \~
|
||||
\param[in] item - \ru Экспортируемый элемент.
|
||||
\en The item to export. \~
|
||||
\en The exported item. \~
|
||||
\param[in] modelFormat - \ru Формат модели.
|
||||
\en Model format. \~
|
||||
\param[out] buffer - \ru Буфер.
|
||||
@@ -314,10 +314,10 @@ namespace c3d {
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ExportIntoBuffer( MbItem& item,
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
C3DExchangeBuffer& buffer,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
C3DExchangeBuffer& buffer,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
/** \brief \ru Экспортировать модельный документ в буфер.
|
||||
\en Export model document into buffer. \~
|
||||
@@ -336,10 +336,10 @@ namespace c3d {
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
CONV_FUNC( MbeConvResType ) ExportIntoBuffer( ItModelDocument& item,
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
C3DExchangeBuffer& buffer,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
MbeModelExchangeFormat modelFormat,
|
||||
C3DExchangeBuffer& buffer,
|
||||
IConvertorProperty3D* prop = nullptr,
|
||||
IProgressIndicator* indicator = nullptr );
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Буфер для обмена.
|
||||
@@ -970,6 +970,7 @@ inline void ReleaseConvertor3D( IConverter3D* convInstance ) { ReleaseConverter3
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup ACIS_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) SATRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator );
|
||||
|
||||
/** \brief \ru Записать файл формата SAT.
|
||||
@@ -990,6 +991,7 @@ CONV_FUNC( MbeConvResType ) SATRead( IConvertorProperty3D& prop, ItModelDocument
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup ACIS_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) SATWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator );
|
||||
/** \brief \ru Прочитать файл формата IGES.
|
||||
\en Read a file of IGES format. \~
|
||||
@@ -1003,6 +1005,7 @@ CONV_FUNC( MbeConvResType ) SATWrite( IConvertorProperty3D& prop, ItModelDocumen
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup IGES_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) IGSRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Записать файл формата IGES.
|
||||
@@ -1017,6 +1020,7 @@ CONV_FUNC( MbeConvResType ) IGSRead( IConvertorProperty3D& prop, ItModelDocument
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup IGES_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) IGSWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Прочитать файл формата JT.
|
||||
@@ -1031,6 +1035,7 @@ CONV_FUNC( MbeConvResType ) IGSWrite( IConvertorProperty3D& prop, ItModelDocumen
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup IGES_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) JTRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Записать файл формата JT.
|
||||
@@ -1045,6 +1050,7 @@ CONV_FUNC( MbeConvResType ) JTRead( IConvertorProperty3D& prop, ItModelDocument&
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup IGES_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) JTWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Прочитать файл формата Parasolid.
|
||||
@@ -1059,6 +1065,7 @@ CONV_FUNC( MbeConvResType ) JTWrite( IConvertorProperty3D& prop, ItModelDocument
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup Parasolid_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) XTRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Записать файл формата Parasolid.
|
||||
@@ -1073,6 +1080,7 @@ CONV_FUNC( MbeConvResType ) XTRead( IConvertorProperty3D& prop, ItModelDocument&
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup Parasolid_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) XTWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Прочитать файл формата STEP.
|
||||
@@ -1087,6 +1095,7 @@ CONV_FUNC( MbeConvResType ) XTWrite( IConvertorProperty3D& prop, ItModelDocument
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup STEP_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) STEPRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Записать файл формата STEP.
|
||||
@@ -1101,6 +1110,7 @@ CONV_FUNC( MbeConvResType ) STEPRead( IConvertorProperty3D& prop, ItModelDocumen
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup STEP_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) STEPWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Прочитать файл формата STL.
|
||||
@@ -1115,6 +1125,7 @@ CONV_FUNC( MbeConvResType ) STEPWrite( IConvertorProperty3D& prop, ItModelDocume
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup STL_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) STLRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Записать файл формата STL.
|
||||
@@ -1129,6 +1140,7 @@ CONV_FUNC( MbeConvResType ) STLRead( IConvertorProperty3D& prop, ItModelDocument
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup STL_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) STLWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Прочитать файл формата OBJ.
|
||||
@@ -1143,6 +1155,7 @@ CONV_FUNC( MbeConvResType ) STLWrite( IConvertorProperty3D& prop, ItModelDocumen
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup VRML_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) OBJRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Прочитать файл формата VRML.
|
||||
@@ -1157,6 +1170,7 @@ CONV_FUNC( MbeConvResType ) OBJRead( IConvertorProperty3D& prop, ItModelDocument
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup VRML_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) VRMLRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Прочитать файл формата GRDECL.
|
||||
@@ -1171,6 +1185,7 @@ CONV_FUNC( MbeConvResType ) VRMLRead( IConvertorProperty3D& prop, ItModelDocumen
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup VRML_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) GRDECLRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Записать файл формата GRDECL.
|
||||
@@ -1185,6 +1200,7 @@ CONV_FUNC( MbeConvResType ) GRDECLRead( IConvertorProperty3D& prop, ItModelDocum
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup STL_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) GRDECLWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Записать файл формата VRML.
|
||||
@@ -1199,6 +1215,7 @@ CONV_FUNC( MbeConvResType ) GRDECLWrite( IConvertorProperty3D& prop, ItModelDocu
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup VRML_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) VRMLWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
/** \brief \ru Записать файл формата 3MF.
|
||||
@@ -1213,6 +1230,7 @@ CONV_FUNC( MbeConvResType ) VRMLWrite( IConvertorProperty3D& prop, ItModelDocume
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup VRML_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) ThreeMFWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
|
||||
@@ -1228,6 +1246,7 @@ CONV_FUNC( MbeConvResType ) ThreeMFWrite( IConvertorProperty3D& prop, ItModelDoc
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup ASCII_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) ASCIIPointCloudRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
|
||||
@@ -1243,6 +1262,7 @@ CONV_FUNC( MbeConvResType ) ASCIIPointCloudRead( IConvertorProperty3D& prop, ItM
|
||||
\en Code of the operation termination. \~
|
||||
\ingroup ASCII_Exchange
|
||||
*/
|
||||
DEPRECATE_DECLARE
|
||||
CONV_FUNC( MbeConvResType ) ASCIIPointCloudWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
|
||||
|
||||
|
||||
|
||||
@@ -110,6 +110,11 @@ class CONV_CLASS LinearizedTreeDocument : public C3dModelDocument
|
||||
std::vector<SPtr<MbMesh>> meshes;
|
||||
vector_of_annotation annotations;
|
||||
vector_of_annotation techReq;
|
||||
//IFC data
|
||||
std::vector<SPtr<MbInstance>> mappedItems;
|
||||
std::vector<SPtr<MbItem>> axisGrids;
|
||||
std::vector<SPtr<MbAssistingItem>> lscItems;
|
||||
std::vector<SPtr<MbItem>> boundaryItems;
|
||||
|
||||
bool calculateMIP;
|
||||
bool sliceSolids;
|
||||
@@ -127,7 +132,7 @@ public:
|
||||
// Заполнить данные
|
||||
void FillLinearizedData();
|
||||
|
||||
private:
|
||||
private:
|
||||
// Заполнены ли данные
|
||||
bool IsFilled();
|
||||
|
||||
@@ -147,6 +152,12 @@ public:
|
||||
void AddAssembly( ModelAssemblyPtr assm, const MbMatrix3D & matr );
|
||||
// Добавить тело
|
||||
void AddSolid( c3d::SolidSPtr sld, const MbMatrix3D & matr );
|
||||
// Добавить объекты, специфичные для IFC
|
||||
template<typename PartAssType>
|
||||
void AddIFCObjects(PartAssType part);
|
||||
// Добавить содержимое mappedItem
|
||||
void AddMappedItemContent( MbItem &item, const MbMatrix3D& matr = MbMatrix3D());
|
||||
|
||||
// Выдать данные размера
|
||||
void GetPmiDimensionData( MaDimension & dimension, DimensionData & dimData );
|
||||
// Сбросить данные размера
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
#ifndef __CONV_RES_TYPE_H
|
||||
#define __CONV_RES_TYPE_H
|
||||
|
||||
#include <string>
|
||||
#include <math_define.h>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Результат конвертирования.
|
||||
\en Result of converting operation.
|
||||
@@ -29,7 +32,8 @@ enum MbeConvResType {
|
||||
cnv_LicenseNotFound, ///< \ru Ошибка получения лицензии. \en License check failure.
|
||||
cnv_NotEnoughMemory, ///< \ru Недостаточно памяти. \en Not enough memory.
|
||||
cnv_UnknownExtension, ///< \ru Неизвестное расширение файла. \en Unknown file extenstion.
|
||||
cnv_UnsupportedVersion ///< \ru Неподдерживаемая версия формата. \en Unsupported format version.
|
||||
cnv_UnsupportedVersion, ///< \ru Неподдерживаемая версия формата. \en Unsupported format version.
|
||||
cnv_CannotLoadFormatSpecificComponent ///< \ru Не удалось загрузить плагин для чтения конкретного формата. \en Cannot load the plugin for reading this specific format.
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -40,4 +44,4 @@ enum MbeConvResType {
|
||||
// ---
|
||||
CONV_FUNC (std::string) MbeConvResTypeToString(MbeConvResType result);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+28
-4
@@ -149,6 +149,19 @@ GCE_FUNC(void) GCE_RemoveSystem( GCE_system gSys );
|
||||
//---
|
||||
GCE_FUNC(geom_item) GCE_AddPoint( GCE_system gSys, GCE_point pVal );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Добавить в систему ограничений ось.
|
||||
\en Add axis to the constraint system. \~
|
||||
\param[in] \ru gSys Система ограничений.
|
||||
\en gSys System of constraints. \~
|
||||
\param[in] \ru eVal Координаты начала отсчета оси.
|
||||
\en eVal Axis coordinates. \~
|
||||
\return \ru Дескриптор зарегистрированной оси.
|
||||
\en Descriptor of registered axis. \~
|
||||
*/
|
||||
//---
|
||||
GCE_FUNC(geom_item) GCE_AddAxis( GCE_system gSys, const GCE_axis & eVal );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Добавить в систему ограничений прямую.
|
||||
\en Add line to the constraint system. \~
|
||||
@@ -873,16 +886,27 @@ GCE_FUNC(geom_item) GCE_FixOffset( GCE_system gSys, geom_item curve );
|
||||
GCE_FUNC(bool) GCE_IsConstrainedGeom( GCE_system gSys, geom_item g );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Определить смежные ли это ограничение и геометрический объект.
|
||||
\en Determine whether the constraint and the geometric object are adjacent. \~
|
||||
/** \brief \ru Определить связано ли ограничение с геометрическим семейством объекта.
|
||||
\en Determine whether the constraint is related to the geometric family of the object. \~
|
||||
\details \ru Функция обходит семейство геометрических объектов, в которое входит геометрический объект `g`,
|
||||
его контрольные точки, базовые объекты, а также всю геометрию построенную на базе объекта `g`.
|
||||
Возвращаемое значение равно `true`, если ограничение `cItem` связано с любым из объектов указанного семейства.
|
||||
\en The function traverses the family of geometric objects, which includes the geometric object `g`,
|
||||
its control points, basic objects, as well as the entire geometry based on the object `g`.
|
||||
The return value is `true` if the `cItem' constraint is associated with any of the objects in the specified family. \~
|
||||
\note \ru Эта функция может быть использована для того, чтобы освободить геометрический объект,
|
||||
его контрольные точки, скалярные переменные, базовые кривые, а также все зависимые от него
|
||||
геометрические объекты от всех смежных ограничений данного семейства.
|
||||
\en This function can be used to release a geometric object, its control points, scalar variables, basic curves,
|
||||
as well as all geometric objects dependent on it from all adjacent constraints of this family. \~
|
||||
\param[in] gSys - \ru Система ограничений.
|
||||
\en System of constraints. \~
|
||||
\param[in] g - \ru Дескриптор геометрического объекта.
|
||||
\en Descriptor of geometric object. \~
|
||||
\param[in] cItem - \ru Дескриптор ограничения.
|
||||
\en Descriptor of constraint. \~
|
||||
\return \ru true, если ограничение и геометрический объект смежные.
|
||||
\en true if the constraint and the geometric object are adjacent. \~
|
||||
\return \ru true, если ограничение связано с семейством геометрического объекта.
|
||||
\en true if the constraint is related to the geometric family of the object. \~
|
||||
*/
|
||||
//---
|
||||
GCE_FUNC(bool) GCE_IsAdjacentConstraint( GCE_system gSys, geom_item g, constraint_item cItem );
|
||||
|
||||
@@ -84,6 +84,7 @@ typedef enum
|
||||
|
||||
// \ru Основные типы. \en Basic types.
|
||||
GCE_POINT, ///< \ru Точка на плоскости. \en Point on plane.
|
||||
GCE_AXIS, ///< \ru Ось. \en Axis.
|
||||
GCE_LINE, ///< \ru Прямая на плоскости. \en Line on plane.
|
||||
GCE_CIRCLE, ///< \ru Окружность на плоскости. \en Circle on plane.
|
||||
GCE_ELLIPSE, ///< \ru Эллипс на плоскости. \en Ellipse on plane.
|
||||
@@ -130,6 +131,7 @@ typedef enum
|
||||
, GCE_Q3 ///< \ru Квадрантная точка эллипса (6 часов). \en Quadrant point of ellipse (6 o'clock).
|
||||
, GCE_Q4 ///< \ru Квадрантная точка эллипса (9 часов). \en Quadrant point of ellipse (9 o'clock).
|
||||
, GCE_LOCATION_POINT ///< \ru Точка размещения геометрического объекта. \en Location point of geometric object.
|
||||
, GCE_ORIGIN = GCE_LOCATION_POINT ///< \ru Точка начала оси. \en Axis origin point.
|
||||
, GCE_LAST_PTYPE ///< \ru Значение завершающее последовательность вариантов. \en The value of variants completes the sequence.
|
||||
/*
|
||||
The values below are used only within the solver.
|
||||
@@ -440,6 +442,17 @@ struct GCE_CLASS GCE_line
|
||||
GCE_line() : p(), norm() {}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/// \ru Координаты оси. \en Axis coordinates.
|
||||
//---
|
||||
struct GCE_CLASS GCE_axis
|
||||
{
|
||||
GCE_point origin; ///< \ru Начало оси. \en Axis origin.
|
||||
GCE_vec2d dir; ///< \ru Направление оси. \en Axis direction.
|
||||
|
||||
GCE_axis() : origin(), dir() {}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/// \ru Координаты окружности. \en Coordinates of a circle.
|
||||
//---
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#define __GCM_RES_CODE_H
|
||||
|
||||
#include <gcm_types.h>
|
||||
#include <tool_cstring.h>
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// \ru Приоритетность кода ошибки \en Priority of the error code.
|
||||
@@ -150,6 +151,55 @@ inline GCM_FUNC(GCM_result &) operator << ( GCM_result & sumRes, const GCM_resul
|
||||
return sumRes;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Строковое значение результирующего кода. \en String value of the resulting code.
|
||||
*/
|
||||
//---
|
||||
inline GCM_FUNC(c3d::mt_string) StringValue( GCM_result res )
|
||||
{
|
||||
switch ( res )
|
||||
{
|
||||
case GCM_RESULT_None: return { _T("GCM_RESULT_None" )};
|
||||
case GCM_RESULT_Ok: return { _T("GCM_RESULT_Ok" )};
|
||||
case GCM_RESULT_Overconstrained: return { _T("GCM_RESULT_Overconstrained" )};
|
||||
case GCM_RESULT_MatedFixation: return { _T("GCM_RESULT_MatedFixation" )};
|
||||
case GCM_RESULT_DraggingFailed: return { _T("GCM_RESULT_DraggingFailed" )};
|
||||
case GCM_RESULT_Not_Satisfied: return { _T("GCM_RESULT_Not_Satisfied" )};
|
||||
case GCM_RESULT_Unsolvable: return { _T("GCM_RESULT_Unsolvable" )};
|
||||
case GCM_RESULT_Error: return { _T("GCM_RESULT_Error" )};
|
||||
case GCM_RESULT_InappropriateAlignment: return { _T( "GCM_RESULT_InappropriateAlignment" )};
|
||||
case GCM_RESULT_InappropriateArgument: return { _T( "GCM_RESULT_InappropriateArgument" )};
|
||||
case GCM_RESULT_IncompatibleArguments: return { _T( "GCM_RESULT_IncompatibleArguments" ) };
|
||||
case GCM_RESULT_InconsistentAlignment: return { _T( "GCM_RESULT_InconsistentAlignment" )};
|
||||
case GCM_RESULT_Duplicated: return { _T( "GCM_RESULT_Duplicated" )};
|
||||
case GCM_RESULT_CyclicDependence: return { _T( "GCM_RESULT_CyclicDependence" )};
|
||||
case GCM_RESULT_MultiDependedGeom: return { _T( "GCM_RESULT_MultiDependedGeom" )};
|
||||
case GCM_RESULT_OverconstrainingDependedGeoms: return { _T( "GCM_RESULT_OverconstrainingDependedGeoms" )};
|
||||
case GCM_RESULT_DependedGeomCantBeFixed: return { _T( "GCM_RESULT_DependedGeomCantBeFixed" )};
|
||||
case GCM_RESULT_InvalidArguments: return { _T( "GCM_RESULT_InvalidArguments" )};
|
||||
case GCM_RESULT_UnsupportedTangencyChoice: return { _T( "GCM_RESULT_UnsupportedTangencyChoice" )};
|
||||
case GCM_RESULT_InconsistentTangencyChoice: return { _T( "GCM_RESULT_InconsistentTangencyChoice" )};
|
||||
case GCM_RESULT_CoaxialGearTransmissionUnsupported: return { _T( "GCM_RESULT_CoaxialGearTransmissionUnsupported" )};
|
||||
case GCM_RESULT_OverconstrainedCamMechanism: return { _T( "GCM_RESULT_OverconstrainedCamMechanism" )};
|
||||
case GCM_RESULT_CamMechanismsInCyclicDependency: return { _T( "GCM_RESULT_CamMechanismsInCyclicDependency" )};
|
||||
case GCM_RESULT_InconsistentFollowerAxis: return { _T( "GCM_RESULT_InconsistentFollowerAxis" )};
|
||||
case GCM_RESULT_InconsistentPlanarAngle: return { _T( "GCM_RESULT_InconsistentPlanarAngle" )};
|
||||
case GCM_RESULT_ItsNotDrivingDimension: return { _T( "GCM_RESULT_ItsNotDrivingDimension" )};
|
||||
case GCM_RESULT_IncorrectDimensionInterval: return { _T( "GCM_RESULT_IncorrectDimensionInterval" )};
|
||||
case GCM_RESULT_InternalError: return { _T( "GCM_RESULT_InternalError" )};
|
||||
case GCM_RESULT_Last_: return { _T( "GCM_RESULT_Last_" )};
|
||||
case GCM_RESULT_DependentConstraintUnsolved: return {_T("GCM_RESULT_DependentConstraintUnsolved")};
|
||||
case GCM_RESULT_UnsupportedFollowerSurface: return {_T("GCM_RESULT_UnsupportedFollowerSurface")};
|
||||
case GCM_RESULT_Unregistered: return {_T("GCM_RESULT_Unregistered")};
|
||||
case GCM_RESULT_ImmutableData: return {_T("GCM_RESULT_ImmutableData")};
|
||||
case GCM_RESULT_Aborted: return {_T("GCM_RESULT_Aborted")};
|
||||
|
||||
default:
|
||||
return {_T("")};
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */ // GCM_3D_Routines
|
||||
|
||||
#endif // __GCM_RES_CODE_H
|
||||
|
||||
@@ -463,6 +463,31 @@ GCM_FUNC(GCM_closest_params) GCM_ClosestParameters( GCM_system gSys, GCM_constra
|
||||
//---
|
||||
GCM_FUNC(GCM_result) GCM_ChangeAlignment( GCM_system gSys, GCM_constraint conId, GCM_alignment aVal );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Вычислить степени свободы, включая соответствующие им возможные трансляции,
|
||||
для точки геометрического объекта в системе ограничений.
|
||||
\en Evaluate degrees of freedom including their corresponding possible translations
|
||||
for a point of a geometric object in a system of constraints. \~
|
||||
\param[in] gSys - \ru Система ограничений.
|
||||
\en System of constraints. \~
|
||||
\param[in] g - \ru Дескриптор геометрического объекта.
|
||||
\en Descriptor of geometric object. \~
|
||||
\param[in] ctrlPnt - \ru Контрольная точка (начало координат по умолчанию), заданная в ЛСК геометрического объекта.
|
||||
- \en Control point (origin by default) specified with respect to LCS of geometric object. \~
|
||||
\result \ru Запись о вычисленных степенях свободы.
|
||||
\en Record on evaluated degrees of freedom. \~
|
||||
\details \ru Возвращаемая структура содержит код `result` результата вычисления
|
||||
и, в случае успеха, информацию о трансляционных степенях свободы: их количество `tdof`
|
||||
и векторы `dir1`, `dir2` возможных перемещений, если `tdof == 1` (тогда `dir1 == dir2`) или `tdof == 2`.
|
||||
\en The structure subject to return contains code `result` of the evaluation result
|
||||
and, on success, information about translational degrees of freedom: their number `tdof`
|
||||
and vectors `dir1`, `dir2` of possible motions if `tdof == 1` (in such a case, `dir1 == dir2`) or `tdof == 2`. \~
|
||||
\note \ru Вычисление результата опирается на линейный анализ системы ограничений.
|
||||
\en Evaluation of the result relies on linear analysis of the constraint system. \~
|
||||
*/
|
||||
//---
|
||||
GCM_FUNC(GCM_dof_record) GCM_PointDOF( GCM_system gSys, GCM_geom g, const MbCartPoint3D& ctrlPnt = MbCartPoint3D::origin );
|
||||
|
||||
#endif // __GCM_ROUTINES_H
|
||||
|
||||
// eof
|
||||
|
||||
@@ -49,7 +49,7 @@ typedef struct MtSystemHolder* GCM_system;
|
||||
typedef MtObjectId GCM_object;
|
||||
/// \ru Дескриптор геометрического объекта, зарегистрированного в контексте решателя. \en Descriptor of geometrical object registered in the constraint system.
|
||||
typedef GCM_object GCM_geom;
|
||||
/// \ru Дескриптор числовой переменной, зарегистрированной в системе ограничений. \en Descriptor of numeric variable registered in the constraint system.
|
||||
/// \ru Дескриптор числовой переменной, зарегистрированной в системе ограничений. \en Descriptor of numeric variable registered in the constraint system.
|
||||
typedef GCM_object GCM_var;
|
||||
/// \ru Дескриптор ограничения, зарегистрированного в решателе. \en Descriptor of a constraint registered in the solver.
|
||||
typedef GCM_object GCM_constraint;
|
||||
@@ -237,14 +237,14 @@ typedef enum
|
||||
//---
|
||||
typedef enum
|
||||
{
|
||||
GCM_RESULT_None = 0 ///< \ru Код неопределенного результата или состояния. \en Code of undefined result or status. \~
|
||||
, GCM_RESULT_Ok = 1 ///< \ru Успешный результат вызова API компонента GCM. \en The successful result of GCM API call. \~
|
||||
, GCM_RESULT_Satisfied = GCM_RESULT_Ok ///< \ru Ограничение или система ограничения решены. \en Constraint or system of constraints are fulfilled. \~
|
||||
, GCM_RESULT_Overconstrained = 2 ///< \ru Ограничение переопределяет систему и противоречит другим условиям. \en Constraint is redundant and contradicts the other conditions. \~
|
||||
, GCM_RESULT_MatedFixation = 3 ///< \ru Заданы ограничения для пары фиксированных объектов. \en Constraints are specified for pair of fixed objects. \~
|
||||
, GCM_RESULT_DraggingFailed = 4 ///< \ru Неудачная попытка перемещения фиксированного объекта (равно, как объекта жестко-связанного с фиксированным). \en Failed attempt to move a fixed object (as the object rigidly connected with fixed). \~
|
||||
, GCM_RESULT_Not_Satisfied = 5 ///< \ru Ограничение(я) не решено (по неизвестным причинам). \en Constraint(s) has not been solved (for unknown reasons). \~
|
||||
, GCM_RESULT_Unsolvable = 6 ///< \ru Ограничение(я) не разрешимо. \en Constraint(s) is not solvable. \~
|
||||
GCM_RESULT_None = 0 ///< \ru Код неопределенного результата или состояния. \en Code of undefined result or status. \~
|
||||
, GCM_RESULT_Ok = 1 ///< \ru Успешный результат вызова API компонента GCM. \en The successful result of GCM API call. \~
|
||||
, GCM_RESULT_Satisfied = GCM_RESULT_Ok ///< \ru Ограничение или система ограничения решены. \en Constraint or system of constraints are fulfilled. \~
|
||||
, GCM_RESULT_Overconstrained = 2 ///< \ru Ограничение переопределяет систему и противоречит другим условиям. \en Constraint is redundant and contradicts the other conditions. \~
|
||||
, GCM_RESULT_MatedFixation = 3 ///< \ru Заданы ограничения для пары фиксированных объектов. \en Constraints are specified for pair of fixed objects. \~
|
||||
, GCM_RESULT_DraggingFailed = 4 ///< \ru Неудачная попытка перемещения фиксированного объекта (равно, как объекта жестко-связанного с фиксированным). \en Failed attempt to move a fixed object (as the object rigidly connected with fixed). \~
|
||||
, GCM_RESULT_Not_Satisfied = 5 ///< \ru Ограничение(я) не решено (по неизвестным причинам). \en Constraint(s) has not been solved (for unknown reasons). \~
|
||||
, GCM_RESULT_Unsolvable = 6 ///< \ru Ограничение(я) не разрешимо. \en Constraint(s) is not solvable. \~
|
||||
, GCM_RESULT_DependentConstraintUnsolved = 7 /**< \ru Ограничение GCM_DEPENDENT не вычислено или ее независимые аргументы находятся вне области решений.
|
||||
\en The GCM_DEPENDENT constraint is not solved or its independent arguments are out of the solution domain. \~
|
||||
\note \ru Ситуация #GCM_RESULT_DependentConstraintUnsolved возникает, когда функция GCM_dependent_func возвращает false.
|
||||
|
||||
+11
-2
@@ -202,6 +202,9 @@ public:
|
||||
virtual ~MbHalfedgeBoundaryCriterionBase() {}
|
||||
|
||||
/// \ru Проверить, является ли ребро граничным. \en Check whether an edge is a boundary edge.
|
||||
virtual bool IsBoundaryEdge( size_t e ) const = 0;
|
||||
/// \ru Проверить, является ли ребро граничным. \en Check whether an edge is a boundary edge.
|
||||
DEPRECATE_DECLARE_REPLACE( IsBoundaryEdge )
|
||||
virtual bool IsBorderEdge( size_t e ) const = 0;
|
||||
OBVIOUS_PRIVATE_COPY( MbHalfedgeBoundaryCriterionBase );
|
||||
};
|
||||
@@ -228,10 +231,16 @@ public:
|
||||
virtual ~MbHalfedgeBoundaryCriterionMarked() {}
|
||||
|
||||
/// \ru Проверить, является ли ребро граничным. \en Check whether an edge is a boundary edge.
|
||||
bool IsBorderEdge( size_t e ) const override
|
||||
bool IsBoundaryEdge( size_t e ) const override
|
||||
{
|
||||
const auto & ed = _topo.Edge( e );
|
||||
return ed.IsActive() ? (!ed.IsTwinDefined() || _mark.GetValue( e )) : false;
|
||||
return ed.IsActive() ? ( !ed.IsTwinDefined() || _mark.GetValue( e ) ) : false;
|
||||
}
|
||||
/// \ru Проверить, является ли ребро граничным. \en Check whether an edge is a boundary edge.
|
||||
DEPRECATE_DECLARE_REPLACE( IsBoundaryEdge )
|
||||
bool IsBorderEdge( size_t e ) const override
|
||||
{
|
||||
return IsBoundaryEdge( e );
|
||||
}
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbHalfedgeBoundaryCriterionMarked );
|
||||
|
||||
@@ -189,7 +189,7 @@ struct MATH_CLASS EdgeConstIterator
|
||||
EdgeConstIterator( const MbHalfedge & topo, size_t iEd, bool begin = true ) noexcept;
|
||||
|
||||
/// \ru Оператор сравнения. Для поддержки итерации на границе пустое ребро считается равным любому другому.
|
||||
/// \en Comparison operator. Empty edge is identical to any other edge to support iteration on open borders.
|
||||
/// \en Comparison operator. Empty edge is identical to any other edge to support iteration on open boundaries.
|
||||
bool operator != ( const EdgeConstIterator & it ) const noexcept;
|
||||
|
||||
/// \ru Доступ к данным. \en Data access.
|
||||
|
||||
@@ -134,9 +134,11 @@ namespace io
|
||||
/// \ru Файл в расширенном формате прочитан частично (неизвестные объекты пропущены). \en Partial read of file in extended format (unknown objects skipped).
|
||||
skippedUnknAttr = 0x08000000L,
|
||||
/// \ru Файл нулевой длины. \en Zero-length file.
|
||||
emptyFile = 0x10000000L,
|
||||
emptyFile = 0x10000000L,
|
||||
/// \ru Лицензия не найдена. \en License not found.
|
||||
licenseMissing = 0x20000000L,
|
||||
licenseMissing = 0x20000000L,
|
||||
/// \ru Запись файла прервано пользователем. \en File writing aborted by user.
|
||||
writeAborted = 0x40000000L,
|
||||
/// \ru Все ошибки. \en All errors.
|
||||
allMask = 0xffffffffL
|
||||
};
|
||||
|
||||
+2
-32
@@ -155,9 +155,9 @@ OBVIOUS_PRIVATE_COPY( TapeRegistratorEx )
|
||||
class MATH_CLASS ScopedReadProgress
|
||||
{
|
||||
SPtr<ProgressBarWrapper> _progress;
|
||||
reader & _reader;
|
||||
tape & _tape;
|
||||
public:
|
||||
ScopedReadProgress( reader & in );
|
||||
ScopedReadProgress( tape & in );
|
||||
~ScopedReadProgress();
|
||||
// \ru Доступ к индикатору прогресса. \en Access to progress indicator.
|
||||
ProgressBarWrapper * operator()();
|
||||
@@ -366,36 +366,6 @@ struct TapeClassContainer
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Поток для чтения и записи.
|
||||
\en Stream for reading and writing. \~
|
||||
\details \ru Поток для чтения и записи. \n
|
||||
\en Stream for reading and writing. \n \~
|
||||
\deprecated \ru Класс устарел и будет удален в версии 2023.
|
||||
\en The class is deprecated and will be removed in version 2023. \~
|
||||
\ingroup Base_Tools_IO
|
||||
*/ // ---
|
||||
class MATH_CLASS rw : public writer, public reader {
|
||||
public:
|
||||
typedef std::unique_ptr<rw> rw_ptr;
|
||||
public:
|
||||
|
||||
/// \ru Создать читатель/писатель для буфера в памяти. \en Create reader/writer for membuf.
|
||||
static rw_ptr CreateMemWriter( membuf & sb, uint8 om );
|
||||
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
rw( iobuf & buf, uint16 om );
|
||||
|
||||
virtual ~rw() {}
|
||||
|
||||
private:
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
rw( iobuf_Seq & sb, bool ownBuf, bool openSys, uint16 om, TapeRegistrator * reg );
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( rw )
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/// \ru Функция чтения базового класса. \en Function of reading the base class. \~ \ingroup Base_Tools_IO
|
||||
// ---
|
||||
|
||||
@@ -512,8 +512,8 @@ public:
|
||||
virtual uint32 GetLastError();
|
||||
|
||||
// \ru Работа с индикатором прогресса. \en Work with progress indicator.
|
||||
void InitProgress( IProgressIndicator * pr );
|
||||
void InitProgress( ProgressBarWrapper & pr );
|
||||
void InitProgress( IProgressIndicator * pr );
|
||||
void InitProgress( ProgressBarWrapper & pr );
|
||||
|
||||
// \ru Работа с конфигурацией. \en Work with configuration.
|
||||
void SetColorFlag( ColorProcessing flag ) { config.colorFlag = flag; }
|
||||
@@ -660,6 +660,11 @@ public:
|
||||
/// \ru Получить указатель на дерево модели. \en Get pointer to the model tree.
|
||||
virtual const c3d::IModelTree * GetModelTree() const { return nullptr; } // not supported
|
||||
|
||||
// \ru Работа с индикатором прогресса. \en Work with progress indicator.
|
||||
void InitProgress( IProgressIndicator * pr );
|
||||
void InitProgress( ProgressBarWrapper & pr );
|
||||
|
||||
|
||||
protected:
|
||||
/// \ru Записать объект и тип. \en Write the object and type.
|
||||
virtual void WriteObjectAndType ( const TapeBase * );
|
||||
|
||||
@@ -578,7 +578,7 @@ inline void MbCartPoint::operator -= ( const MbCartPoint & pnt ) {
|
||||
// \ru Умножение точки на число. \en The multiplication of a point by a number.
|
||||
// ---
|
||||
inline void MbCartPoint::operator *= ( double factor ) {
|
||||
x *= factor;
|
||||
x *= factor; // SKIP_SA
|
||||
y *= factor;
|
||||
}
|
||||
|
||||
@@ -604,7 +604,7 @@ inline MbCartPoint MbCartPoint::operator - () const {
|
||||
// \ru Умножение точки на число. \en The multiplication of a point by a number.
|
||||
// ---
|
||||
inline MbCartPoint MbCartPoint::operator * ( double factor ) const {
|
||||
return MbCartPoint( x * factor, y * factor );
|
||||
return MbCartPoint( x * factor, y * factor ); // SKIP_SA
|
||||
}
|
||||
|
||||
|
||||
@@ -752,7 +752,7 @@ inline void MbCartPoint::operator -= ( MbVector & v )
|
||||
// \ru Присвоить точке значения другой точки. \en Assign the value of another point to the point.
|
||||
// ---
|
||||
inline MbCartPoint & MbCartPoint::operator = ( const MbCartPoint & fp ) {
|
||||
x = fp.x;
|
||||
x = fp.x; // SKIP_SA
|
||||
y = fp.y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -672,7 +672,8 @@ enum MbeProgBarId_Mesh
|
||||
pBar_SimplifyMesh_byTrianglesCount = pbarId_PointsSurface_End + 1, ///< \ru Упрощение триангуляции по числу треугольников. \en Simplifying triangulation by number of triangles.
|
||||
pBar_SimplifyMesh_byTolerance, ///< \ru Упрощение триангуляции по точности. \en Simplifying triangulation by tolerance.
|
||||
pBar_AlignObjects, ///< \ru Совмещение объектов. \en Object alignment.
|
||||
pBar_Remesh ///< \ru Ремешинг. \en Remeshing.
|
||||
pBar_Remesh, ///< \ru Ремешинг. \en Remeshing.
|
||||
pBar_Drap ///< \ru Драпировка оболочки. \en Shell draping.
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -292,6 +292,8 @@ enum MbResultType {
|
||||
|
||||
rt_FacesGroupsOverlapError, ///< \ru Массивы заменяющих и заменяемых граней пересекаются. \en Replacement faces and replaced faces arrays are overlapping.
|
||||
rt_StitchShellsError, ///< \ru Ошибка сшивки оболочек. \en Stitch shells error.
|
||||
rt_NoFacesForModification, ///< \ru Отсутствуют грани для модификации. \en There are no faces for modification.
|
||||
rt_NoReplacementFaces, ///< \ru Отсутствуют заменяющие грани. \en There are no replacement faces.
|
||||
|
||||
// \ru !!! СТРОКИ ВСТАВЛЯТЬ СТРОГО ПЕРЕД ЭТОЙ СТРОКОЙ !!!! \en !!! INSERT LINES STRICTLY BEFORE THIS LINE !!!!
|
||||
rt_ErrorTotal // \ru НИЖЕ НЕ ДОБАВЛЯТЬ! \en DON'T ADD BELOW!
|
||||
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
/// \ru Получить 2Д параметры треугольного фасета. \en Get 2D parameters for the triangular facet.
|
||||
bool GetTrianglePoints( size_t iTr, std::array<MbCartPoint, 3> & points ) const;
|
||||
/// \ru Получить 2Д параметры треугольного фасета в виде 3Д точек с нулевой z координатой. \en Get 2D parameters for the triangular facet as 3D points with the zero z coord.
|
||||
bool GetTrianglePoints( size_t iTr, std::array<MbCartPoint3D, 3> & points ) const;
|
||||
bool GetTrianglePoints( size_t iTr, std::array<MbCartPoint3D, 3> & points, const MbPlacement * placeUv = nullptr ) const;
|
||||
/// \ru Получить 2Д параметр в центре треугольного фасета. \en Get the 2D parameter in the center of the triangular facet.
|
||||
bool GetTriangleCenter( size_t iTr, MbCartPoint & center ) const;
|
||||
/// \ru Получить площадь треугольного фасета. \en Get the area of the triangle facet.
|
||||
|
||||
@@ -790,7 +790,7 @@ inline reader& operator >> ( reader & in, UserDataMap& itemmap )
|
||||
int t;
|
||||
in >> t;
|
||||
size_t typeSize = ::ReadCOUNT( in );
|
||||
C3D_ASSERT( t < (int)idtCount );
|
||||
C3D_ASSERT( t < (int)idtCount ); // SKIP_SA
|
||||
if ( t < (int)idtCount ) { // SKIP_SA
|
||||
MbeItemDataType type = (MbeItemDataType)t; // \ru Тип данных. \en A data type.
|
||||
ItemDataBase* item = ItemDataBase::Create( type );
|
||||
|
||||
@@ -1196,7 +1196,7 @@ public:
|
||||
Constructor takes in the pointer to the source curve and/or the vector of parameters <MbCornerChamferParams>.
|
||||
One can set the same chamfers for all the joints by passing the set of parameters without index instead of the parameter vector.
|
||||
The source curve can be one of the following types: 3d contour, 3d polyline, contour on a surface, polyline on a surface.
|
||||
For other types the successfull chamfer creation is not guaranteed.
|
||||
For other types the successful chamfer creation is not guaranteed.
|
||||
A polyline is transformed into a contour during the chamfering process.\~
|
||||
\ingroup Data_Structures
|
||||
*/
|
||||
@@ -1433,7 +1433,7 @@ private:
|
||||
периодическим направлением). В случае U:
|
||||
_surfBreakParam = ( U - Umin )/( Umax - Umin ),
|
||||
где U - фактический U-параметр поверхности, соответствующий месту размыкания. Umin и Umax - границы
|
||||
диапазона задания U-параметра поверхности. Для V-параметра аналогично.
|
||||
диапазона задания U-параметра поверхности (Umax - Umin = Uperiod). Для V-параметра аналогично.
|
||||
Если значение параметра не принадлежит указанному диапазону, оно будет искусственно в него вписано
|
||||
(к минимальной или максимальной границе).
|
||||
Если значение этого параметра равно UNDEFINED_DBL, он не учитывается.
|
||||
@@ -1447,7 +1447,7 @@ private:
|
||||
correspond parametric direction (either U or V, which matches the periodic direction). For U:
|
||||
_surfBreakParam = ( U - Umin )/( Umax - Umin ),
|
||||
where U is an actual U-parameter of the surface, correspond to the breaking place. Umin and Umax are bounds
|
||||
of the surface U-range. Analogically for V-parameter.
|
||||
of the surface U-range (Umax - Umin = Uperiod). Analogically for V-parameter.
|
||||
If the parameter value is out of this range it will be automatically adjusted to it (to min or max boundary).
|
||||
If this parameter is equal to UNDEFINED_DBL it is not take into account at all.
|
||||
In case of non-periodic surfaces, the parameter does not play any role and can take any value.
|
||||
@@ -1465,7 +1465,6 @@ private:
|
||||
double _surfBreakParam; ///< \ru Задает место резки периодической поверхности. Актуален только для разворачивания. \en It sets the place, where the periodic surface is to be cut. It is used for unwrap algorithm only. \~
|
||||
bool _cutByBounds; ///< \ru Нужно ли обрезать полученные кривые по границам поверхности? Актуален только для сворачивания. \en Whether the result curves to be cut with the surface bounds? It is used for wrap algorithm only. \~
|
||||
bool _isWrap; ///< \ru Тип операции: сворачивание (true), разворачивание (false). \en Operation type: wrap (true), unwrap (false). \~
|
||||
bool _uSeamStitch; ///< \ru Нужно ли сдвинуть кривые, попавшие краем на шов umax. \en Whether to shift curves with one end on umax seam.\~
|
||||
|
||||
private:
|
||||
/** \brief \ru Конструктор по-умолчанию. Не реализован.
|
||||
@@ -2053,7 +2052,8 @@ public:
|
||||
curves which have connected edges in 3D on the seam, but in 2D are spaced apart on a period.
|
||||
If this flag is enabled, those unwrapped curves are alse connected. \~
|
||||
*/
|
||||
bool GetUSeamStitch() const { return _uSeamStitch; }
|
||||
DEPRECATE_DECLARE_REPLACE( MbCurvesWrappingParams::_surfBreakParam )
|
||||
bool GetUSeamStitch() const { return false; }
|
||||
/** \brief \ru Нужно ли сдвинуть кривые, попавшие одним краем на шов Umax.
|
||||
\en Whether to shift curves with one end on Umax seam.\~
|
||||
\details \ru Нужно ли сдвинуть кривые, попавшие краем на шов Umax. Если кривая попадает одним краем на шов Umax,
|
||||
@@ -2064,8 +2064,9 @@ public:
|
||||
is neither on Umax nor Umin, then shift the curve for Umax-Umin. This is a simplified stitching of
|
||||
curves which have connected edges in 3D on the seam, but in 2D are spaced apart on a period.
|
||||
If this flag is enabled, those unwrapped curves are also connected. \~
|
||||
*/
|
||||
void SetUSeamStitch( bool s ) { _uSeamStitch = s; }
|
||||
*/
|
||||
DEPRECATE_DECLARE_REPLACE( MbCurvesWrappingParams::_surfBreakParam )
|
||||
void SetUSeamStitch( bool /*s*/ ) { }
|
||||
private:
|
||||
/// \ru Добавить двумерные или трехмерные кривые с проверкой на нули. \en Add two- or three-dimension curves with nullptr check. \~
|
||||
template<class CurveVector>
|
||||
|
||||
@@ -370,9 +370,12 @@ public:
|
||||
\en Whether the created parameters are valid for the specified shell. Checks the input objects arrays (faces, edges, sufaces),
|
||||
input operation values, consistency between type and parameters.\~
|
||||
\param[in] shell - \ru Указатель на оболочку, на которой будет производиться операция.
|
||||
\en Pointer to the to-be-modified shell .\~
|
||||
\en Pointer to the to-be-modified shell.\~
|
||||
\return \ru Возвращает "true", если параметры валидны.
|
||||
\en Returns "true" if parameters are valid.\~
|
||||
*/
|
||||
bool IsValid( const MbFaceShell * shell = nullptr ) const;
|
||||
|
||||
/// \ru Выдать тип модификации. \en Get the modification type.
|
||||
MbeModifyingMode GetType() const { return _modificationType; }
|
||||
|
||||
|
||||
@@ -331,17 +331,21 @@ public:
|
||||
/// \ru Деструктор. \en Destructor. \~
|
||||
~MbRepairInconsistentMeshParams() {}
|
||||
|
||||
/// \ru Переключатель между абсолютной и относительной точностью. \en Switch between absolute and relative accuracy. \~
|
||||
/// \ru Установить ориентирование нормалей вовне. \en Set orienting of normal vectors outwards. \~
|
||||
void SetOrientOutward( bool orient ) { _orientOutward = orient; }
|
||||
/// \ru Ориентировать ли нормали вовне. \en Whether the accuracy is set to absolute or relative. \~
|
||||
/// \ru Ориентировать ли нормали вовне. \en Whether to orient normal vectors outwards. \~
|
||||
bool IsOrientOutward() const { return _orientOutward; }
|
||||
/// \ru Установить точность. \en Set tolerance. \~
|
||||
void SetTolerance( double tolerance ) { _tolerance = tolerance; }
|
||||
/// \ru Получить точность. \en Get tolerance. \~
|
||||
double GetTolerance() const { return _tolerance; }
|
||||
/// \ru Установить угол. \en Set angle. \~
|
||||
void SetSharpAngle( double angle ) { _angleSharp = angle; }
|
||||
/// \ru Получить угол. \en Get angle. \~
|
||||
double GetSharpAngle() const { return _angleSharp; }
|
||||
/// \ru Усреднять ли нормали. \en Whether normal vectors is to be averaged. \~
|
||||
/// \ru Установить усреднение нормалей. \en Set averaging of normal vectors. \~
|
||||
void SetNormalsAveraging( bool flag ) { _bNormalAveraging = flag; }
|
||||
/// \ru Усреднять ли нормали. \en Whether to average normal vectors. \~
|
||||
bool NeedNormalsAveraging() const { return _bNormalAveraging; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbRepairInconsistentMeshParams );
|
||||
@@ -1352,6 +1356,7 @@ private:
|
||||
MbeSpaceType _surfaceType; ///< \ru Тип поверхности. \en A surface type.
|
||||
double _tolerance; ///< \ru Точность распознавания. \en A fitting tolerance.
|
||||
c3d::IndicesVector _indicies; ///< \ru Индексы полигонов сетки. \en Indicies of polygons.
|
||||
size_t _iRegion; ///< \ru Регион сегментации. \en Segmentation region.
|
||||
MbeRejectOutliersType _typeReject; ///< \ru Способ отбраковки выбросов. \en Outliers rejection mode.
|
||||
double _valueReject; ///< \ru Пороговое значения для отбраковки выбросов. \en Outliers rejection mode treshold value.
|
||||
MbSurfaceFitConstraint _fitConstraint; ///< \ru Ограничение. \en Constraint.
|
||||
@@ -1368,6 +1373,7 @@ private:
|
||||
size_t _order; ///< \ru Порядок нурбс поверхности. \en NURBs surface order.
|
||||
size_t _countCpMax; ///< \ru Максимально разрешенное количество контрольных точек. \en Maximum allowed control points count.
|
||||
double _smoothCoef; ///< \ru Коэффициент сглаживания [1e-9 - 1e-3]. \en Smoothing coefficient [1e-9 - 1e-3].
|
||||
double _angleDelta; ///< \ru Отклонение угла поворота направления изолиний (в градусах). \en Rotation delta for isolines direction (in degrees).
|
||||
|
||||
private:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
@@ -1375,6 +1381,7 @@ private:
|
||||
: _surfaceType ( st_Undefined )
|
||||
, _tolerance ( c3d::DELTA_MIN )
|
||||
, _indicies ( )
|
||||
, _iRegion ( SYS_MAX_T )
|
||||
, _typeReject ( rot_NoReject )
|
||||
, _valueReject ( 0. )
|
||||
, _pointsFittingMax ( 10000 )
|
||||
@@ -1386,6 +1393,7 @@ private:
|
||||
, _order ( c3d::NURBS_DEGREE )
|
||||
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
|
||||
, _smoothCoef ( METRIC_ACCURACY )
|
||||
, _angleDelta ( 0. )
|
||||
{}
|
||||
|
||||
public:
|
||||
@@ -1396,6 +1404,7 @@ public:
|
||||
: _surfaceType ( surfaceType )
|
||||
, _tolerance ( tolerance )
|
||||
, _indicies ( indicies )
|
||||
, _iRegion ( SYS_MAX_T )
|
||||
, _typeReject ( rot_NoReject )
|
||||
, _valueReject ( 0. )
|
||||
, _pointsFittingMax ( 10000 )
|
||||
@@ -1407,6 +1416,7 @@ public:
|
||||
, _order ( c3d::NURBS_DEGREE )
|
||||
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
|
||||
, _smoothCoef ( METRIC_ACCURACY )
|
||||
, _angleDelta ( 0. )
|
||||
{}
|
||||
/// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
explicit MbSurfaceFitToGridParameters( MbeSpaceType surfaceType,
|
||||
@@ -1417,6 +1427,7 @@ public:
|
||||
: _surfaceType ( surfaceType )
|
||||
, _tolerance ( tolerance )
|
||||
, _indicies ( indicies )
|
||||
, _iRegion ( SYS_MAX_T )
|
||||
, _typeReject ( rejectType )
|
||||
, _valueReject ( rejectValue )
|
||||
, _pointsFittingMax ( 10000 )
|
||||
@@ -1428,6 +1439,7 @@ public:
|
||||
, _order ( c3d::NURBS_DEGREE )
|
||||
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
|
||||
, _smoothCoef ( METRIC_ACCURACY )
|
||||
, _angleDelta ( 0. )
|
||||
{}
|
||||
/// \ru Конструктор по параметрам для вписывания аналитических поверхностей. \en Constructor by parameters for analytic surfaces fitting.
|
||||
explicit MbSurfaceFitToGridParameters( MbeSpaceType surfaceType,
|
||||
@@ -1441,6 +1453,7 @@ public:
|
||||
: _surfaceType ( surfaceType )
|
||||
, _tolerance ( tolerance )
|
||||
, _indicies ( indicies )
|
||||
, _iRegion ( SYS_MAX_T )
|
||||
, _typeReject ( rejectType )
|
||||
, _valueReject ( rejectValue )
|
||||
, _pointsFittingMax ( 10000 )
|
||||
@@ -1452,6 +1465,7 @@ public:
|
||||
, _order ( c3d::NURBS_DEGREE )
|
||||
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
|
||||
, _smoothCoef ( METRIC_ACCURACY )
|
||||
, _angleDelta ( 0. )
|
||||
{}
|
||||
/// \ru Конструктор по параметрам для вписывания нурбс поверхности. \en Constructor by parameters for NURBs surface fitting.
|
||||
explicit MbSurfaceFitToGridParameters( MbeSpaceType surfaceType,
|
||||
@@ -1463,6 +1477,7 @@ public:
|
||||
: _surfaceType ( surfaceType )
|
||||
, _tolerance ( tolerance )
|
||||
, _indicies ( indicies )
|
||||
, _iRegion ( SYS_MAX_T )
|
||||
, _typeReject ( rot_NoReject )
|
||||
, _valueReject ( 0. )
|
||||
, _pointsFittingMax ( 10000 )
|
||||
@@ -1474,6 +1489,7 @@ public:
|
||||
, _order ( order )
|
||||
, _countCpMax ( countCpMax )
|
||||
, _smoothCoef ( smoothCoef )
|
||||
, _angleDelta ( 0. )
|
||||
{}
|
||||
|
||||
/// \ru Выдать тип поверхности. \en Get surface type.
|
||||
@@ -1482,6 +1498,10 @@ public:
|
||||
double GetTolerance() const { return _tolerance; }
|
||||
/// \ru Выдать индексы полигонов. \en Get indicies of polygons.
|
||||
const c3d::IndicesVector & GetIndicies() const { return _indicies; }
|
||||
/// \ru Выдать индекс региона сегментации. \en Get the index of a segmentation region.
|
||||
size_t GetRegionIndex() const { return _iRegion; }
|
||||
/// \ru Задать индекс региона сегментации. \en Set the index of a segmentation region.
|
||||
void SetRegionIndex( size_t iRegion ) { _iRegion = iRegion; }
|
||||
/// \ru Выдать метод отбраковки выбросов. \en Get outliers rejection mode.
|
||||
MbeRejectOutliersType GetOutliersRejectionMode() const { return _typeReject; }
|
||||
/// \ru Выдать пороговое значения для отбраковки выбросов. \en Get outliers rejection mode treshold value.
|
||||
@@ -1492,6 +1512,8 @@ public:
|
||||
size_t GetCountCpMax() const { return _countCpMax; }
|
||||
/// \ru Выдать коэффициент сглаживания. \en Get smoothing coefficient.
|
||||
double GetSmoothCoef() const { return _smoothCoef; }
|
||||
/// \ru Выдать отклонение угла поворота направления изолиний. \en Get the rotation delta for isolines direction.
|
||||
double GetAngleDelta() const { return _angleDelta; }
|
||||
/// \ru Выдать минимально возможный половинный угол конуса. \en Get mininmum allowed cone half-angle.
|
||||
double GetAngleConeMin() const { return _angleConeMin; }
|
||||
/// \ru Выдать максимально возможный половинный угол конуса. \en Get maximum allowed cone half-angle.
|
||||
@@ -1522,6 +1544,11 @@ public:
|
||||
_countCpMax = countCpMax;
|
||||
_smoothCoef = smoothCoef;
|
||||
}
|
||||
/// \ru Установить отклонение угла поворота направления изолиний (в градусах) для вписывания нурбс поверхности. \en Set the rotation delta for isolines direction (in degrees) of a NURBS surface.
|
||||
void SetNurbsAngleDelta( double angleDelta )
|
||||
{
|
||||
_angleDelta = angleDelta;
|
||||
}
|
||||
/** \brief \ru Ограничить ось примитива.
|
||||
\en Add an axis constraint. \~
|
||||
\details \ru Ограничить ось цилиндра, конуса или тора, а также нормаль плоскости.
|
||||
|
||||
@@ -78,7 +78,10 @@ public:
|
||||
MethodRemesh GetMethod() const { return _method; }
|
||||
///< \ru Получить фиксированные ребра. \en Get fixed edges.
|
||||
const c3d::IndicesVector & GetFixedEdges() const { return _fixedEdges; }
|
||||
///< \ru Зафиксировать открытые границы. \en Fix open boundaries.
|
||||
void FixOpenBoundaries( MbPolymesh & mesh );
|
||||
///< \ru Зафиксировать открытые границы. \en Fix open borders.
|
||||
DEPRECATE_DECLARE_REPLACE( FixOpenBoundaries )
|
||||
void FixOpenBorders( MbPolymesh & mesh );
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbRemeshParams );
|
||||
@@ -246,6 +249,10 @@ private:
|
||||
SPtr<MbPolymesh> _mesh; ///< \ru Линеаризация оболочки. \en Shell linearization. \~
|
||||
SPtr<const MbCurve3D> _firstStageRegion; ///< \ru Кривая для приоритетной области. \en First stage region curve. \~
|
||||
SPtr<const MbCurve3D> _constrainCurve; ///< \ru Кривая-констрейн. \en Constraint curve. \~
|
||||
c3d::IndicesVector _firstStageFaces; ///< \ru Массив индексов граней для приоритетной области. \en Face indices for the first stage region. \~
|
||||
|
||||
public:
|
||||
mutable IProgressIndicator * _progress; ///< \ru Индикатор прогресса выполнения операции. \en A progress indicator of the operation.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор (только для внутреннего использования ). \en Constructor ( for internal usage only ).
|
||||
@@ -280,6 +287,10 @@ public:
|
||||
SPtr<const MbCurve3D> & SetConstraintCurve() { return _constrainCurve; }
|
||||
// \ru Получить данные для расчета шага. \en Get data for step calculation. \~
|
||||
const MbStepData & GetStepData() const { return _stepData; }
|
||||
// \ru Получить массив граней приоритетной области. \en Get the first stage region faces. \~
|
||||
const c3d::IndicesVector GetFirstStageRegionFaces() const { return _firstStageFaces; }
|
||||
// \ru Установить массив граней приоритетной области. \en Set the first stage region faces. \~
|
||||
void SetFirstStageRegionFaces( const c3d::IndicesVector & faces ) { _firstStageFaces = faces; }
|
||||
|
||||
/// \ru Установить локальную систему координат развернутой поверхности сетки. \en Set the local coordinate system for a mesh unwrapping. \~
|
||||
void SetPlacement( const MbPlacement3D & pl ) { _place.Init( pl ); }
|
||||
@@ -403,7 +414,7 @@ public:
|
||||
\details \ru Получить грань-развертку.
|
||||
Ее контур получается путем аппроксимации границы сеточной развертки.
|
||||
\en Get an unwrapped face.
|
||||
This is a contour calculated by an approximation of the unwrapped mesh border.
|
||||
This is a contour calculated by an approximation of the unwrapped mesh boundary.
|
||||
\param[in] tolApprox - \ru Точность аппроксимации.
|
||||
\en An approximation tolerance. \~
|
||||
\param[out] unwrapped - \ru Грань-развертка.
|
||||
@@ -507,40 +518,40 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
MethodSmoothMesh _method; ///< \ru Метод сглаживания сетки. \en Mesh smoothing method.
|
||||
double _lambda; ///< \ru Коэффициент сжатия, используемый на нечетных шагах в "taubin smoothing". \en The compression factor used in odd steps in "taubin smoothing".
|
||||
double _mu; ///< \ru Коэффициент расширения, используемый на четных шагах в "taubin smoothing". \en The expansion factor used in even steps in "taubin smoothing".
|
||||
size_t _maxIter; ///< \ru Максимальное число итераций. \en Maximum iteration number.
|
||||
bool _bFixBorders; ///< \ru Сохранять границы. \en Save borders.
|
||||
c3d::IndicesVector _facets; ///< \ru Индексы фасетов. Если набор фасетов пустой, то сглаживается вся сетка. \en Facet indices to smooth. If the facet set is empty, the entire mesh is smoothed.
|
||||
c3d::IndicesVector _fixVertices; ///< \ru Индексы фиксированных вершин. \en Fixed vertex indices.
|
||||
MethodSmoothMesh _method; ///< \ru Метод сглаживания сетки. \en Mesh smoothing method.
|
||||
double _lambda; ///< \ru Коэффициент сжатия, используемый на нечетных шагах в "taubin smoothing". \en The compression factor used in odd steps in "taubin smoothing".
|
||||
double _mu; ///< \ru Коэффициент расширения, используемый на четных шагах в "taubin smoothing". \en The expansion factor used in even steps in "taubin smoothing".
|
||||
size_t _maxIter; ///< \ru Максимальное число итераций. \en Maximum iteration number.
|
||||
bool _bFixBoundaries; ///< \ru Сохранять границы. \en Save boundaries.
|
||||
c3d::IndicesVector _facets; ///< \ru Индексы фасетов. Если набор фасетов пустой, то сглаживается вся сетка. \en Facet indices to smooth. If the facet set is empty, the entire mesh is smoothed.
|
||||
c3d::IndicesVector _fixVertices; ///< \ru Индексы фиксированных вершин. \en Fixed vertex indices.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
MbMeshSmoothingParams()
|
||||
: _method ( MethodSmoothMesh::smoothTaubin )
|
||||
, _lambda ( 0.33 )
|
||||
, _mu ( -0.34 )
|
||||
, _maxIter ( 100 )
|
||||
, _bFixBorders ( true )
|
||||
, _facets ( )
|
||||
, _fixVertices ( )
|
||||
: _method ( MethodSmoothMesh::smoothTaubin )
|
||||
, _lambda ( 0.33 )
|
||||
, _mu ( -0.34 )
|
||||
, _maxIter ( 100 )
|
||||
, _bFixBoundaries ( true )
|
||||
, _facets ( )
|
||||
, _fixVertices ( )
|
||||
{}
|
||||
/// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MbMeshSmoothingParams( MethodSmoothMesh method,
|
||||
double lambda,
|
||||
double mu,
|
||||
size_t maxIter,
|
||||
bool bFixBorders,
|
||||
bool bFixBoundaries,
|
||||
const c3d::IndicesVector & facets,
|
||||
const c3d::IndicesVector & fixVertices )
|
||||
: _method ( method )
|
||||
, _lambda ( lambda )
|
||||
, _mu ( mu )
|
||||
, _maxIter ( maxIter )
|
||||
, _bFixBorders ( bFixBorders )
|
||||
, _facets ( facets )
|
||||
, _fixVertices ( fixVertices )
|
||||
: _method ( method )
|
||||
, _lambda ( lambda )
|
||||
, _mu ( mu )
|
||||
, _maxIter ( maxIter )
|
||||
, _bFixBoundaries ( bFixBoundaries )
|
||||
, _facets ( facets )
|
||||
, _fixVertices ( fixVertices )
|
||||
{}
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbMeshSmoothingParams() {}
|
||||
@@ -554,8 +565,11 @@ public:
|
||||
void SetMu( double mu ) { _mu = mu; }
|
||||
// \ru Установить максимальное число итераций. \en Set the maximum iteration number. \~
|
||||
void SetMaxIter( size_t maxIter ) { _maxIter = maxIter; }
|
||||
// \ru Установить флаг сохранения границ. \en Set the save borders flag. \~
|
||||
void SetFixBorders( bool bFixBorders ) { _bFixBorders = bFixBorders; }
|
||||
// \ru Установить флаг сохранения границ. \en Set the save boundaries flag. \~
|
||||
void SetFixBoundaries( bool bFixBoundaries ) { _bFixBoundaries = bFixBoundaries; }
|
||||
// \ru Установить флаг сохранения границ. \en Set the save boundaries flag. \~
|
||||
DEPRECATE_DECLARE_REPLACE( SetFixBoundaries )
|
||||
void SetFixBorders( bool bFixBorders ) { _bFixBoundaries = bFixBorders; }
|
||||
// \ru Установить набор индексов фасетов для сглаживания. \en Set facet indices to smooth. \~
|
||||
void SetFacets( const c3d::IndicesVector & facets ) { _facets = facets; }
|
||||
// \ru Установить набор фиксированных вершин. \en Set the fixed vertex indices. \~
|
||||
@@ -568,8 +582,11 @@ public:
|
||||
double GetMu() const { return _mu; }
|
||||
// \ru Получить максимальное число итераций. \en Get the maximum iteration number. \~
|
||||
size_t GetMaxIter() const { return _maxIter; }
|
||||
// \ru Получить флаг сохранения границ. \en Get the save borders flags. \~
|
||||
bool GetFixBorders() const { return _bFixBorders; }
|
||||
// \ru Получить флаг сохранения границ. \en Get the save boundaries flags. \~
|
||||
bool GetFixBoundaries() const { return _bFixBoundaries; }
|
||||
// \ru Получить флаг сохранения границ. \en Get the save boundaries flags. \~
|
||||
DEPRECATE_DECLARE_REPLACE( GetFixBoundaries )
|
||||
bool GetFixBorders() const { return _bFixBoundaries; }
|
||||
// \ru Получить набор индексов фасетов для сглаживания. \en Get facet indices to smooth. \~
|
||||
const c3d::IndicesVector & GetFacets() const { return _facets; }
|
||||
// \ru Получить набор фиксированных вершин. \en Get the fixed vertex indices. \~
|
||||
@@ -643,4 +660,70 @@ public:
|
||||
OBVIOUS_PRIVATE_COPY( MbPolylinePolymeshProjectResults );
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры заполнения отверстия, заданного замкнутой кривой.
|
||||
\en Parameters for filling a hole defined by a closed curve. \~
|
||||
\details \ru Параметры заполнения отверстия, заданного замкнутой кривой. \n
|
||||
Параметры содержат точки на границе отверстия.
|
||||
\en Parameters for filling a hole defined by a closed curve. \n
|
||||
Parameters contain points on the hole's boundary. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbFillClosedCurveParams
|
||||
{
|
||||
private:
|
||||
c3d::SpacePointsVector _points; ///< \ru Точки на границе отверстия. \en Points on the hole's boundary. \~
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по кривой. \en Constructor by a curve.
|
||||
MbFillClosedCurveParams( const MbPolyline3D & polyline );
|
||||
/// \ru Конструктор по точкам. \en Constructor by points.
|
||||
MbFillClosedCurveParams( const c3d::SpacePointsVector & points );
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbFillClosedCurveParams() {}
|
||||
|
||||
public:
|
||||
// \ru Получить точки на границе отверстия. \en Get the points on the hole's boundary. \~
|
||||
const c3d::SpacePointsVector & GetPoints() const { return _points; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbFillClosedCurveParams );
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры заполнения отверстия полигонального объекта.
|
||||
\en Parameters for filling a polygonal object hole. \~
|
||||
\details \ru Параметры заполнения отверстия полигонального объекта. \n
|
||||
Параметры содержат индексы рёбер на границе отверстия.
|
||||
\en Parameters for filling a polygonal object hole. \n
|
||||
Parameters contain the indices of the edges from the hole's boundary. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbFillPolymeshHoleParams
|
||||
{
|
||||
private:
|
||||
c3d::IndicesVector _boundary; ///< \ru Список ребер вдоль отверстия. \en The list of edges along the hole's boundary. \~
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
MbFillPolymeshHoleParams() : _boundary() {}
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbFillPolymeshHoleParams() {}
|
||||
|
||||
public:
|
||||
/// \ru Инициализировать ребром топологии. \en Initialize by the topology edge.
|
||||
bool InitializeByTopoEdge( const MbPolymesh & mesh, size_t iEdTopo );
|
||||
/// \ru Инициализировать ребром сегментации. \en Initialize by the segmentation edge.
|
||||
bool InitializeBySegmEdge( const MbPolymesh & mesh, size_t iEdSegm );
|
||||
// \ru Получить границу отверстия. \en Get the hole's boundary. \~
|
||||
const c3d::IndicesVector & GetBoundary() const { return _boundary; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbFillPolymeshHoleParams );
|
||||
};
|
||||
|
||||
#endif // __OP_POLYMESH_PARAMETERS_H
|
||||
|
||||
@@ -3262,6 +3262,7 @@ public:
|
||||
InputMode inputMode; ///< \ru Вид входных граней. \en Input faces mode.
|
||||
bool detectPairs; ///< \ru При заданном построении по двум наборам граней, попробовать распознать в них пары эквидистантных граней. \en When two groups of faces are specified, try to detect pairs of offset faces in them.
|
||||
c3d::BoolPair groupsInvNormals; ///< \ru При заданном построении по двум наборам граней каждый флаг из пары задает признак инвертирования нормалей для соответствующего набора граней. \en When two groups of faces are specified each flag from pair indicates inversion of normals for corresponding group.
|
||||
bool respGroupExt; ///< \ru При заданном построении по двум наборам граней, флаг определяет, будут ли при необходимости продолжены грани из ответного (второго) набора граней. \en When two groups of faces are specified, this flag defines whether faces from response (second) group may be extended when necessary.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
@@ -3274,30 +3275,33 @@ public:
|
||||
, cutByBordes ( false )
|
||||
, inputMode ( im_pairs )
|
||||
, detectPairs ( false )
|
||||
, respGroupExt ( true )
|
||||
, groupsInvNormals( false, false )
|
||||
{}
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
MedianShellValues( const MedianShellValues & other )
|
||||
: filletType ( other.filletType )
|
||||
, medianAttribute( ma_none )
|
||||
, position ( other.position )
|
||||
, dmin ( other.dmin )
|
||||
, dmax ( other.dmax )
|
||||
, cutByBordes ( other.cutByBordes )
|
||||
, inputMode ( other.inputMode )
|
||||
, detectPairs ( other.detectPairs )
|
||||
: filletType ( other.filletType )
|
||||
, medianAttribute( ma_none )
|
||||
, position ( other.position )
|
||||
, dmin ( other.dmin )
|
||||
, dmax ( other.dmax )
|
||||
, cutByBordes ( other.cutByBordes )
|
||||
, inputMode ( other.inputMode )
|
||||
, detectPairs ( other.detectPairs )
|
||||
, respGroupExt ( other.respGroupExt )
|
||||
, groupsInvNormals ( other.groupsInvNormals )
|
||||
{}
|
||||
/// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MedianShellValues( double pos, double d1, double d2, bool cut )
|
||||
: filletType ( tf_average )
|
||||
, medianAttribute( ma_none )
|
||||
, position ( pos )
|
||||
, dmin ( d1 )
|
||||
, dmax ( d2 )
|
||||
, cutByBordes ( cut )
|
||||
, inputMode ( im_pairs )
|
||||
, detectPairs ( false )
|
||||
: filletType ( tf_average )
|
||||
, medianAttribute( ma_none )
|
||||
, position ( pos )
|
||||
, dmin ( d1 )
|
||||
, dmax ( d2 )
|
||||
, cutByBordes ( cut )
|
||||
, inputMode ( im_pairs )
|
||||
, detectPairs ( false )
|
||||
, respGroupExt ( true )
|
||||
, groupsInvNormals ( false, false )
|
||||
{}
|
||||
|
||||
@@ -3313,6 +3317,7 @@ public:
|
||||
( cutByBordes == obj.cutByBordes ) &&
|
||||
( inputMode == obj.inputMode ) &&
|
||||
( detectPairs == obj.detectPairs ) &&
|
||||
( respGroupExt == obj.respGroupExt ) &&
|
||||
( groupsInvNormals == obj.groupsInvNormals );
|
||||
}
|
||||
|
||||
@@ -3337,6 +3342,7 @@ public:
|
||||
cutByBordes = other.cutByBordes;
|
||||
inputMode = other.inputMode;
|
||||
detectPairs = other.detectPairs;
|
||||
respGroupExt = other.respGroupExt;
|
||||
groupsInvNormals = other.groupsInvNormals;
|
||||
|
||||
return *this;
|
||||
@@ -3358,24 +3364,28 @@ class MATH_CLASS MedianShellFaces {
|
||||
private:
|
||||
std::vector<c3d::ItemIndexPair> facePairs; ///< \ru Набор пар выбранных граней. \en Set of selected faces pairs.
|
||||
std::vector<double> distances; ///< \ru Вектор смещений второй грани по отношению к первой в каждой паре. \en Vector of shift values of second face in reference to first face in each pair.
|
||||
std::vector<c3d::BoolPair> invFacesNormals; ///< \ru Каждый флаг из пары задает признак инвертирования нормали для соответствующей грани. \en Each flag from pair indicates inversion of normal for the corresponding face.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
MedianShellFaces() {
|
||||
facePairs.resize( 0 );
|
||||
distances.resize( 0 );
|
||||
invFacesNormals.resize( 0 );
|
||||
}
|
||||
/// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MedianShellFaces( const std::vector<c3d::ItemIndexPair> & pairs )
|
||||
{
|
||||
facePairs = pairs;
|
||||
distances.resize( pairs.size() );
|
||||
invFacesNormals.resize( pairs.size() );
|
||||
}
|
||||
/// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MedianShellFaces( const MedianShellFaces & other )
|
||||
{
|
||||
facePairs = other.facePairs;
|
||||
distances = other.distances;
|
||||
facePairs = other.facePairs;
|
||||
distances = other.distances;
|
||||
invFacesNormals = other.invFacesNormals;
|
||||
}
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MedianShellFaces() {}
|
||||
@@ -3396,6 +3406,17 @@ public:
|
||||
{
|
||||
facePairs.push_back( c3d::ItemIndexPair(f1,f2) );
|
||||
distances.push_back( dist );
|
||||
invFacesNormals.emplace_back( false, false );
|
||||
}
|
||||
/// \ru Добавить в набор пару граней. \en Add pair of faces.
|
||||
void AddFacePair( const MbItemIndex & f1,
|
||||
const MbItemIndex & f2,
|
||||
const c3d::BoolPair & invNormals,
|
||||
const double dist )
|
||||
{
|
||||
facePairs.push_back( c3d::ItemIndexPair(f1,f2) );
|
||||
distances.push_back( dist );
|
||||
invFacesNormals.emplace_back( invNormals );
|
||||
}
|
||||
/// \ru Получить пару граней по индексу. \en Get pair of faces by index.
|
||||
const c3d::ItemIndexPair & _GetFacePair( size_t index ) const { return facePairs[index]; }
|
||||
@@ -3406,23 +3427,32 @@ public:
|
||||
{
|
||||
facePairs.erase( facePairs.begin() + index );
|
||||
distances.erase( distances.begin() + index );
|
||||
invFacesNormals.erase( invFacesNormals.begin() + index );
|
||||
}
|
||||
/// \ru Вернуть расстояние между гранями. \en Get distance between faces.
|
||||
const double & _GetDistance( size_t index ) const { return distances[index]; }
|
||||
/// \ru Установить расстояние между гранями. \en Set distance between faces.
|
||||
void _SetDistance( size_t index, double value ) { distances[index] = value; }
|
||||
/// \ru Вернуть флаги, задающие признак инвертирования нормалей для каждой из граней в паре. \en Get the flags, which indicate inversion of normals for each face in the pair.
|
||||
const c3d::BoolPair & _GetInvFacesNormals( size_t index ) const { return invFacesNormals[index]; }
|
||||
/// \ru Установить флаги, задающие признак инвертирования нормалей для каждой из граней в паре. \en Set the flags, which indicate inversion of normals for each face in the pair.
|
||||
void _SetInvFacesNormals( size_t index, const c3d::BoolPair & value ) { invFacesNormals[index] = value; }
|
||||
/// \ru Инвертировать пару граней в наборе. \en Inverse face pair.
|
||||
void Inverse( size_t index ) { std::swap(facePairs[index].first, facePairs[index].second); }
|
||||
void Inverse( size_t index ) {
|
||||
std::swap( facePairs[index].first, facePairs[index].second );
|
||||
std::swap( invFacesNormals[index].first, invFacesNormals[index].second );
|
||||
}
|
||||
/// \ru Вернуть количество пар граней в наборе. \en Get count of pairs in given set.
|
||||
size_t Count() const { return facePairs.size(); }
|
||||
/// \ru Оператор присваивания. \en Assignment operator.
|
||||
MedianShellFaces & operator = ( const MedianShellFaces & other ) {
|
||||
facePairs = other.facePairs;
|
||||
distances = other.distances;
|
||||
invFacesNormals = other.invFacesNormals;
|
||||
return *this;
|
||||
}
|
||||
/// \ru Очистка текущего набора. \en Clear current faces set.
|
||||
void Clear() { facePairs.clear(); distances.clear(); }
|
||||
void Clear() { facePairs.clear(); distances.clear(); invFacesNormals.clear(); }
|
||||
/// \ru Проверить наличие пары в наборе. \en Check if pair already in set.
|
||||
size_t IsExist( const MbItemIndex & ind, size_t start_pos, size_t end_pos, bool & first ) const;
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ public:
|
||||
|
||||
/// \ru Установить, инициализирована ли сегментация. \en Check whether the segmentation is initialized.
|
||||
virtual bool IsSegmented() const = 0;
|
||||
/// \ru Инициализировать сегментацию критерием границы. \en Initialize a segmentation by a border criterion.
|
||||
/// \ru Инициализировать сегментацию критерием границы. \en Initialize a segmentation by a boundary criterion.
|
||||
virtual void Initialize( const MbHalfedgeBoundaryCriterionBase & crit ) = 0;
|
||||
/// \ru Инициализировать сегментацию из одного региона. \en Initialize segmentation with one region.
|
||||
virtual void Initialize() = 0;
|
||||
@@ -405,6 +405,18 @@ public:
|
||||
\en Remove vertices of valence two. \~
|
||||
*/
|
||||
virtual void MergeRegions( const c3d::IndicesVector & regions, bool bRemoveValence2 ) = 0;
|
||||
/** \brief \ru Расшить ребра сегментации.
|
||||
\en Unsew segmentation edges. \~
|
||||
\param[in] edgesSegmToUnsew - \ru Ребра сегментации.
|
||||
\en Segmentation edges. \~
|
||||
*/
|
||||
virtual void UnsewSegmEdges( const c3d::IndicesVector & edgesSegmToUnsew ) = 0;
|
||||
/** \brief \ru Расшить ребра сетки.
|
||||
\en Unsew topology edges. \~
|
||||
\param[in] edgesTopoToUnsew - \ru Ребра сетки.
|
||||
\en Topology edges. \~
|
||||
*/
|
||||
virtual void UnsewTopoEdges( const c3d::IndicesVector & edgesTopoToUnsew ) = 0;
|
||||
/** \brief \ru Разбить сегментацию выбранными фасетами.
|
||||
\en Split a segmentation by a given facet set. \~
|
||||
\param[in] splitSet - \ru Фасеты.
|
||||
|
||||
@@ -150,7 +150,7 @@ enum MbeSpaceType {
|
||||
st_ExplorationSurface = 347, ///< \ru Поверхность заметания с масштабированием и поворотом образующей кривой. \en Swept surface with scaling and winding of generating curve.
|
||||
st_SectionSurface = 348, ///< \ru Поверхность заметания переменного сечения. \en The swept mutable section surface.
|
||||
st_SimplexSpline = 349, ///< \ru Поверхность, моделирующая симплексный сплайн.
|
||||
st_RuledBendedUnbendedSurface=341, ///< \ru Поверхность, полученная линейчатым сгибом/разгибом. \en Surface constructed by ruled fold / unbending.
|
||||
st_RuledBendedUnbendedSurface=350, ///< \ru Поверхность, полученная линейчатым сгибом/разгибом. \en Surface constructed by ruled fold / unbending.
|
||||
st_FreeSurface = 400, ///< \ru Тип для поверхностей, созданных пользователем. \en Type for the user-defined surfaces. \n
|
||||
|
||||
// \ru Типы вспомогательных объектов. \en Helper object types.
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
#include <tool_multithreading.h>
|
||||
|
||||
|
||||
class MATH_CLASS MbFunction;
|
||||
struct MbFilletSurfaceCacheData;
|
||||
class MbFunction;
|
||||
struct MbFilletSurfaceCacheData;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Поверхность скругления с постоянными радиусами обычная или с сохранением кромки.
|
||||
@@ -454,6 +454,7 @@ public:
|
||||
|
||||
double GetFilletRadius( const MbCartPoint3D & p, double accuracy = METRIC_REGION ) const override; // \ru Является ли поверхность скруглением. \en Whether the surface is fillet.
|
||||
virtual double GetFilletRadius( double u ) const; // \ru Дать радиус скругления по первому параметру. \en Get fillet radius if the surface is fillet.
|
||||
bool GetParamByPoints( const MbCartPoint & uv1, const MbCartPoint & uv2, double & u ) const; // \ru Найти параметр поверхности по точкам касания сферы. \en Find parameter of fillet surface by points of sphere touching.
|
||||
// \ru Построить касательные и нормальные плейсменты конструктивных плоскостей. \en Construct tangent and normal placements of constructive planes.
|
||||
bool CreateNormalPlacements ( const MbVector3D & axisZ, double angle, SArray<MbPlacement3D> & places, VERSION version = Math::DefaultMathVersion() ) const override;
|
||||
bool CreateTangentPlacements( const MbVector3D & axisZ, SArray<MbPlacement3D> & places ) const override;
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru Класс для вписывания поверхности в полигональный объект.
|
||||
\en Class for fitting surfaces to a polygonal object. \~
|
||||
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __SURFACE_FITTING_H
|
||||
#define __SURFACE_FITTING_H
|
||||
|
||||
#include <mb_operation_result.h>
|
||||
#include <math_define.h>
|
||||
|
||||
class MbSurfaceFitToGridParameters;
|
||||
class MbSurfaceFitToGridResults;
|
||||
class MbGrid;
|
||||
class MbPolymeshTopo;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Класс для вписывания поверхности в полигональный объект.
|
||||
\en Class for fitting surfaces to a polygonal object. \~
|
||||
\details \ru Класс для вписывания поверхности в полигональный объект.
|
||||
Выполняет аппроксимацию заданного полигонального объекта или его сегментов поверхностями определенного типа.
|
||||
Можно вписать аналитическую поверхность (плоскость, цилиндр, сферу, конус или тор),
|
||||
поверхность движения (вращения или выдавливания) и NURBS поверхность.
|
||||
Автоматическое определение типа позволяет вписать аналитическую поверхность, которая подходит лучшим образом.
|
||||
Для вписывания в часть полигонального объекта выбранные треугольники/фасеты и регионы должны быть указаны
|
||||
при создании экземпляра класса.
|
||||
\en Class for fitting surfaces to a polygonal object.
|
||||
Approximates a given polygonal object or its segment to a surface of a given type.
|
||||
There can be fit an analitical surface (plane, cylinder, sphere, cone or torus),
|
||||
a swept surface (revolution or extrision) and a NURBS surface.\
|
||||
During automatic fitting the type of an analitical surface is defined automatically.
|
||||
When fitting to the part of a polygonal object selected triangles/facets or regions have to be defined
|
||||
while creating the class instance. \~
|
||||
\ingroup Algorithms_3D
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbSurfaceFitter
|
||||
{
|
||||
protected:
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
MbSurfaceFitter();
|
||||
|
||||
public:
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
virtual ~MbSurfaceFitter() {}
|
||||
|
||||
public:
|
||||
/// \ru Создать объект на основе триангуляции. \en Create an object based on a triangulation.
|
||||
static MbSurfaceFitter * Create( const MbGrid & grid, const c3d::IndicesVector * indices = nullptr );
|
||||
/// \ru Создать объект на основе топологии полигонального объекта. \en Create an object based on a topology of a polygonal object.
|
||||
static MbSurfaceFitter * Create( const MbPolymeshTopo & mesh );
|
||||
/// \ru Создать объект на основе набора фасетов полигонального объекта. \en Create an object based on given facets of a polygonal object.
|
||||
static MbSurfaceFitter * Create( const MbPolymeshTopo & mesh, const c3d::IndicesVector & indices );
|
||||
/// \ru Создать объект на основе региона полигонального объекта. \en Create an object based on a region of a polygonal object.
|
||||
static MbSurfaceFitter * Create( const MbPolymeshTopo & mesh, size_t iRegion );
|
||||
/// \ru Вписать поверхность. \en Fit a surface.
|
||||
virtual MbResultType FitSurface( const MbSurfaceFitToGridParameters & params, MbSurfaceFitToGridResults & results ) = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif // __SURFACE_FITTING_H
|
||||
@@ -295,7 +295,7 @@ template <class Type>
|
||||
Type * Array2<Type>::SetLine( size_t i ) {
|
||||
PRECONDITION( i < l );
|
||||
if ( i < l )
|
||||
return parr[i];
|
||||
return parr[i]; // SKIP_SA
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -508,7 +508,7 @@ inline bool realloc_line( Type *& line, size_t oldSize, size_t newSize )
|
||||
#else
|
||||
Type * p_tmp = newSize ? new Type[newSize] : 0;
|
||||
|
||||
if ( line )
|
||||
if ( line ) // SKIP_SA
|
||||
{
|
||||
if ( p_tmp )
|
||||
memcpy( p_tmp, line, std_min(oldSize, newSize) * sizeOfType );
|
||||
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
, typeRAB_m(t)
|
||||
{}
|
||||
PPNode( PPNode<Type> & other )
|
||||
: node_m( other.node)
|
||||
: node_m( other.node_m )
|
||||
, typeRAB_m( other.typeRAB_m )
|
||||
{}
|
||||
void Init( BalanceTreeNode<Type> * node, PPNodeType t ) { node_m = node; typeRAB_m = t; }
|
||||
|
||||
@@ -164,7 +164,7 @@ DPtr<T> & DPtr<T>::operator = ( const DPtr<T> & dptr )
|
||||
{
|
||||
m_Ptr = dptr.m_Ptr;
|
||||
m_Owner = dptr.m_Owner;
|
||||
m_Owner->AddRef();
|
||||
m_Owner->AddRef(); // SKIP_SA
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ size_t add_to_array ( SFDPArray<Type>& arr, Type& el, Type *&found, bool & added
|
||||
}
|
||||
|
||||
found = arr/*.parr*/[0];
|
||||
int res = (*arr.fCompare)( *found, el );
|
||||
int res = (*arr.fCompare)( *found, el ); // SKIP_SA
|
||||
if ( res > 0 ) { // \ru нулевой БОЛЬШЕ пришедшего - вставим ПЕРЕД нулевым \en the first element is GREATER than the sent one - set it BEFORE the first element
|
||||
found = ⪙
|
||||
arr.Insert( 0, &el );
|
||||
@@ -403,7 +403,7 @@ size_t add_to_array ( SFDPArray<Type>& arr, Type& el, Type *&found, bool & added
|
||||
size_t mx = arr.count - 1;
|
||||
|
||||
found = arr/*.parr*/[mx];
|
||||
res = (*arr.fCompare)( *found, el );
|
||||
res = (*arr.fCompare)( *found, el ); // SKIP_SA
|
||||
if ( res < 0 ) { // \ru последний МЕНЬШЕ пришедшего - вставим ПОСЛЕ последнего \en the last element is LESS than the sent one - set it AFTER the last element
|
||||
found = ⪙
|
||||
arr.Insert( mx+1, &el );
|
||||
@@ -430,7 +430,7 @@ size_t add_to_array ( SFDPArray<Type>& arr, Type& el, Type *&found, bool & added
|
||||
size_t md = ( mn + mx ) / 2;
|
||||
|
||||
found = arr/*.parr*/[md];
|
||||
res = (*arr.fCompare)( *found, el );
|
||||
res = (*arr.fCompare)( *found, el ); // SKIP_SA
|
||||
if ( res > 0 ) { // \ru md БОЛЬШЕ пришедшего, но mn МЕНЬШЕ пришедшего - поиск слева \en 'md' is GREATER than the sent one and 'mn' is LESS than the sent one - search on the left
|
||||
mx = md;
|
||||
}
|
||||
@@ -466,7 +466,7 @@ size_t find_in_array( const SFDPArray<Type>& arr, const Type& el, Type *&found )
|
||||
while ( mn + 1 < mx ) { // \ru пока не нашли - ищем \en seek until do not find
|
||||
size_t md = ( mn + mx ) / 2;
|
||||
found = arr[md];
|
||||
res = (*arr.fCompare)( *found, el );
|
||||
res = (*arr.fCompare)( *found, el ); // SKIP_SA
|
||||
switch ( res ) {
|
||||
case 1 : mx = md; break;
|
||||
case -1 : mn = md; break;
|
||||
@@ -477,7 +477,7 @@ size_t find_in_array( const SFDPArray<Type>& arr, const Type& el, Type *&found )
|
||||
|
||||
// \ru проверка по границам \en check by bounds
|
||||
found = arr[0];
|
||||
res = (*arr.fCompare)( *found, el );
|
||||
res = (*arr.fCompare)( *found, el ); // SKIP_SA
|
||||
switch ( res ) {
|
||||
case 0 : return 0;
|
||||
case 1 : return SYS_MAX_T;
|
||||
@@ -485,7 +485,7 @@ size_t find_in_array( const SFDPArray<Type>& arr, const Type& el, Type *&found )
|
||||
}
|
||||
|
||||
found = arr[mxc];
|
||||
res = (*arr.fCompare)( *found, el );
|
||||
res = (*arr.fCompare)( *found, el ); // SKIP_SA
|
||||
switch ( res ) {
|
||||
case 0 : return mxc;
|
||||
default : return SYS_MAX_T;
|
||||
@@ -495,7 +495,7 @@ size_t find_in_array( const SFDPArray<Type>& arr, const Type& el, Type *&found )
|
||||
// \ru специальные случаи count == >0 & < 11 \en special cases count == >0 & < 11
|
||||
for ( size_t i = 0, count = arr.count; i < count; i++ ) {
|
||||
found = arr[i];
|
||||
switch ( (*arr.fCompare)( *found, el ) ) {
|
||||
switch ( (*arr.fCompare)( *found, el ) ) { // SKIP_SA
|
||||
case 0 : return i;
|
||||
case 1 : return SYS_MAX_T;
|
||||
case -1 : break;
|
||||
@@ -522,7 +522,7 @@ size_t SFDPArray<Type>::SearchIt ( size_t data, typename SFDPArray<Type>::Search
|
||||
return SYS_MAX_T;
|
||||
|
||||
found = (*this)/*parr*/[0]; // \ru или найденный, или ближайший к искомому \en either found or the nearest to the required one
|
||||
int res = (*fSearch)( *found, data );
|
||||
int res = (*fSearch)( *found, data ); // SKIP_SA
|
||||
if ( res == 0 )
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -113,11 +113,21 @@ public:
|
||||
*/
|
||||
static bool IsEnoughMemory( double memRatio = -1 );
|
||||
|
||||
/** \brief \ru Сбросить все данные.
|
||||
\en Reset all data.
|
||||
/** \brief \ru Сбросить все накопленные данные.
|
||||
\en Reset all accumulated data.
|
||||
*/
|
||||
static void Reset();
|
||||
|
||||
/** \brief \ru Активирован ли обработчик фатальных ошибок (по умолчанию - активирован).
|
||||
\en Whether the handler of fatal errors is enabled (by default, enabled).
|
||||
*/
|
||||
static bool IsEnabled();
|
||||
|
||||
/** \brief \ru Активировать / деактивировать обработчик фатальных ошибок. Возвращает предыдущее состояние.
|
||||
\en Enable / disable the handler of fatal errors. Return the previous state.
|
||||
*/
|
||||
static bool Enable( bool enabled = true );
|
||||
|
||||
///> \ru Следующие методы будут удалены. \en The next methods will be removed.
|
||||
|
||||
/** \brief \ru Инициализировать обработчик перед началом мониторинга ошибок.
|
||||
|
||||
@@ -377,8 +377,10 @@ inline T * CacheManager<T>::operator()()
|
||||
T * res = nullptr;
|
||||
unsigned int threadKey = GetThreadKey();
|
||||
|
||||
if ( FatalErrorHandler::HasError() )
|
||||
return LongTerm();
|
||||
if ( FatalErrorHandler::HasError() ) {
|
||||
ScopedLock sl( GetLock(), false );
|
||||
return LongTerm();
|
||||
}
|
||||
|
||||
if ( tcache == nullptr ) {
|
||||
// \ru Подписаться на сборку мусора, так как используются многопоточные кэши.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
\ingroup Base_Tools
|
||||
*/
|
||||
// ---
|
||||
struct IfProgressIndicator
|
||||
struct MATH_CLASS IfProgressIndicator
|
||||
{
|
||||
/// \ru Инициализация. \en Initialization.
|
||||
virtual void StartProgress ( ptrdiff_t minValue, ptrdiff_t maxValue, const TCHAR * lpszNewText, bool resetTxt, bool aPIcall = false ) = 0;
|
||||
|
||||
@@ -1303,7 +1303,11 @@ bool MbFaceShell::FindIndexByFaces( const FacesPointersVector & initFaces, ItemI
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// \ru Найти множество граней по множеству комбинированных индексов. \en Find a set of faces by a set of combined indices.
|
||||
// \ru Найти множество граней по множеству комбинированных индексов. Массив indices на самом деле не константный.
|
||||
// При нахождении объекта по индексу, имени или точке остальные параметры индекса в массиве изменяются, чтобы соответствовать
|
||||
// найденному объекту.
|
||||
// \en Find a set of faces by a set of combined indices. indices array is not const. When the object is found
|
||||
// by the number, name or point, other index parameters are changed inside the array to correspond the found object.
|
||||
// ---
|
||||
template <class ItemIndices, class ConstFacesPointersVector>
|
||||
bool MbFaceShell::FindConstFacesByIndex( const ItemIndices & indices, ConstFacesPointersVector & initFaces ) const
|
||||
@@ -1324,7 +1328,11 @@ bool MbFaceShell::FindConstFacesByIndex( const ItemIndices & indices, ConstFaces
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// \ru Найти множество граней по множеству комбинированных индексов. \en Find a set of faces by a set of combined indices.
|
||||
// \ru Найти множество граней по множеству комбинированных индексов. Массив indices на самом деле не константный.
|
||||
// При нахождении объекта по индексу, имени или точке остальные параметры индекса в массиве изменяются, чтобы соответствовать
|
||||
// найденному объекту.
|
||||
// \en Find a set of faces by a set of combined indices. indices array is not const. When the object is found
|
||||
// by the number, name or point, other index parameters are changed inside the array to correspond the found object.
|
||||
// ---
|
||||
template <class ItemIndices, class FacesPointersVector>
|
||||
bool MbFaceShell::FindFacesByIndex( const ItemIndices & indices, FacesPointersVector & initFaces ) const
|
||||
|
||||
@@ -79,6 +79,7 @@ enum MbeChangedType {
|
||||
tct_Replaced = 0x0080, ///< \ru Заменен. \en Replaced.
|
||||
tct_Added = 0x0100, ///< \ru Добавлен или вставлен (элемент объекта). \en Added or inserted (object's element).
|
||||
tct_Renamed = 0x0200, ///< \ru Переименован. \en Renamed.
|
||||
tct_Divided = 0x0400, ///< \ru Разделен на части. \en Divided into parts.
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ class MbWireFramePoint;
|
||||
template <class Item>
|
||||
class MbSpaceContourCreationResults;
|
||||
|
||||
|
||||
namespace c3d // namespace C3D
|
||||
{
|
||||
typedef SPtr<MbWireFrame> WireFrameSPtr;
|
||||
@@ -63,13 +62,24 @@ protected :
|
||||
private :
|
||||
/// \ru Конструктор копирования с регистратором. \en Copy-constructor with the registrator.
|
||||
explicit MbWireFrame( const MbWireFrame &, MbRegDuplicate * );
|
||||
/// \ru Конструктор нормализованного каркаса по множеству рёбер, количеству связных частей и замкнутости. \en Constructor of normalized wireframe by set of edges, a number of connected parts and closedness.
|
||||
MbWireFrame( const RPArray<MbEdge> &, size_t parCnt, bool close );
|
||||
/// \ru Инициализация по множеству рёбер и строителю. \en Initialization by a set of edges and creator.
|
||||
template <class EdgesVector>
|
||||
void Init( const EdgesVector & items, const MbCreator * creator, bool same, VERSION version);
|
||||
/// \ru Инициализация по множеству рёбер и строителю. \en Initialization by a set of edges and creator.
|
||||
template <class EdgesVector>
|
||||
void Init( const EdgesVector & items, const MbWireFrame & oldFrame, const MbCreator * creator, VERSION version );
|
||||
/// \ru Инициализация по множеству кривых и строителю. \en Initialization by a set of curves and creator.
|
||||
template <class CurvesVector>
|
||||
void Init( const CurvesVector & curves, const MbCreator * creator, VERSION version );
|
||||
public :
|
||||
/// \ru Конструктор без параметров. \en Constructor without parameters.
|
||||
MbWireFrame();
|
||||
/// \ru Конструктор по кривой и строителю. \en Constructor by a curve and creator.
|
||||
MbWireFrame( const MbCurve3D &, const MbCreator * = nullptr );
|
||||
/// \ru Конструктор по множеству кривых и строителю. \en Constructor by a set of curves and creator.
|
||||
MbWireFrame( const RPArray<MbCurve3D> &, const MbCreator * = nullptr );
|
||||
MbWireFrame( const RPArray<MbCurve3D> &, const MbCreator * = nullptr );
|
||||
/// \ru Конструктор по множеству кривых и строителю. \en Constructor by a set of curves and creator.
|
||||
MbWireFrame( const c3d::SpaceCurvesSPtrVector &, const MbCreator * = nullptr );
|
||||
/// \ru Конструктор по ребру и строителю. \en Constructor by an edge and creator.
|
||||
@@ -79,7 +89,42 @@ public :
|
||||
/// \ru Конструктор по множеству рёбер и строителю. \en Constructor by a set of edges and creator.
|
||||
MbWireFrame( const c3d::WireEdgesSPtrVector &, const MbCreator * = nullptr, bool same = true );
|
||||
/// \ru Конструктор по множеству рёбер и строителю. \en Constructor by a set of edges and creator.
|
||||
MbWireFrame( const c3d::WireEdgesSPtrVector &, const MbWireFrame & oldFrame, const MbCreator * = nullptr );
|
||||
MbWireFrame( const c3d::WireEdgesSPtrVector &, const MbWireFrame & oldFrame, const MbCreator * = nullptr );
|
||||
/** \brief \ru Создать каркас.
|
||||
\en Create wireframe. \~
|
||||
\details \ru Создать каркас по множеству ребер и строителю.\n
|
||||
\en Create wireframe by a set of edges and creator.\n \~
|
||||
\param[in] items - \ru Массив ребер.
|
||||
\en Array of edges. \~
|
||||
\param[in] oldFrame - \ru Каркас для дерева построения.
|
||||
\en WireFrame for building tree. \~
|
||||
\param[in] creator - \ru Построитель.
|
||||
\en A creator. \~
|
||||
\param[in] same - \ru Флаг копирования ребер.
|
||||
\en Edges copy flag. \~
|
||||
\param[in] version - \ru Версия.
|
||||
\en A version. \~
|
||||
\return \ru Возвращает указатель на созданный объект или нулевой указатель в случае неудачи.
|
||||
\en Returns pointer to the created object or null pointer in case of failure. \~
|
||||
*/
|
||||
template <class EdgesVector>
|
||||
static MATH_FUNC( MbWireFrame * ) Create( const EdgesVector & items, const MbWireFrame * oldFrame, const MbCreator * creator, bool same, VERSION version );
|
||||
/** \brief \ru Создать каркас.
|
||||
\en Create wireframe. \~
|
||||
\details \ru Создать каркас по множеству кривых и строителю.\n
|
||||
\en Create wireframe by a set of curves and creator.\n \~
|
||||
\param[in] curves - \ru Массив кривых.
|
||||
\en Array of curves. \~
|
||||
\param[in] creator - \ru Построитель.
|
||||
\en A creator. \~
|
||||
\param[in] version - \ru Версия.
|
||||
\en A version. \~
|
||||
\return \ru Возвращает указатель на созданный объект или нулевой указатель в случае неудачи.
|
||||
\en Returns pointer to the created object or null pointer in case of failure. \~
|
||||
*/
|
||||
template <class CurvesVector>
|
||||
static MATH_FUNC ( MbWireFrame * ) Create( const CurvesVector & curves, const MbCreator * creator, VERSION version );
|
||||
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
virtual ~MbWireFrame();
|
||||
|
||||
@@ -263,19 +308,23 @@ public :
|
||||
/// \ru Разложен ли каркас на связные части? \en Is a frame split into connected parts?
|
||||
bool IsNormalizeWire() const { return normal; }
|
||||
/// \ru Переставить кривые и переориентировать ребра, создав связные цепочки с общими вершинами. \en Perform curves reposition and edges reorientation by creating connected chains with common vertices.
|
||||
bool NormalizeWire( double precision = METRIC_REGION );
|
||||
bool NormalizeWire( double precision = METRIC_REGION ); ///< \deprecated \ru Метод устарел. \en The method is deprecated.
|
||||
/// \ru Переставить кривые и переориентировать ребра, создав связные цепочки с общими вершинами (совпадающими геометрически с точностью precision ). \en Perform curves reposition and edges reorientation by creating connected chains with common vertices (coincident geometrically with accuracy precision).
|
||||
bool NormalizeWire( double precision, VERSION version = Math::DefaultMathVersion() );
|
||||
/** \brief \ru Отделение частей каркаса.
|
||||
\en Detachment of frame parts \~
|
||||
\details \ru Отделение частей каркаса с сохранением исходного объекта.
|
||||
Если исходный каркас распадается на части, то все части складываются в parts. \n
|
||||
\en Detachment of frame parts with saving an initial object.
|
||||
If the initial frame is decomposed, all the parts are put into array 'parts'. \n \~
|
||||
\param[in] version - \ru Версия.
|
||||
\en Version. \~
|
||||
\param[out] parts - \ru Каркасы, полученные из frame.
|
||||
\en Frames obtained from 'frame'. \~
|
||||
\result \ru Возвращает количество каркасов в parts.
|
||||
\en Returns a number of frames in 'parts'. \~
|
||||
*/
|
||||
size_t CreateParts( RPArray<MbWireFrame> & parts );
|
||||
size_t CreateParts( RPArray<MbWireFrame> & parts, VERSION version = Math::DefaultMathVersion() );
|
||||
|
||||
/** \brief \ru Создать связные контуры с учётом толерантностей в вершинах рёбер каркаса.
|
||||
\en Create connected contours according to vertex tolerances of the wire frame edges. \~
|
||||
@@ -401,7 +450,8 @@ private:
|
||||
MbEdge * InitEdge( const MbCurve3D &, bool sense );
|
||||
/// \ru Добавить простой построитель каркаса. \en Add simple wireframe creator.
|
||||
void AddSimpleCreator();
|
||||
|
||||
/// \ru Добавить построители каркаса. \en Add wireframe creators.
|
||||
void AddCreators ( const MbWireFrame & oldFrame, const MbCreator * creator );
|
||||
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbWireFrame )
|
||||
OBVIOUS_PRIVATE_COPY( MbWireFrame )
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user