18 #if !defined(OPENNURBS_EXTENSIONS_INC_) 19 #define OPENNURBS_EXTENSIONS_INC_ 42 unsigned int FailureCount()
const;
48 unsigned int ErrorCount()
const;
54 unsigned int WarningCount()
const;
60 unsigned int TotalCount()
const;
68 unsigned int IncrementFailureCount();
76 unsigned int IncrementErrorCount();
84 unsigned int IncrementWarningCount();
91 void ClearLibraryErrors();
101 unsigned int AddLibraryErrors();
108 void ClearLibraryWarnings();
118 unsigned int AddLibraryWarnings();
124 void ClearLibraryErrorsAndWarnings();
132 unsigned int AddLibraryErrorsAndWarnings();
137 unsigned int m_failure_count = 0;
138 unsigned int m_error_count = 0;
139 unsigned int m_warning_count = 0;
141 unsigned int m_state_bit_field = 0;
142 unsigned int m_opennurbs_library_error_count = 0;
143 unsigned int m_opennurbs_library_warning_count = 0;
154 #if defined(OPENNURBS_EXPORTS) || defined(OPENNURBS_IMPORTS) 158 void*
operator new(size_t);
159 void operator delete(
void*);
162 void*
operator new[] (size_t);
163 void operator delete[] (
void*);
166 void*
operator new(size_t,
void*);
167 void operator delete(
void*,
void*);
182 unsigned int m_usertable_3dm_version = 0;
186 unsigned int m_usertable_opennurbs_version = 0;
189 #if defined(ON_DLL_TEMPLATE) 202 #if defined(OPENNURBS_EXPORTS) || defined(OPENNURBS_IMPORTS) 208 void*
operator new(size_t);
209 void operator delete(
void*);
212 void*
operator new[] (size_t);
213 void operator delete[] (
void*);
216 void*
operator new(size_t,
void*);
217 void operator delete(
void*,
void*);
289 unsigned int table_filter,
290 unsigned int model_object_type_filter,
295 const char* filename,
296 unsigned int table_filter,
297 unsigned int model_object_type_filter,
302 const wchar_t* filename,
303 unsigned int table_filter,
304 unsigned int model_object_type_filter,
314 const char* filename,
319 const wchar_t* filename,
401 bool IncrementalReadBegin(
403 bool bManageComponents,
404 unsigned int table_filter,
455 bool IncrementalReadModelGeometry(
457 bool bManageModelGeometryComponent,
458 bool bManageGeometry,
459 bool bManageAttributes,
460 unsigned int model_object_type_filter,
496 bool IncrementalReadFinish(
498 bool bManageComponents,
499 unsigned int table_filter,
533 const char* filename,
568 const wchar_t* filename,
640 int m_3dm_file_version = 0;
641 unsigned int m_3dm_opennurbs_version = 0;
642 ON__UINT64 m_3dm_file_byte_count = 0;
702 ON__UINT64 ModelContentVersionNumber()
const;
725 bool bResolveIdAndNameConflicts
745 const wchar_t* layer_name,
761 const wchar_t* layer_name,
778 int AddDefaultDimensionStyle(
779 const wchar_t* dimension_style_name,
780 ON::LengthUnitSystem length_unit_system,
781 double model_tolerance
808 bool bResolveIdAndNameConflicts
846 bool bManagedComponent,
847 bool bResolveIdAndNameConflicts,
848 bool bUpdateComponentIdentification
878 bool bResolveIdAndNameConflicts
912 class ON_Object* managed_geometry_object,
914 bool bResolveIdAndNameConflicts
918 class ON_Object* managed_geometry_object,
960 bool bManageGeometry,
962 bool bManageAttributes,
964 bool bResolveIdAndNameConflicts
967 unsigned int ComponentIndexLimit(
976 unsigned int ActiveAndDeletedComponentCount(
985 unsigned int ActiveComponentCount(
993 unsigned int DeletedComponentCount(
999 int component_model_index
1004 unsigned int component_model_index
1015 const wchar_t* component_model_name
1034 int image_model_index
1042 const wchar_t* image_file_full_path_name
1064 int line_pattern_model_index
1072 const wchar_t* line_pattern_name
1110 int render_material_index
1128 int layer_model_index
1137 const wchar_t* layer_name
1159 int dimension_style_index
1165 const wchar_t* dimension_style_name
1176 ON_UUID CurrentDimensionStyleId()
const;
1185 bool SetCurrentDimensionStyleId(
1218 double model_space_text_scale,
1219 bool bIgnoreSystemDimStyles
1234 unsigned int managed_font_serial_number,
1235 double model_space_text_scale,
1236 bool bIgnoreSystemDimStyles
1244 const ON_Font& font_characteristics,
1245 double model_space_text_scale
1250 int model_object_index
1253 unsigned int model_object_index
1256 unsigned int model_object_index
1275 bool bManagedComponent,
1276 bool bUpdateComponentIdentification
1282 ON__UINT64 m_model_content_version_number = 0;
1285 void Internal_IncrementModelContentVersionNumber();
1297 class ONX_ModelComponentReferenceLink* Internal_ModelComponentLinkFromSerialNumber(
1298 ON__UINT64 model_component_runtime_serial_number
1300 class ONX_ModelComponentReferenceLink* Internal_AddModelComponentReference(
1303 void Internal_RemoveModelComponentReferenceLink(
1304 class ONX_ModelComponentReferenceLink* mcr_link
1309 #pragma ON_PRAGMA_WARNING_PUSH 1310 #pragma ON_PRAGMA_WARNING_DISABLE_MSC( 4251 ) 1314 class ONX_ModelComponentList
1318 unsigned int m_count = 0;
1319 class ONX_ModelComponentReferenceLink* m_first_mcr_link =
nullptr;
1320 class ONX_ModelComponentReferenceLink* m_last_mcr_link =
nullptr;
1324 ONX_MCR_LIST_COUNT = 16
1326 ONX_ModelComponentList m_mcr_lists[ONX_MCR_LIST_COUNT];
1329 #pragma ON_PRAGMA_WARNING_POP 1332 bool ValdateComponentIdAndName(
1335 const ON_UUID& component_parent_id,
1336 const wchar_t* candidate_name,
1337 bool bResolveIdConflict,
1338 bool bResolveNameConflict,
1362 void Internal_ComponentTypeBoundingBox(
1378 ON_Color WireframeColorFromAttributes(
1417 bool SetDocumentUserString(
1419 const wchar_t* string_value
1431 bool GetDocumentUserString(
1467 void DumpComponentList(
1476 void DumpComponentLists(
1491 void Internal_DumpSummary(
1493 bool bInvariantContentOnly
1511 static bool IsRDKObjectInformation(
const ON_UserData& objectud);
1512 static bool GetRDKObjectInformation(
const ON_Object&
object,
ON_wString& rdk_xml_object_data);
1557 unsigned int ActiveComponentCount()
const;
1560 const class ONX_Model::ONX_ModelComponentList* Internal_List()
const;
1561 void Internal_SetLink(
const class ONX_ModelComponentReferenceLink* link)
const;
1562 void Internal_SetLink(ON__UINT64 model_component_sn)
const;
1563 void Internal_IncrementLink()
const;
1564 void Internal_DecrementLink()
const;
1567 const class ONX_Model* m_model =
nullptr;
1568 mutable ON__UINT64 m_model_content_version = 0;
1569 mutable const class ONX_Model::ONX_ModelComponentList* m_list =
nullptr;
1570 mutable const class ONX_ModelComponentReferenceLink* m_link =
nullptr;
1571 mutable ON__UINT64 m_current_component_sn = 0;
1572 mutable ON__UINT64 m_next_component_sn = 0;
1573 mutable ON__UINT64 m_prev_component_sn = 0;
1587 bool ONX_IsValidName(
1603 #pragma region // XXRH_C_SHARED_ENUM // [ONX_ModelTest::Type] [Rhino.Geometry.Something.Type] [nested:byte] 1607 enum class Type :
unsigned char 1639 ReadWriteReadCompare = 4
1646 #pragma region // XXRH_C_SHARED_ENUM // [ONX_ModelTest::Result] [Rhino.Geometry.Something.Result] [nested:byte] 1650 enum class Result :
unsigned char 1728 const char* file_path,
1752 const wchar_t* file_path,
1828 bool DumpSourceModel()
const;
1836 bool DumpSourceModel(
const wchar_t* text_file_full_path)
const;
1844 bool DumpSourceModel(
ON_TextLog& text_log)
const;
1854 bool DumpReadWriteReadModel()
const;
1864 bool DumpReadWriteReadModel(
const wchar_t* text_file_full_path)
const;
1873 bool DumpReadWriteReadModel(
ON_TextLog& text_log)
const;
1876 void Internal_BeginTest();
1878 void Internal_EndCurrentTest();
1880 void Internal_BeginNextTest(
1885 void Internal_ReadTest(
1892 bool Internal_TallyTestResults();
1909 unsigned int Source3dmFileVersion()
const;
1927 static bool SkipCompare(
1928 unsigned int source_3dm_file_version
1956 std::shared_ptr<ONX_Model> SourceModel()
const;
1963 std::shared_ptr<ONX_Model> ReadWriteReadModel()
const;
1971 unsigned int m_model_3dm_file_version[3];
1973 unsigned int m_current_test_index = 0;
1981 #pragma ON_PRAGMA_WARNING_PUSH 1982 #pragma ON_PRAGMA_WARNING_DISABLE_MSC( 4251 ) 1990 std::shared_ptr<ONX_Model> m_model[3];
1991 #pragma ON_PRAGMA_WARNING_POP
static const ON_Linetype Continuous
index = -1, id, name and pattern are set.
Definition: opennurbs_linetype.h:51
ON_SerialNumberMap provides a way to map set of unique serial number - uuid pairs to application defi...
Definition: opennurbs_lookup.h:32
ON_UUID is a 16 byte universally unique identifier.
Definition: opennurbs_uuid.h:32
ON_String m_sStartSectionComments
Definition: opennurbs_extensions.h:644
The ON_ModelComponent class is a base class for all components in a model and manages the index...
Definition: opennurbs_model_component.h:24
Definition: opennurbs_3dm_properties.h:139
ON_3dmProperties m_properties
Definition: opennurbs_extensions.h:648
ON_ManifestIdentificationMap is used to record a map from a source manifest to a destination manifest...
Definition: opennurbs_archive.h:1464
Definition: opennurbs_array.h:36
static const ON_Layer Default
Definition: opennurbs_layer.h:32
Definition: opennurbs_3dm_settings.h:1184
ON_3dmSettings m_settings
Definition: opennurbs_extensions.h:652
Definition: opennurbs_sha1.h:19
static const ON_Material Default
Definition: opennurbs_material.h:33
Definition: opennurbs_string.h:2020
static const ON_BoundingBox UnsetBoundingBox
Definition: opennurbs_bounding_box.h:29
The ONX_ErrorCounter is useful for counting errors that occur in a section of code.
Definition: opennurbs_extensions.h:24
Definition: opennurbs_color.h:24
Definition: opennurbs_fsp.h:19
Definition: opennurbs_archive.h:5060
Definition: opennurbs_bounding_box.h:25
Definition: opennurbs_string.h:852
Definition: opennurbs_file_utilities.h:762
An ON_Font is a face in a font family. It corresponds to a Windows LOGFONT, a .NET System...
Definition: opennurbs_font.h:225
Type
The ON_ModelComponent::Type enum has a value for each explicit component type and two special values...
Definition: opennurbs_model_component.h:52
static const ON_TextStyle Default
Definition: opennurbs_text_style.h:25
Type
ONX_ModelTest::Type identifies the type of file reading test to perform.
Definition: opennurbs_extensions.h:1579
An ON_InstanceRef is a reference to an instance definition along with transformation to apply to the ...
Definition: opennurbs_instance.h:613
Definition: opennurbs_extensions.h:1563
Definition: opennurbs_archive.h:478
static const ON_ModelComponentReference Empty
Definition: opennurbs_model_component.h:1625
static const ON_DimStyle Default
Definition: opennurbs_dimensionstyle.h:227
An ON_DocumentUserStringList object is saved in the list of user tables. The Rhino SetDocumentText an...
Definition: opennurbs_userdata.h:568
Top level OpenNURBS objects have geometry and attributes. The geometry is stored in some class derive...
Definition: opennurbs_3dm_attributes.h:41
Used to store geometry table object definition and attributes in an ONX_Model.
Definition: opennurbs_model_geometry.h:22
Pure virtual base class for all classes that must provide runtime class id or support object level 3D...
Definition: opennurbs_object.h:460
Pedegodgical example of all the things in an OpenNURBS 3dm archive. The openNURBS examples use ONX_Mo...
Definition: opennurbs_extensions.h:190
An ON_NameHash is designed to help search for and compare attribute names like the ON_ModelComponent...
Definition: opennurbs_string.h:3434
static ON_ModelComponentReference CreateConstantSystemComponentReference(const class ON_ModelComponent &constant_system_component) ON_NOEXCEPT
Used to store user data information in an ONX_Model.
Definition: opennurbs_extensions.h:142
Definition: opennurbs_textlog.h:20
Definition: opennurbs_archive.h:1783
Definition: opennurbs_userdata.h:20
Definition: opennurbs_extensions.h:1497
Definition: opennurbs_model_component.h:1622
Result
ONX_ModelTest::Result reports the result of a test.
Definition: opennurbs_extensions.h:1622
Definition: opennurbs_file_utilities.h:1125