diff --git a/CMakeLists.txt b/CMakeLists.txt index dc2d4c42..26fdee7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -367,6 +367,7 @@ set( OPENNURBS_PUBLIC_SOURCES opennurbs_version.cpp opennurbs_version_number.cpp opennurbs_viewport.cpp + opennurbs_win_dwrite.cpp opennurbs_workspace.cpp opennurbs_wstring.cpp opennurbs_xform.cpp @@ -375,7 +376,7 @@ set( OPENNURBS_PUBLIC_SOURCES opennurbs_zlib_memory.cpp ) -if(EXISTS opennurbs_plus.h) +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_plus.h) set( OPENNURBS_PLUS_HEADERS opennurbsRhino.pch opennurbs_plus.h @@ -456,11 +457,11 @@ set( OPENNURBS_PLUS_SOURCES endif() #OpenNURBS plus source files if (ANDROID OR LINUX) -add_subdirectory(android_uuid) + add_subdirectory(android_uuid) + add_subdirectory(freetype263) endif() add_subdirectory(zlib) -add_subdirectory(freetype263) ## opennurbs static library add_library( opennurbsStatic STATIC @@ -478,6 +479,15 @@ add_library( OpenNURBS SHARED ${OPENNURBS_PLUS_SOURCES} ) +if (MSVC) + # opennurbs_brep.cpp requires this flag when compiling with Visual C++ + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") + #add_compile_options(\bigobj) + add_definitions(-DUNICODE) + add_definitions(-D_UNICODE) +endif() + +add_definitions(-DON_CMAKE_BUILD) if( APPLE) find_library( CORE_GRAPHICS_LIBRARY CoreGraphics) @@ -557,11 +567,16 @@ install( FILES ${OPENNURBS_PUBLIC_HEADERS} DESTINATION "include/opennurbsStatic" if (ANDROID OR LINUX) -target_link_libraries( OpenNURBS ${OPENNURBS_APPLE_DEPENDENCIES} zlib opennurbs_public_freetype android_uuid) -target_link_libraries( opennurbsStatic ${OPENNURBS_APPLE_DEPENDENCIES} zlib opennurbs_public_freetype android_uuid) -else() -target_link_libraries( OpenNURBS ${OPENNURBS_APPLE_DEPENDENCIES} zlib opennurbs_public_freetype) -target_link_libraries( opennurbsStatic ${OPENNURBS_APPLE_DEPENDENCIES} zlib opennurbs_public_freetype) +target_link_libraries( OpenNURBS zlib opennurbs_public_freetype android_uuid) +target_link_libraries( opennurbsStatic zlib opennurbs_public_freetype android_uuid) +endif() +if (APPLE) +target_link_libraries( OpenNURBS ${OPENNURBS_APPLE_DEPENDENCIES} zlib) +target_link_libraries( opennurbsStatic ${OPENNURBS_APPLE_DEPENDENCIES} zlib) +endif() +if (WIN32) +target_link_libraries( OpenNURBS Shlwapi Usp10 zlib) +target_link_libraries( opennurbsStatic Shlwapi Usp10 zlib) endif() if (APPLE) diff --git a/opennurbs.h b/opennurbs.h index 60ac1b93..0b41b712 100644 --- a/opennurbs.h +++ b/opennurbs.h @@ -31,7 +31,7 @@ #include "opennurbs_defines.h" /* openNURBS defines and enums */ #include "opennurbs_error.h" /* error handling */ -#include "opennurbs_memory.h" /* memory managment (onmalloc(), onrealloc(), onfree(), ...) */ +#include "opennurbs_memory.h" /* memory management (onmalloc(), onrealloc(), onfree(), ...) */ #include "opennurbs_rand.h" /* random number generator */ #include "opennurbs_crc.h" /* cyclic redundancy check tool */ #include "opennurbs_uuid.h" /* universally unique identifiers (UUID, a.k.a, GUID) */ @@ -99,7 +99,7 @@ #include "opennurbs_rendering.h" #include "opennurbs_object.h" // virtual base class for all openNURBS objects #include "opennurbs_model_component.h" -#include "opennurbs_archive.h" // binary arcive objects for serialization to file, memory blocks, etc. +#include "opennurbs_archive.h" // binary archive objects for serialization to file, memory blocks, etc. #include "opennurbs_model_geometry.h" #include "opennurbs_arc.h" // simple 3d circular arc #include "opennurbs_userdata.h" // class for attaching persistent user information to openNURBS objects diff --git a/opennurbs_3dm.h b/opennurbs_3dm.h index 08b84db8..d05cdc37 100644 --- a/opennurbs_3dm.h +++ b/opennurbs_3dm.h @@ -216,7 +216,7 @@ #define TCODE_LIGHT_RECORD_END (TCODE_INTERFACE | TCODE_SHORT | 0x006F) /* records in user table - Each user table entery has two top level chunks, a TCODE_USER_TABLE_UUID chunk + Each user table entry has two top level chunks, a TCODE_USER_TABLE_UUID chunk and a TCODE_USER_RECORD chunk. */ diff --git a/opennurbs_3dm_attributes.h b/opennurbs_3dm_attributes.h index abefbf50..27bb5208 100644 --- a/opennurbs_3dm_attributes.h +++ b/opennurbs_3dm_attributes.h @@ -211,13 +211,13 @@ public: // Layer definitions in an OpenNURBS model are stored in a layer table. // The layer table is conceptually an array of ON_Layer classes. Every // OpenNURBS object in a model is on some layer. The object's layer - // is specified by zero based indicies into the ON_Layer array. + // is specified by zero based indices into the ON_Layer array. int m_layer_index = 0; // Linetype definitions in an OpenNURBS model are stored in a linetype table. // The linetype table is conceptually an array of ON_Linetype classes. Every // OpenNURBS object in a model references some linetype. The object's linetype - // is specified by zero based indicies into the ON_Linetype array. + // is specified by zero based indices into the ON_Linetype array. // index 0 is reserved for continuous linetype (no pattern) int m_linetype_index = -1; @@ -327,7 +327,7 @@ public: // Display order used to force objects to be drawn on top or behind each other // 0 = draw object in standard depth buffered order // <0 = draw object behind "normal" draw order objects - // >0 = draw object on top of "noraml" draw order objects + // >0 = draw object on top of "normal" draw order objects // Larger number draws on top of smaller number. int m_display_order = 0; @@ -581,7 +581,7 @@ public: For a given display material id, there can be multiple viewports. If there is a display reference in the list with a nil viewport id, then the display material - will be used in all viewports that are not explictly + will be used in all viewports that are not explicitly referenced in other ON_DisplayMaterialRefs. Parameters: diff --git a/opennurbs_3dm_settings.h b/opennurbs_3dm_settings.h index cd138a0f..71463471 100644 --- a/opennurbs_3dm_settings.h +++ b/opennurbs_3dm_settings.h @@ -255,7 +255,7 @@ private: // world views. // * ON_DimStyle::DimScale() is ignored in page and // detail views. - // * ON_DetailView::m_page_per_model_ratio is ingored + // * ON_DetailView::m_page_per_model_ratio is ignored // for annotation objects in detail views, other // geometry is scaled. // @@ -1192,24 +1192,24 @@ public: Find the Keyhole Markup Language (KML) orientation angles (in radians) of a rotation transformation that maps model (east,north,up) to ((1,0,0),(0,1,0),(0,0,1)). KML Earth Z axis = up, KML Earth X axis = east, KML Earth Y axis = north. - NOTE WELL: In KML, postive rotations are CLOCKWISE looking down - specied axis vector towards the origin. This is rotation direction + NOTE WELL: In KML, positive rotations are CLOCKWISE looking down + specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." Parameters: heading_radians - [out] angle (in radians) of rotation around KML Earth Z axis (Earth up). - NOTE WELL: In KML, postive rotations are CLOCKWISE looking down - specied axis vector towards the origin. This is rotation direction + NOTE WELL: In KML, positive rotations are CLOCKWISE looking down + specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." tilt_radians - [out] angle (in radians) of rotation around KML Earth X axis (Earth east). - NOTE WELL: In KML, postive rotations are CLOCKWISE looking down - specied axis vector towards the origin. This is rotation direction + NOTE WELL: In KML, positive rotations are CLOCKWISE looking down + specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." roll_radians - [out] angle (in radians) of rotation around KML Earth Y axis (Earth north). - NOTE WELL: In KML, postive rotations are CLOCKWISE looking down - specied axis vector towards the origin. This is rotation direction + NOTE WELL: In KML, positive rotations are CLOCKWISE looking down + specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." Returns: True if the model location is set (this->ModelLocationIsSet() is true) @@ -1258,24 +1258,24 @@ public: Find the Keyhole Markup Language (KML) orientation angles (in degrees) of a rotation transformation that maps model (east,north,up) to ((1,0,0),(0,1,0),(0,0,1)). KML Earth Z axis = up, KML Earth X axis = east, KML Earth Y axis = north. - NOTE WELL: In KML, postive rotations are CLOCKWISE looking down - specied axis vector towards the origin. This is rotation direction + NOTE WELL: In KML, positive rotations are CLOCKWISE looking down + specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." Parameters: heading_degrees - [out] angle (in degrees) of rotation around KML Earth Z axis (Earth up). - NOTE WELL: In KML, postive rotations are CLOCKWISE looking down - specied axis vector towards the origin. This is rotation direction + NOTE WELL: In KML, positive rotations are CLOCKWISE looking down + specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." tilt_degrees - [out] angle (in degrees) of rotation around KML Earth X axis (Earth east). - NOTE WELL: In KML, postive rotations are CLOCKWISE looking down - specied axis vector towards the origin. This is rotation direction + NOTE WELL: In KML, positive rotations are CLOCKWISE looking down + specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." roll_degrees - [out] angle (in degrees) of rotation around KML Earth Y axis (Earth north). - NOTE WELL: In KML, postive rotations are CLOCKWISE looking down - specied axis vector towards the origin. This is rotation direction + NOTE WELL: In KML, positive rotations are CLOCKWISE looking down + specified axis vector towards the origin. This is rotation direction is opposite the conventional "right hand rule." Returns: True if the model location is set (this->ModelLocationIsSet() is true) @@ -1425,7 +1425,7 @@ public: // As of 7 February 2012, the m_idef_link_update setting // controls if, when and how linked and linked_and_embedded - // instance defintions are updated when the source archive + // instance definitions are updated when the source archive // that was used to create the idef has changed. int m_idef_link_update = 1; // 1 = prompt - ask the user if the idef should be updated. @@ -1596,7 +1596,7 @@ public: // @untitled table // 0 boundary + "knot" wires // 1 boundary + "knot" wires + 1 interior wire if no interior "knots" - // N>=2 boundry + "knot" wires + (N-1) interior wires + // N>=2 boundary + "knot" wires + (N-1) interior wires int m_current_wire_density = 1; ON_3dmRenderSettings m_RenderSettings = ON_3dmRenderSettings::Default; diff --git a/opennurbs_annotationbase.h b/opennurbs_annotationbase.h index ddc94bbb..889cb347 100644 --- a/opennurbs_annotationbase.h +++ b/opennurbs_annotationbase.h @@ -405,7 +405,7 @@ public: /* Returns: True if this text position information used to create this text - is identical to the text position paramters on dimstyle. + is identical to the text position parameters on dimstyle. */ bool EqualTextPositionProperties( const class ON_DimStyle* dimstyle @@ -927,7 +927,7 @@ public: /* - A simple dot with text that doesn't rotate witn the world axes + A simple dot with text that doesn't rotate with the world axes */ class ON_CLASS ON_TextDot : public ON_Geometry { diff --git a/opennurbs_arc.h b/opennurbs_arc.h index d94e6af7..00a44bff 100644 --- a/opennurbs_arc.h +++ b/opennurbs_arc.h @@ -106,7 +106,7 @@ public: Parameters: plane - [in] The plane x, y and z axis are used to defines the circle - plane's x, y and z axis. The plane origin is ignorned. + plane's x, y and z axis. The plane origin is ignored. center - [in] circle's center point radius - [in] @@ -218,7 +218,7 @@ public: Parameters: plane - [in] The plane x, y and z axis are used to defines the circle - plane's x, y and z axis. The plane origin is ignorned. + plane's x, y and z axis. The plane origin is ignored. center - [in] circle's center point radius - [in] diff --git a/opennurbs_arccurve.h b/opennurbs_arccurve.h index fd3383aa..3481f03d 100644 --- a/opennurbs_arccurve.h +++ b/opennurbs_arccurve.h @@ -371,7 +371,7 @@ public: ///////////////////////////////////////////////////////////////// - ON_Arc m_arc = ON_Arc::UnitCircle; // defualt = radius 1 circle in x-y plane + ON_Arc m_arc = ON_Arc::UnitCircle; // default = radius 1 circle in x-y plane ON_Interval m_t = ON_Interval::ZeroToTwoPi; diff --git a/opennurbs_archivable_dictionary.cpp b/opennurbs_archivable_dictionary.cpp index 4b481d63..8e8ed8d6 100644 --- a/opennurbs_archivable_dictionary.cpp +++ b/opennurbs_archivable_dictionary.cpp @@ -1359,9 +1359,8 @@ DictionaryEntry* DictionaryEntry::CreateInstance(enum DictionaryEntryType item_t case DictionaryEntryType::MeshParameters: return new Entry; case DictionaryEntryType::Geometry: return new Entry; case DictionaryEntryType::ArchivableDictionary: return new Entry; + default: return nullptr; } - - return nullptr; } //////////////////////////////////////////////////////////////////////////////// diff --git a/opennurbs_archive.cpp b/opennurbs_archive.cpp index a1b5c746..093161a4 100644 --- a/opennurbs_archive.cpp +++ b/opennurbs_archive.cpp @@ -455,6 +455,8 @@ void ON_BinaryArchive::SetArchiveFullPath( case ON::archive_mode::write: m_archive_saved_as_full_path = m_archive_full_path; break; + default: + break; } } @@ -536,6 +538,8 @@ void ON_BinaryArchive::SetArchiveFullPath( case ON::archive_mode::write: m_archive_saved_as_full_path = m_archive_full_path; break; + default: + break; } } @@ -4623,6 +4627,8 @@ ON_BinaryArchive::WriteObject( const ON_Object& model_object ) return Internal_WriteObject(V2_text_dot); } break; + default: + break; } } diff --git a/opennurbs_archive.h b/opennurbs_archive.h index a2c82ddd..5a8a8cca 100644 --- a/opennurbs_archive.h +++ b/opennurbs_archive.h @@ -34,7 +34,7 @@ public: /* Description: Compare contents of buffers. - Paramters: + Parameters: a - [in] b - [in] Returns: @@ -214,7 +214,7 @@ public: Remarks: Call this function after creating an ON_Buffer that will persist for and extended amount of time. There are never more than 16 pages of - unsued memory (16*4096 bytes on most computers) in an ON_Buffer. + unused memory (16*4096 bytes on most computers) in an ON_Buffer. Compact() can be called at any time, but calling Compact() the then writing at the end of the buffer is not an efficient use of time or memory. @@ -364,7 +364,7 @@ public: public: ON__UINT64 m_start_offset=0; // When reading or writing 3dm archives, this is the // archive offset (file position) of first byte of - // chunk information conent. + // chunk information content. ON__UINT64 m_end_offset=0; // When writing 3dm archives, this is the archive // offset (file position) of the byte immediately after @@ -519,7 +519,7 @@ public: Parameters: component_type - [in] If component_type is ON_ModelComponent::Type::Unset or ON_ModelComponent::Type::Mixed, - then the every explict component type is counted. + then the every explicit component type is counted. Returns: Total number of model components of the specified type in this manifest. Remarks: @@ -533,7 +533,7 @@ public: Parameters: component_type - [in] If component_type is ON_ModelComponent::Type::Unset or ON_ModelComponent::Type::Mixed, - then the every explict component type is counted. + then the every explicit component type is counted. Returns: Number of model components of the specified type in this manifest. Remarks: @@ -548,7 +548,7 @@ public: Parameters: component_type - [in] If component_type is ON_ModelComponent::Type::Unset or ON_ModelComponent::Type::Mixed, - then the every explict component type is counted. + then the every explicit component type is counted. Returns: Number of active model components of the specified type in this manifest. Remarks: @@ -563,7 +563,7 @@ public: Parameters: component_type - [in] If component_type is ON_ModelComponent::Type::Unset or ON_ModelComponent::Type::Mixed, - then the every explict component type is counted. + then the every explicit component type is counted. Returns: Number of model components of the specified type in this manifest that have IsDeleted() = true. Remarks: @@ -850,7 +850,7 @@ public: then ON_ModelComponent::ComponentTypeToString(component_type) is used as base_name suffix_separator - [in] empty or the string to place between base_name and the suffix when searching for an - unsued name. + unused name. suffix0 - [in] If a suffix needs to be appended, the search for a unused name begins with the suffix values suffix0+1. @@ -1555,7 +1555,7 @@ public: /* Parameters: map_item - [in] - The source settings must exacty match source settings of an existing map. + The source settings must exactly match source settings of an existing map. The destination settings are the new values to assign. Return: True if a mapping was successfully updated (even when the destation settings did not change). @@ -1567,7 +1567,7 @@ public: /* Parameters: map_item - [in] - The source settings must exacty match source settings of an existing map. + The source settings must exactly match source settings of an existing map. The destination settings are the new values to assign. bIgnoreSourceIndex - [in] If true, the value of map_item.SourceIndex() is ignored. @@ -1865,18 +1865,18 @@ public: // Number of crc errors found during archive reading. // If > 0, then the archive is corrupt. See the table // status information below to determine where the - // errors occured. + // errors occurred. unsigned int m_crc_error_count = 0; // Number of other types of serious errors found during archive reading // or writing. // If > 0, then the archive is corrupt. See the table status information - // below to determine where the errors occured. + // below to determine where the errors occurred. unsigned int m_critical_error_count = 0; // Number of other types of serious errors found during archive reading. // If > 0, then the archive is corrupt. See the table status information - // below to determine where the errors occured. + // below to determine where the errors occurred. unsigned int m_recoverable_error_count = 0; enum class TableState : unsigned int @@ -2013,7 +2013,7 @@ public: /* Description: Expert user function that uses Read() to load a buffer. - Paramters: + Parameters: sizeof_buffer - [in] number of bytes to attempt to read. buffer - [out] read bytes are stored in this buffer Returns: @@ -2345,7 +2345,7 @@ public: /* Parameters: str_array_count - [in] - Number of unsignd char elements in str_array[], including + Number of unsigned char elements in str_array[], including the null terminator. The value of str_array_count is returned by ReadCharStringElementCount(). str_array - [in/out] @@ -3026,7 +3026,7 @@ public: /* Description: Specify the serialization option for object user data and user tables - that are not explicity set by SetShouldSerializeUserDataItem(). + that are not explicitly set by SetShouldSerializeUserDataItem(). Parameters: bSerialize - [in] Remarks: @@ -3135,9 +3135,9 @@ public: In rare cases, experts testing handling of corrupt 3dm files need to write a 3dm archive that is corrupt. In this rare testing situation, those experts should call IntentionallyWriteCorrupt3dmStartSectionForExpertTesting() - exactly one time before they begin writing the file. The 32 byte idendifier will + exactly one time before they begin writing the file. The 32 byte identifier will replace the 1st 3 spaces with a capital X to mimic a file that became corrupt - whle residing on storage media. + while residing on storage media. */ void IntentionallyWriteCorrupt3dmStartSectionForExpertTesting(); @@ -3598,20 +3598,20 @@ public: /* Description: - Reads instance definitions from instance defintion table. + Reads instance definitions from instance definition table. Parameters: - ppInstanceDefinition - If an instance defintion is - read, an instance defintion is created by calling new + ppInstanceDefinition - If an instance definition is + read, an instance definition is created by calling new ON_InstanceDefinition(), initialized with values stored - in the archive, and a pointer to the new instance defintion + in the archive, and a pointer to the new instance definition is returned in *ppInstanceDefinition. Returns: @untitled table - 0 at the end of the instance defintion table - 1 instance defintion was successfully read + 0 at the end of the instance definition table + 1 instance definition was successfully read -1 archive is corrupt at this point Example: @@ -3797,7 +3797,7 @@ public: user table. Returns: True if the the user information can be written. - False if user informtion should not be written. + False if user information should not be written. */ bool BeginWrite3dmUserTable( ON_UUID plugin_id, @@ -3902,7 +3902,7 @@ public: // If it finds one, it reads it and returns the number // of bytes in the archive. Comparing this number with // the current file position can help detect files that - // have been damaged by loosing sections. + // have been damaged by losing sections. // // Parameters: // sizeof_archive - [out] number of bytes written to archive @@ -3928,7 +3928,7 @@ public: // Parameters: // typecode - [in] a TCODE_* number from opennurbs_3dm.h // value - [in] if (typecode&TCODE_SHORT) is nonzero, then - // this is the value to be saved. Othewise, pass + // this is the value to be saved. Otherwise, pass // a zero and the EndWrite3dmChunk() call will // store the length of the chunk. // @@ -4056,7 +4056,7 @@ public: BeginWriteDictionaryEntry(); write entry definition... EndWriteDictionaryEntry(); - or you may finish writing the dictionay by calling + or you may finish writing the dictionary by calling EndWriteDictionary(); */ bool BeginWriteDictionary( @@ -4250,7 +4250,7 @@ public: and ON::CurrentRuntimeEnvironment() to determine if adjustments need to be made to resources provided - by runtime enviroments, like fonts. + by runtime environments, like fonts. */ ON::RuntimeEnvironment ArchiveRuntimeEnvironment() const; @@ -4337,7 +4337,7 @@ public: If an error is found, a line that begins with the word "ERROR" is printed. Parameters: - text_log - [in] place to print informtion + text_log - [in] place to print information recursion_depth - [in] simply a counter to aid in debugging. Returns: @@ -4411,7 +4411,7 @@ public: Description: Force Write() to flush any buffered data to physical archive. Returns: - True if succesful or if there is nothing to flush. False if + True if successful or if there is nothing to flush. False if information could not be flushed. */ virtual bool Flush() = 0; @@ -4540,7 +4540,7 @@ private: protected: unsigned int ErrorMessageMask() const; /* - Paramters: + Parameters: sizeof_request - [in] value of count parameter passed to virtual Read() function. sizeof_read - [in] @@ -4867,7 +4867,7 @@ private: private: // 3dm write options - // bits corresponed to ON::object_type flags. + // bits corresponded to ON::object_type flags. // If the bit is set, then the mesh will be saved in the 3dm file. // (RhinoCommon: if default is changed, sync with File3dmWriteOptions.RenderMeshesFlags) ON__UINT32 m_save_3dm_render_mesh_flags = 0xFFFFFFFFU; @@ -4947,7 +4947,7 @@ public: component_filter - [out] A bitfield that reports which attributes were read. If the corresponding component on model_component is locked, - the read value is discared. + the read value is discarded. Returns: false: critical failure. true: reading can continue. @@ -5034,10 +5034,10 @@ public: Returns: True: (default state) Read3dmReferencedComponentIndex() and Write3dmReferencedComponentIndex() will automatically - adjust compoents index references so they are valid. + adjust components index references so they are valid. False: (uncommon) Read3dmReferencedComponentIndex() and Write3dmReferencedComponentIndex() will not - adjust compoents index references so they are valid. + adjust components index references so they are valid. */ bool ReferencedComponentIndexMapping() const; @@ -5048,10 +5048,10 @@ public: bEnableReferenceComponentIndexMapping - [in] True: (default state) Read3dmReferencedComponentIndex() and Write3dmReferencedComponentIndex() will automatically - adjust compoents index references so they are valid. + adjust components index references so they are valid. False: (uncommon) Read3dmReferencedComponentIndex() and Write3dmReferencedComponentIndex() will not - adjust compoents index references so they are valid. This is only used with the + adjust components index references so they are valid. This is only used with the component being read or written is not the model but is a copy of one in a different model (linked instance definitions being the common situation). */ @@ -5090,7 +5090,7 @@ public: For components that are identified by name, like layers and dimension styles, this is not a problem. For components like instance definitions that have a more complicated set of merging rules, it is critical that - references to instance definition ids be updated from values in the arcive + references to instance definition ids be updated from values in the archive to values in the model. uses to adjust and write a model component Id. Parameters: @@ -5110,10 +5110,10 @@ public: Returns: True: (default state) Read3dmReferencedComponentId() and Write3dmReferencedComponentId() will automatically - adjust compoents Id references so they are valid. + adjust components Id references so they are valid. False: (uncommon) Read3dmReferencedComponentId() and Write3dmReferencedComponentId() will not - adjust compoents Id references so they are valid. + adjust components Id references so they are valid. */ bool ReferencedComponentIdMapping() const; @@ -5124,10 +5124,10 @@ public: bEnableReferenceComponentIdMapping - [in] True: (default state) Read3dmReferencedComponentId() and Write3dmReferencedComponentId() will automatically - adjust compoents Id references so they are valid. + adjust components Id references so they are valid. False: (uncommon) Read3dmReferencedComponentId() and Write3dmReferencedComponentId() will not - adjust compoents Id references so they are valid. This is only used with the + adjust components Id references so they are valid. This is only used with the component being read or written is not the model but is a copy of one in a different model (linked instance definitions being the common situation). */ @@ -5512,7 +5512,7 @@ public: mode - [in] buffer - [in] Remarks: - If a non-null buffer is specifed, then do not call SetBuffer() + If a non-null buffer is specified, then do not call SetBuffer() */ ON_BinaryArchiveBuffer( ON::archive_mode, ON_Buffer* buffer ); diff --git a/opennurbs_array.h b/opennurbs_array.h index a57b8e46..50942732 100644 --- a/opennurbs_array.h +++ b/opennurbs_array.h @@ -83,7 +83,7 @@ public: ON__UINT32 DataCRC(ON__UINT32 current_remainder) const; // The operator[] does to not check for valid indices. - // The caller is responsibile for insuring that 0 <= i < Capacity() + // The caller is responsible for insuring that 0 <= i < Capacity() T& operator[]( int ); T& operator[]( unsigned int ); T& operator[]( ON__INT64 ); @@ -171,7 +171,7 @@ public: // successful, then Search() returns -1. For Search(T) to work // correctly, T must be a simple type. Use Search(p,compare()) // for Ts that are structs/classes that contain pointers. Search() - // is only suitable for performing infrequent searchs of small + // is only suitable for performing infrequent searches of small // arrays. Sort the array and use BinarySearch() for performing // efficient searches. int Search( const T& ) const; @@ -188,12 +188,12 @@ public: ////////// // BinarySearch( p, compare ) does a fast search of a sorted array - // and returns the smallest index "i" of the element that satisifies + // and returns the smallest index "i" of the element that satisfies // 0==compare(p,&array[i]). // // BinarySearch( p, compare, count ) does a fast search of the first // count element sorted array and returns the smallest index "i" of - // the element that satisifies 0==compare(p,&array[i]). The version + // the element that satisfies 0==compare(p,&array[i]). The version // that takes a "count" is useful when elements are being appended // during a calculation and the appended elements are not sorted. // @@ -298,7 +298,7 @@ public: // Count and capacity are not changed. void SetRange(int from, int count, T); - // memory managment //////////////////////////////////////////////////// + // memory management //////////////////////////////////////////////////// T* Reserve( size_t ); // increase capacity to at least the requested value @@ -306,7 +306,7 @@ public: void Destroy(); // onfree any memory and set count and capacity to zero - // low level memory managment ////////////////////////////////////////// + // low level memory management ////////////////////////////////////////// // By default, ON_SimpleArray<> uses onrealloc() to manage // the dynamic array memory. If you want to use something @@ -348,7 +348,7 @@ public: /* Description: Expert user tool to take charge of the memory used by - the dyanmic array. + the dynamic array. Returns: A pointer to the array and zeros out this class. The returned pointer is on the heap and must be @@ -365,7 +365,7 @@ public: /* Description: - Expert user tool to set the memory used by the dyanmic array. + Expert user tool to set the memory used by the dynamic array. Parameters: T* pointer - [in] int count [in] @@ -377,7 +377,7 @@ public: void SetArray(T*, int, int); protected: - // implimentation ////////////////////////////////////////////////////// + // implementation ////////////////////////////////////////////////////// void Move( int /* dest index*/, int /* src index */, int /* element count*/ ); T* m_a; // pointer to array memory int m_count; // 0 <= m_count <= m_capacity @@ -428,7 +428,7 @@ ON_DLL_TEMPLATE template class ON_CLASS ON_SimpleArray; // besides onrealloc() to manage the array memory, then override // ON_ClassArray::Realloc(). In practice this means that if your // class has members with back-pointers, then you cannot use -// it in the defaule ON_ClassArray. See ON_ObjectArray +// it in the default ON_ClassArray. See ON_ObjectArray // for an example. // template class ON_ClassArray @@ -474,7 +474,7 @@ public: unsigned int SizeOfElement() const; // amount of memory in an m_a[] array element // The operator[] does to not check for valid indices. - // The caller is responsibile for insuring that 0 <= i < Capacity() + // The caller is responsible for insuring that 0 <= i < Capacity() T& operator[]( int ); T& operator[]( unsigned int ); T& operator[]( ON__INT64 ); @@ -551,12 +551,12 @@ public: ////////// // BinarySearch( p, compare ) does a fast search of a sorted array - // and returns the smallest index "i" of the element that satisifies + // and returns the smallest index "i" of the element that satisfies // 0==compare(p,&array[i]). // // BinarySearch( p, compare, count ) does a fast search of the first // count element sorted array and returns the smallest index "i" of - // the element that satisifies 0==compare(p,&array[i]). The version + // the element that satisfies 0==compare(p,&array[i]). The version // that takes a "count" is useful when elements are being appended // during a calculation and the appended elements are not sorted. // @@ -646,11 +646,11 @@ public: ////////// // Destroys all elements and fills them with values - // set by the defualt constructor. + // set by the default constructor. // Count and capacity are not changed. void Zero(); - // memory managment ///////////////////////////////////////////////// + // memory management ///////////////////////////////////////////////// T* Reserve( size_t ); // increase capacity to at least the requested value @@ -658,7 +658,7 @@ public: void Destroy(); // onfree any memory and set count and capacity to zero - // low level memory managment /////////////////////////////////////// + // low level memory management /////////////////////////////////////// // By default, ON_ClassArray<> uses onrealloc() to manage // the dynamic array memory. If you want to use something @@ -716,7 +716,7 @@ public: /* Description: - Expert user tool to set the memory used by the dyanmic array. + Expert user tool to set the memory used by the dynamic array. Parameters: T* pointer - [in] int count - [in] 0 <= count <= capacity @@ -730,7 +730,7 @@ public: void SetArray(T*, int, int); protected: - // implimentation ////////////////////////////////////////////////////// + // implementation ////////////////////////////////////////////////////// void Move( int /* dest index*/, int /* src index */, int /* element count*/ ); void ConstructDefaultElement(T*); void DestroyElement(T&); @@ -890,9 +890,9 @@ public: /* Description: - Makes the uuid list as efficent as possible in both search + Makes the uuid list as efficient as possible in both search speed and memory usage. Use Compact() when a uuid list - will be in use but is not likely to be modifed. A list + will be in use but is not likely to be modified. A list that has been compacted can still be modified. */ void Compact(); @@ -1539,7 +1539,7 @@ Description: Returns: -1 if *a < *b is true 1 if *b < *a is true - 0 if niether *a <*b nor *b<*a is true + 0 if neither *a <*b nor *b<*a is true Details: Use this template functions to sort ON_SimpleArray and ON_ClassArray objects into increasing order. The elements @@ -1566,7 +1566,7 @@ Description: Returns: -1 if *b < *a is true 1 if *a < *b is true - 0 if niether *a < *b nor *b < *a is true + 0 if neither *a < *b nor *b < *a is true Details: Use this template functions to sort ON_SimpleArray and ON_ClassArray objects into decreasing order. The elements diff --git a/opennurbs_array_defs.h b/opennurbs_array_defs.h index 06cd0c4e..05696813 100644 --- a/opennurbs_array_defs.h +++ b/opennurbs_array_defs.h @@ -460,7 +460,7 @@ void ON_SimpleArray::Move( int dest_i, int src_i, int ele_cnt ) SetCapacity( capacity ); } - memmove( &m_a[dest_i], &m_a[src_i], ele_cnt*sizeof(T) ); + memmove( (void*)&m_a[dest_i], (void*)&m_a[src_i], ele_cnt*sizeof(T) ); } template @@ -487,7 +487,7 @@ void ON_SimpleArray::Append( const T& x ) // 26 Sep 2005 Dale Lear // x is in the block of memory about to be reallocated. void* temp = onmalloc(sizeof(T)); - memcpy(temp, p, sizeof(T)); + memcpy(temp, (void*)p, sizeof(T)); p = (T*)temp; } Reserve(newcapacity); @@ -998,7 +998,7 @@ void ON_SimpleArray::SetRange(int from, int count, T value) } } -// memory managment //////////////////////////////////////////////////// +// memory management //////////////////////////////////////////////////// template T* ON_SimpleArray::Reserve( size_t newcap ) @@ -1020,7 +1020,7 @@ void ON_SimpleArray::Destroy() SetCapacity( 0 ); } -// low level memory managment ////////////////////////////////////////// +// low level memory management ////////////////////////////////////////// template void ON_SimpleArray::SetCount( int count ) @@ -2089,7 +2089,7 @@ void ON_ClassArray::Zero() } } -// memory managment //////////////////////////////////////////////////// +// memory management //////////////////////////////////////////////////// template T* ON_ClassArray::Reserve( size_t newcap ) @@ -2111,7 +2111,7 @@ void ON_ClassArray::Destroy() SetCapacity( 0 ); } -// low level memory managment ////////////////////////////////////////// +// low level memory management ////////////////////////////////////////// template void ON_ClassArray::SetCount( int count ) diff --git a/opennurbs_base64.h b/opennurbs_base64.h index 219ed940..7c35ccf6 100644 --- a/opennurbs_base64.h +++ b/opennurbs_base64.h @@ -43,7 +43,7 @@ public: base64 encoding calculation. callback_context - [in] This value is passed as the first argument when calling - callback_function or the virutal Out() function. + callback_function or the virtual Out() function. Returns: True if successful. Remarks: @@ -80,7 +80,7 @@ public: calculation. When you reach the end of the unencoded stream, call End(). Returns: - true if successful, false if an error occured. + true if successful, false if an error occurred. */ bool Begin(); @@ -96,7 +96,7 @@ public: number of bytes in in_buffer in_buffer - [in] Returns: - true if successful, false if an error occured. + true if successful, false if an error occurred. */ bool In( ON__UINT64 in_buffer_size, @@ -143,7 +143,7 @@ public: generate one call to the output stream handler with the value of out_buffer_size = 4 to 76. Returns: - true if successful, false if an error occured. + true if successful, false if an error occurred. */ bool End(); @@ -224,7 +224,7 @@ public: // Decode() for every line in the file. Decode() returns 0 if // there is nothing in base64str to decode or if it detects an // error that prevents any further decoding. The function Error() - // can be used to determine if an error occured. Otherwise, + // can be used to determine if an error occurred. Otherwise, // Decode() returns a pointer to the location in the string where // it stopped decoding because it detected a character, like a null // terminator, an end of line character, or any other character @@ -261,7 +261,7 @@ public: // wants to stop further decoding. void SetError(); - // Returns true if an error occured during decoding because + // Returns true if an error occurred during decoding because // invalid input was passed to Decode(). const bool Error() const; @@ -343,7 +343,7 @@ class ON_CLASS ON_Base64 final { public: // Decode a base64 string. - // buffer_out must be large enough to accomodate the decoded data. It is safe to use the + // buffer_out must be large enough to accommodate the decoded data. It is safe to use the // length of base64_in because this Base64 string will always be about 33% bigger than the // data it was created from. Returns the number of bytes written to buffer_out. // The function stops when max_length bytes have been decoded. diff --git a/opennurbs_beam.h b/opennurbs_beam.h index 63314d8a..f6a97767 100644 --- a/opennurbs_beam.h +++ b/opennurbs_beam.h @@ -20,7 +20,7 @@ Description: 2d xy profile to 3d world space. Parameters: P - [in] start or end of path - T - [in] unit tanget to path + T - [in] unit tangent to path U - [in] unit up vector perpendicular to T Normal - [in] optional unit vector with Normal->z > 0 that defines the unit normal to the miter plane. @@ -352,9 +352,9 @@ public: * if mesh is null, any existing mesh is deleted and nothing is attached. Remarks: - DEPRECATED. Use ON_Extrusion.m_mesh_cache to managed chached meshes. + DEPRECATED. Use ON_Extrusion.m_mesh_cache to managed cached meshes. */ - ON_DEPRECATED_MSG("Use ON_Extrusion.m_mesh_cache to managed chached meshes") + ON_DEPRECATED_MSG("Use ON_Extrusion.m_mesh_cache to managed cached meshes") bool SetMesh( ON::mesh_type mt, ON_Mesh* mesh ); /* @@ -373,9 +373,9 @@ public: If a mesh of the requested type is not available, then null is returned. Remarks: - DEPRECATED. Use ON_Extrusion.m_mesh_cache to managed chached meshes. + DEPRECATED. Use ON_Extrusion.m_mesh_cache to managed cached meshes. */ - ON_DEPRECATED_MSG("Use ON_Extrusion.m_mesh_cache to managed chached meshes") + ON_DEPRECATED_MSG("Use ON_Extrusion.m_mesh_cache to managed cached meshes") const ON_Mesh* Mesh( ON::mesh_type mt ) const; /* @@ -388,9 +388,9 @@ public: bDeleteMesh - [in] if true, cached mesh is deleted. If false, pointer to cached mesh is just set to null. Remarks: - DEPRECATED. Use ON_Extrusion.m_mesh_cache to managed chached meshes. + DEPRECATED. Use ON_Extrusion.m_mesh_cache to managed cached meshes. */ - ON_DEPRECATED_MSG("Use ON_Extrusion.m_mesh_cache to managed chached meshes") + ON_DEPRECATED_MSG("Use ON_Extrusion.m_mesh_cache to managed cached meshes") void DestroyMesh( ON::mesh_type mt ); //////////////////////////////////////////////////////////// @@ -588,7 +588,7 @@ public: /* Description: Set the outer profile of the extrusion. - Paramters: + Parameters: outer_profile - [in] curve in the xy plane or a 2d curve. bCap - [in] @@ -612,7 +612,7 @@ public: /* Description: Add an inner profile. - Paramters: + Parameters: inner_profile - [in] closed curve in the xy plane or a 2d curve. Returns: @@ -666,7 +666,7 @@ public: int ProfileParameter() const; /* - Paramters: + Parameters: profile_index - [in] 0 <= profile_index < ProfileCount(). The outer profile has index 0. @@ -679,12 +679,12 @@ public: const ON_Curve* Profile(int profile_index) const; /* - Paramters: + Parameters: profile_index - [in] 0 <= profile_index < ProfileCount(). The outer profile has index 0. s - [in] ( 0.0 <= s <= 1.0 ) - A relative parameter controling which priofile + A relative parameter controlling which priofile is returned. s = 0.0 returns the bottom profile and s = 1.0 returns the top profile. Returns: @@ -696,7 +696,7 @@ public: ON_Curve* Profile3d(int profile_index, double s ) const; /* - Paramters: + Parameters: ci - [in] component index identifying a 3d extrusion profile curve. Returns: @@ -708,7 +708,7 @@ public: ON_Curve* Profile3d( ON_COMPONENT_INDEX ci ) const; /* - Paramters: + Parameters: ci - [in] component index identifying a wall edge curve. Returns: @@ -720,7 +720,7 @@ public: ON_Curve* WallEdge( ON_COMPONENT_INDEX ci ) const; /* - Paramters: + Parameters: ci - [in] component index identifying a wall surface. Returns: @@ -732,7 +732,7 @@ public: ON_Surface* WallSurface( ON_COMPONENT_INDEX ci ) const; /* - Paramters: + Parameters: line_curve - [in] If null, a line curve will be allocated using new. Returns: @@ -743,14 +743,14 @@ public: ON_LineCurve* PathLineCurve(ON_LineCurve* line_curve) const; /* - Paramters: + Parameters: profile_parameter - [in] parameter on profile curve Returns: -1: if the profile_parameter does not correspond to a point on the profile curve. >= 0: index of the profile curve with domain containing - this paramter. When the profile_parameter corresponds + this parameter. When the profile_parameter corresponds to the end of one profile and the beginning of the next profile, the index of the next profile is returned. */ @@ -821,7 +821,7 @@ public: // path definition: // The line m_path must have length > m_path_length_min. - // The interval m_t must statisfy 0 <= m_t[0] < m_t[1] <= 1. + // The interval m_t must satisfy 0 <= m_t[0] < m_t[1] <= 1. // The extrusion starts at m_path.PointAt(m_t[0]) and ends // at m_path.PointAt(m_t[1]). // The "up" direction m_up is a unit vector that must @@ -839,12 +839,12 @@ public: // The profile's "y" axis corresponds to m_up. // The point (0,0) is extruded along the m_path line. // If m_profile_count = 1, then m_profile can be any - // type of continous curve. If m_profile_count > 1, + // type of continuous curve. If m_profile_count > 1, // then m_profile must be an ON_PolyCurve with // m_profile_count segments, the domain of each segment // must exactly match the polycurve's segment domain, // every segment must be continuous and closed, - // the first segement curve must have counter-clockwise + // the first segment curve must have counter-clockwise // orientation, and the rest must have clockwise // orientations. int m_profile_count; @@ -890,7 +890,7 @@ public: bCapTop - [in] if true, the end at cylinder.m_height[1] will be capped extrusion - [in] If the input extrusion pointer is null, one will be allocated on the heap - and it is the caller's responsibility to delte it at an appropriate time. + and it is the caller's responsibility to delete it at an appropriate time. If the input pointer is not null, this extrusion will be used and the same pointer will be returned, provided the input is valid. Returns: @@ -935,7 +935,7 @@ public: bCapTop - [in] if true, the end at cylinder.m_height[1] will be capped extrusion - [in] If the input extrusion pointer is null, one will be allocated on the heap - and it is the caller's responsibility to delte it at an appropriate time. + and it is the caller's responsibility to delete it at an appropriate time. If the input pointer is not null, this extrusion will be used and the same pointer will be returned, provided the input is valid. Returns: @@ -988,7 +988,7 @@ public: is capped. extrusion - [in] If the input extrusion pointer is null, one will be allocated on the heap - and it is the caller's responsibility to delte it at an appropriate time. + and it is the caller's responsibility to delete it at an appropriate time. If the input pointer is not null, this extrusion will be used and the same pointer will be returned, provided the input is valid. Returns: diff --git a/opennurbs_bezier.h b/opennurbs_bezier.h index b28e2855..eabb187b 100644 --- a/opennurbs_bezier.h +++ b/opennurbs_bezier.h @@ -74,8 +74,8 @@ public: // v_stride - [in] (>=Dimension()) stride to use for the v[] array // v - [out] array of length (der_count+1)*v_stride // curve(t) is returned in (v[0],...,v[m_dim-1]), - // curve'(t) is retuned in (v[v_stride],...,v[v_stride+m_dim-1]), - // curve"(t) is retuned in (v[2*v_stride],...,v[2*v_stride+m_dim-1]), + // curve'(t) is returned in (v[v_stride],...,v[v_stride+m_dim-1]), + // curve"(t) is returned in (v[2*v_stride],...,v[2*v_stride+m_dim-1]), // etc. // Returns: // false if unable to evaluate. @@ -523,8 +523,8 @@ public: // v_stride - [in] (>=m_dim) stride to use for the v[] array // v - [out] array of length (der_count+1)*v_stride // bez(t) is returned in (v[0],...,v[m_dim-1]), - // bez'(t) is retuned in (v[v_stride],...,v[v_stride+m_dim-1]), - // bez"(t) is retuned in (v[2*v_stride],...,v[2*v_stride+m_dim-1]), + // bez'(t) is returned in (v[v_stride],...,v[v_stride+m_dim-1]), + // bez"(t) is returned in (v[2*v_stride],...,v[2*v_stride+m_dim-1]), // etc. // Returns: // true if successful @@ -650,7 +650,7 @@ public: // Set control vertex // Parameters: // cv_index - [in] control vertex index (0 <= cv_index < m_order) - // pointstyle - [in] specifes what kind of values are passed + // pointstyle - [in] specifies what kind of values are passed // in the cv array. // ON::not_rational // cv[] is an array of length m_dim that defines @@ -712,7 +712,7 @@ public: // Get location of a control vertex. // Parameters: // cv_index - [in] control vertex index (0 <= cv_index < m_order) - // pointstyle - [in] specifes what kind of values to get + // pointstyle - [in] specifies what kind of values to get // ON::not_rational // cv[] is an array of length m_dim that defines // a euclidean (world coordinate) point @@ -753,7 +753,7 @@ public: // Get value of a control vertex. // Parameters: // cv_index - [in] control vertex index (0 <= cv_index < m_order) - // point - [out] Homogenous value of control vertex. + // point - [out] Homogeneous value of control vertex. // If the bezier is not rational, the weight is 1. // Returns: // true if successful. @@ -855,7 +855,7 @@ public: /* Description: - Use a linear fractional tranformation for [0,1] to reparameterize + Use a linear fractional transformation for [0,1] to reparameterize the bezier. The locus of the curve is not changed, but the parameterization is changed. Parameters: @@ -1454,7 +1454,7 @@ public: order1 - [in] order2 - [in] Returns: - True if input was valid and creation succeded. + True if input was valid and creation succeeded. */ bool Create( int dim, @@ -1900,7 +1900,7 @@ public: Set the world to unit cube map. Parameters: world2unitcube - [in] - Tranformation matrix that maps world coordinates + Transformation matrix that maps world coordinates to the unit cube (0,1)x(0,1)x(0,1). Returns True if current bezier volum and input transformation diff --git a/opennurbs_bitmap.h b/opennurbs_bitmap.h index 69afda02..b94795d6 100644 --- a/opennurbs_bitmap.h +++ b/opennurbs_bitmap.h @@ -405,7 +405,7 @@ public: // archive. Does not modify bmi or bits. ON_WindowsBitmap onbm; onbm.Create(bmi,bit,false); - onbm.Write( arcive ); + onbm.Write( archive ); } */ diff --git a/opennurbs_bounding_box.h b/opennurbs_bounding_box.h index fb3c0c84..ed9bf370 100644 --- a/opennurbs_bounding_box.h +++ b/opennurbs_bounding_box.h @@ -47,7 +47,7 @@ public: // OBSOLETE void Destroy(); // set this = ON_BoundingBox::EmptyBoundingBox - // operator[] returns min if index <= 0 and max if indes >= 1 + // operator[] returns min if index <= 0 and max if index >= 1 ON_3dPoint& operator[](int); const ON_3dPoint& operator[](int) const; @@ -116,7 +116,7 @@ public: Parameters: tolerance - [in] Distances <= tolerance will be considered to be zero. If tolerance is negative (default), then - a scale invarient tolerance is used. + a scale invariant tolerance is used. Returns: @untitled table 0 box is not degenerate @@ -717,7 +717,7 @@ public: false - hash was not in the cache. Remarks: If the hash values you are using are correctly computed and include - all information that the bouding box depends on, then + all information that the bounding box depends on, then you never need to remove bounding boxes. Unused ones will get removed as new ones are added. */ @@ -730,7 +730,7 @@ public: Removes all bounding boxes. Remarks: If the hash values you are using are correctly computed and include - all information that the bouding box depends on, then + all information that the bounding box depends on, then you never need to remove bounding boxes. Unused ones will get removed as new ones are added. If the hash does not include all information required to compute diff --git a/opennurbs_box.h b/opennurbs_box.h index 1f4214a2..38edb539 100644 --- a/opennurbs_box.h +++ b/opennurbs_box.h @@ -96,7 +96,7 @@ public: Parameters: tolerance - [in] Distances <= tolerance will be considered to be zero. If tolerance is negative (default), then - a scale invarient tolerance is used. + a scale invariant tolerance is used. Returns: @untitled table 0 box is not degenerate diff --git a/opennurbs_brep.h b/opennurbs_brep.h index c075650a..39b9aae3 100644 --- a/opennurbs_brep.h +++ b/opennurbs_brep.h @@ -4179,7 +4179,7 @@ protected: public: - // The ON_Brep code increments ON_Brep::ErrorCount everytime something + // The ON_Brep code increments ON_Brep::ErrorCount every time something // unexpected happens. This is useful for debugging. static unsigned int ErrorCount; @@ -4520,7 +4520,7 @@ Parameters: pBrep - [in] if not nullptr, this brep will be used and returned. Returns: - An ON_Brep representation of the trimmed plane with a singe face. + An ON_Brep representation of the trimmed plane with a single face. See Also: ON_Brep::NewPlanarFaceLoop() */ diff --git a/opennurbs_calculator.cpp b/opennurbs_calculator.cpp index cfddc404..8822c521 100644 --- a/opennurbs_calculator.cpp +++ b/opennurbs_calculator.cpp @@ -562,6 +562,8 @@ bool ON_ArithmeticCalculatorImplementation::AppendNumber( if ( !EvaluatePendingArithmeticOperation() ) return false; break; + default: + break; } if ( bSupportImpliedMultiplication ) @@ -782,8 +784,12 @@ bool ON_ArithmeticCalculatorImplementation::AppendArithmeticOperator( if ( !EvaluatePendingArithmeticOperation() ) return false; break; + default: + break; } break; + default: + break; } m_op_stack[m_op_stack_pointer].m_op = op; @@ -822,6 +828,8 @@ ON_ArithmeticCalculatorImplementation::ARITHMETIC_OP ON_ArithmeticCalculatorImpl case ON_ArithmeticCalculatorImplementation::op_sub: rc = m_op_stack[m_op_stack_pointer-1].m_op; break; + default: + break; } return rc; diff --git a/opennurbs_circle.h b/opennurbs_circle.h index 83ee568e..acde4f11 100644 --- a/opennurbs_circle.h +++ b/opennurbs_circle.h @@ -18,7 +18,7 @@ class ON_NurbsCurve; /* Description: - ON_Circle is a circle in 3d. The cirle is represented by a radius and an + ON_Circle is a circle in 3d. The circle is represented by a radius and an orthonormal frame of the plane containing the circle, with origin at the center. An Is_Valid() circle has positive radius and an Is_ Valid() plane defining the frame. diff --git a/opennurbs_color.h b/opennurbs_color.h index 0196a36c..c3c1efe9 100644 --- a/opennurbs_color.h +++ b/opennurbs_color.h @@ -317,7 +317,7 @@ public: Parameters: format - [in] separator - [in] - character to sepearate numbers (unicode code point - UTF-16 surrogate pairs not supported) + character to separate numbers (unicode code point - UTF-16 surrogate pairs not supported) pass 0 for default. bFormatUnsetColor - [in] If true, ON_Color::UnsetColor will return "UnsetColor". Otherwise ON_Color::UnsetColor will return the empty string. @@ -336,7 +336,7 @@ public: format - [in] If format is ON_Color::TextFormat::Unset, then text_log.ColorFormat is used. separator - [in] - character to sepearate numbers (unicode code point - UTF-16 surrogate pairs not supported) + character to separate numbers (unicode code point - UTF-16 surrogate pairs not supported) pass 0 for default. bFormatUnsetColor - [in] If true, ON_Color::UnsetColor will return "UnsetColor". Otherwise ON_Color::UnsetColor will return the empty string. diff --git a/opennurbs_compress.h b/opennurbs_compress.h index 69954070..2ebf3de4 100644 --- a/opennurbs_compress.h +++ b/opennurbs_compress.h @@ -43,7 +43,7 @@ public: compression calculation. callback_context - [in] This value is passed as the first argument when calling - callback_function or the virutal Out() function. + callback_function or the virtual Out() function. Returns: True if successful. Remarks: @@ -80,7 +80,7 @@ public: When you reach the end of the uncompressed stream, call End(). Returns: - true if successful, false if an error occured. + true if successful, false if an error occurred. */ bool Begin(); @@ -94,7 +94,7 @@ public: number of bytes in in_buffer in_buffer - [in] Returns: - true if successful, false if an error occured. + true if successful, false if an error occurred. */ bool In( ON__UINT64 in_buffer_size, @@ -115,7 +115,7 @@ public: In general, it is probably going to be easier to test and debug your code if you ignore the callback_context parameter and add a member variable to your derived class to make additional - information accessable to your Out function. + information accessible to your Out function. */ virtual bool Out( void* callback_context, @@ -129,7 +129,7 @@ public: Calling End() may generate zero or more calls to the output stream handler. Returns: - true if successful, false if an error occured. + true if successful, false if an error occurred. */ bool End(); @@ -220,7 +220,7 @@ public: uncompression calculation. callback_context - [in] This value is passed as the first argument when calling - callback_function or the virutal Out() function. + callback_function or the virtual Out() function. Returns: True if successful. Remarks: @@ -257,7 +257,7 @@ public: When you reach the end of the compressed stream, call End(). Returns: - true if successful, false if an error occured. + true if successful, false if an error occurred. */ bool Begin(); @@ -271,7 +271,7 @@ public: number of bytes in in_buffer in_buffer - [in] Returns: - true if successful, false if an error occured. + true if successful, false if an error occurred. */ bool In( ON__UINT64 in_buffer_size, @@ -292,7 +292,7 @@ public: In general, it is probably going to be easier to test and debug your code if you ignore the callback_context parameter and add a member variable to your derived class to make additional - information accessable to your Out function. + information accessible to your Out function. */ virtual bool Out( void* callback_context, @@ -306,7 +306,7 @@ public: Calling End() may generate zero or more calls to the output stream handler. Returns: - true if successful, false if an error occured. + true if successful, false if an error occurred. */ bool End(); @@ -448,7 +448,7 @@ public: /* Description: - Destroy the current informtion in the ON_CompressedBuffer + Destroy the current information in the ON_CompressedBuffer so the class can be reused. */ void Destroy(); diff --git a/opennurbs_compstat.cpp b/opennurbs_compstat.cpp index 71b404b3..9a986439 100644 --- a/opennurbs_compstat.cpp +++ b/opennurbs_compstat.cpp @@ -362,6 +362,8 @@ unsigned int ON_ComponentStatus::SetSelectedState( if ( bSynchronizeHighlight && 0 != SetStates(ON_ComponentStatus::Highlighted) ) bChanged = true; break; + default: + break; } return bChanged ? 1U : 0U; diff --git a/opennurbs_compstat.h b/opennurbs_compstat.h index 26184b8b..4eae6f8b 100644 --- a/opennurbs_compstat.h +++ b/opennurbs_compstat.h @@ -120,13 +120,13 @@ public: Description: A tool for adding a status check filter. This tool pays attention to RuntimeMark(). - Paramters: + Parameters: candidate - [in] pass_bits - [in] fail_bits - [in] Returns: - Checking is perfomed in the folloing order and every bit, include the RuntimeMark() bit, are tested. + Checking is performed in the following order and every bit, include the RuntimeMark() bit, are tested. First: If ON_ComponentStatus::LogicalAnd(candidate,status_pass) has any set bits, @@ -438,7 +438,7 @@ public: ////////////////////////////////////////////////////////////////////////// // - // Checking multiple state values efficently + // Checking multiple state values efficiently // bool operator==(const ON_ComponentStatus&) const; @@ -524,7 +524,7 @@ private: /* -ON_AggregateComponentStatus is obsolte. +ON_AggregateComponentStatus is obsolete. It exists because the virtual interface on ON_Object and the member on ON_Brep cannot be changed without breakky the pubic C++ SDK. Whenever possible, use ON_AggregateComponentStatusEx. @@ -547,7 +547,7 @@ public: Description: Sets all states to clear. Marks status as current. - Does not change compoent count + Does not change component count Returns true if successful. false if information is not current and ClearAllStates() failed. @@ -558,7 +558,7 @@ public: Description: Sets all states specified by states_to_clear to clear. Does not change current mark. - Does not change compoent count. + Does not change component count. Returns true if successful. false if information is not current and ClearAggregateStatus() failed. @@ -622,13 +622,13 @@ public: /* Returns: - Number of compoents that are selected or persistently selected. + Number of components that are selected or persistently selected. */ unsigned int SelectedCount() const; /* Returns: - Number of compoents that are persistently selected. + Number of components that are persistently selected. */ unsigned int SelectedPersistentCount() const; @@ -699,7 +699,7 @@ public: Description: Sets all states to clear. Marks status as current. - Does not change compoent count + Does not change component count Returns true if successful. false if information is not current and ClearAllStates() failed. @@ -710,7 +710,7 @@ public: Description: Sets all states specified by states_to_clear to clear. Does not change current mark. - Does not change compoent count. + Does not change component count. Returns true if successful. false if information is not current and ClearAggregateStatus() failed. @@ -774,13 +774,13 @@ public: /* Returns: - Number of compoents that are selected or persistently selected. + Number of components that are selected or persistently selected. */ unsigned int SelectedCount() const; /* Returns: - Number of compoents that are persistently selected. + Number of components that are persistently selected. */ unsigned int SelectedPersistentCount() const; @@ -838,7 +838,7 @@ public: Description: Add x to the list. The expert caller is certain that x is not already in the list. For large lists, using this function when appropriate, can result in substantial - speed improvments. + speed improvements. Parameters: x - [in] A value that is known to not be in the list. diff --git a/opennurbs_convex_poly.h b/opennurbs_convex_poly.h index d1fe8469..bb376619 100644 --- a/opennurbs_convex_poly.h +++ b/opennurbs_convex_poly.h @@ -29,8 +29,8 @@ public: ON_3dSimplex& operator=(const ON_3dSimplex& rhs) = default; ~ON_3dSimplex() = default; - int Count() const; // Number of Verticies <=4 - bool IsValid(double eps) const; // true if the Verticies are affinely independent + int Count() const; // Number of Vertices <=4 + bool IsValid(double eps) const; // true if the Vertices are affinely independent /* Description: @@ -48,7 +48,7 @@ public: /* Description: Find Closest Point to this simplex from a base point P0 or the Origin. - If true is retuned then Evaluate(Bary) is the closest point on the Simplex. + If true is returned then Evaluate(Bary) is the closest point on the Simplex. maximum_distance - optional upperbound on closest point. If maximum_distance>=0 is specified and Dist(P0, Simplex)>maximum_distance then false is returned. */ @@ -183,7 +183,7 @@ private: /* This is a base class for a convex polytope in 3d space, i.e. the convex hull of a -finite set of points called verticies. +finite set of points called vertices. This is the base type in the implementation of the GJK algorithm ClosestPoint(ON_ConvexPoly& A, ON_ConvexPoly& B, ...) @@ -193,7 +193,7 @@ class ON_CLASS ON_ConvexPoly { public: /* - Returns: Number of verticies >=0 + Returns: Number of vertices >=0 */ virtual int Count() const = 0; /* @@ -217,7 +217,7 @@ public: /* Description: - For any vector W there is a vetex that is Support(W) + For any vector W there is a vertex that is Support(W) SupportIndex( W, i0) returns a vertex index for a vertex that is the support. Veretx( K.SupportIndex( W )) = K.Support(W ); */ @@ -226,9 +226,9 @@ public: /* Description: Points in a Convex Polytope are parameterized , not necessaily uniquely, - by an ON_4dex of vertex indicies and a 4d barycentric point B + by an ON_4dex of vertex indices and a 4d barycentric point B Evaluate(Ind, B ) = Sum_{i=0,..,3} Vertex(Ind[i])*B[i], where the sum is taken over i such that Ind[i]>=0 - If B is a barycentric coordinte + If B is a barycentric coordinate B[i]>=0 and B[0] + B[1] + B[2] + B[3] = 1.0 then Evaluate( Ind, B) is a point in the convex polytope */ @@ -301,7 +301,7 @@ Details: /* Description: - This is a bound on the collection of verticies. + This is a bound on the collection of vertices. Vertex(i).MaximumCoordinate()<= MaximumCoordinate() for all i */ virtual double MaximumCoordinate() const = 0; @@ -310,8 +310,8 @@ Details: Description: A point represented by a ON_4dex D and a barycentric coordinate B can be put in a standard form so that non-negative elements of D are unique and - corresponding coordinates are positive. Furthemore, the non-negative - indicies are all listed before the unset ( neagative ) values + corresponding coordinates are positive. Furthermore, the non-negative + indices are all listed before the unset ( neagative ) values */ static bool Standardize(ON_4dex& D, ON_4dPoint& B); @@ -331,8 +331,8 @@ Details: virtual ~ON_ConvexPoly() {}; }; -// 3d convex hull defined by an explicit collection of points called verticies. -// Note: verticies need not be extreme points +// 3d convex hull defined by an explicit collection of points called vertices. +// Note: vertices need not be extreme points // WARNING: Points are referenced not stored for optimal performance in' // some applications. @@ -368,8 +368,8 @@ private: int m_stride=3; }; -// 3d convex hull defined by an explicit collection of points called verticies. -// Note: verticies need not be extreme points +// 3d convex hull defined by an explicit collection of points called vertices. +// Note: vertices need not be extreme points class ON_CLASS ON_ConvexHullPoint2 : public ON_ConvexPoly { public: @@ -388,7 +388,7 @@ public: virtual ~ON_ConvexHullPoint2() override {}; - int AppendVertex(const ON_3dPoint& P); // return index of new vertex. must set Adjacent Indicies. + int AppendVertex(const ON_3dPoint& P); // return index of new vertex. must set Adjacent Indices. void Empty(); bool SetCapacity(int vcnt) { @@ -407,7 +407,7 @@ private: Compute Convex hull of 2d points Parameters: Pnt - array of points, this is array of working data. The points are sorted in place as part of the algorithm - HUll - the sequence Hull[0], HUll[1]... ,*Hull.Last() == Hull[0] defines the convex hull with a positive orientation retuns 2. + HUll - the sequence Hull[0], HUll[1]... ,*Hull.Last() == Hull[0] defines the convex hull with a positive orientation returns 2. PntInd - otional array to be filled in so that Hull[i] = Pnt[ PntInd[i]] where Pnt is the original input point Returns dimension of the convex hull diff --git a/opennurbs_crc.h b/opennurbs_crc.h index 45b64d88..c5a841e6 100644 --- a/opennurbs_crc.h +++ b/opennurbs_crc.h @@ -18,7 +18,7 @@ ON_BEGIN_EXTERNC /* Description: - Continues 16 bit CRC calulation to include the buffer. + Continues 16 bit CRC calculation to include the buffer. Parameters: current_remainder - [in] @@ -67,7 +67,7 @@ ON__UINT16 ON_CRC16( /* Description: - Continues 32 bit CRC calulation to include the buffer + Continues 32 bit CRC calculation to include the buffer ON_CRC32() is a slightly altered version of zlib 1.3.3's crc32() and the zlib "legal stuff" is reproduced below. diff --git a/opennurbs_curve.h b/opennurbs_curve.h index e66110f0..8692222b 100644 --- a/opennurbs_curve.h +++ b/opennurbs_curve.h @@ -373,7 +373,7 @@ public: at the start of the G2 curve segment that was tested. Returns: - True if the paramter t is on a arc segment of the curve. + True if the parameter t is on a arc segment of the curve. */ bool IsArcAt( double t, @@ -467,7 +467,7 @@ public: possible to repeatedly call GetNextDiscontinuity and step through the discontinuities. t1 - [in] (t0 != t1) If there is a discontinuity at t1 is - will be ingored unless c is a locus discontinuity + will be ignored unless c is a locus discontinuity type and t1 is at the start or end of the curve. t - [out] if a discontinuity is found, then *t reports the parameter at the discontinuity. @@ -478,7 +478,7 @@ public: discontinuity found at *t. A value of 1 means the first derivative or unit tangent was discontinuous. A value of 2 means the second derivative or curvature was - discontinuous. A value of 0 means teh curve is not + discontinuous. A value of 0 means the curve is not closed, a locus discontinuity test was applied, and t1 is at the start of end of the curve. If 'c', the type of continuity to test for @@ -573,7 +573,7 @@ public: // Returns: // true if curve was reversed. // Remarks: - // If reveresed, the domain changes from [a,b] to [-b,-a] + // If reversed, the domain changes from [a,b] to [-b,-a] virtual bool Reverse()=0; @@ -913,8 +913,8 @@ public: v_stride - [in] (>=Dimension()) stride to use for the v[] array v - [out] array of length (der_count+1)*v_stride curve(t) is returned in (v[0],...,v[m_dim-1]), - curve'(t) is retuned in (v[v_stride],...,v[v_stride+m_dim-1]), - curve"(t) is retuned in (v[2*v_stride],...,v[2*v_stride+m_dim-1]), + curve'(t) is returned in (v[v_stride],...,v[v_stride+m_dim-1]), + curve"(t) is returned in (v[2*v_stride],...,v[2*v_stride+m_dim-1]), etc. side - [in] optional - determines which side to evaluate from =0 default @@ -1169,7 +1169,7 @@ public: // Description: // Destroys the runtime curve tree used to speed closest - // point and intersection calcuations. + // point and intersection calculations. // Remarks: // If the geometry of the curve is modified in any way, // then call DestroyCurveTree(); The curve tree is @@ -1477,9 +1477,9 @@ bool ON_SortCurves( /* Description: - Determine the orientaion (counterclockwise or clockwise) of a closed + Determine the orientation (counterclockwise or clockwise) of a closed planar curve. -Paramters: +Parameters: curve - [in] simple (no self intersections) closed planar curve xform - [in] Transformation to map the curve to the xy plane. If the curve is parallel to the xy plane, you may pass nullptr. @@ -1498,11 +1498,11 @@ int ON_ClosedCurveOrientation(const ON_Curve& curve, const ON_Plane& plane); /* Description: - Get a crude aproximation of the signed area of the region in the + Get a crude approximation of the signed area of the region in the x-y plane traced out by the curve. This is useful for calculating the orientation of projections of loops to planes when you have more than one curve. -Paramters: +Parameters: curve - [in] domain - [in] optional sub-domain. (null if entire curve should be used). diff --git a/opennurbs_cylinder.h b/opennurbs_cylinder.h index 5b08616e..31790837 100644 --- a/opennurbs_cylinder.h +++ b/opennurbs_cylinder.h @@ -27,11 +27,11 @@ class ON_CLASS ON_Cylinder public: ON_Cylinder(); // zeros all fields - cylinder is invalid - ON_Cylinder( // infinte cylinder + ON_Cylinder( // infinite cylinder const ON_Circle& // point on the bottom plane ); - ON_Cylinder( // infinte cylinder + ON_Cylinder( // infinite cylinder const ON_Circle&, // point on the bottom plane double // height ); diff --git a/opennurbs_defines.h b/opennurbs_defines.h index a3bf9789..72c600da 100644 --- a/opennurbs_defines.h +++ b/opennurbs_defines.h @@ -253,14 +253,14 @@ double ON_RadiansFromDegrees( // The reasons ON_UNSET_VALUE is a valid finite number are: // // 1) It needs to round trip through fprintf/sscanf. -// 2) It needs to persist unchanged through assigment +// 2) It needs to persist unchanged through assignment / and not generate exceptions when assigned. // 3) ON_UNSET_VALUE == ON_UNSET_VALUE needs to be true. // 4) ON_UNSET_VALUE != ON_UNSET_VALUE needs to be false. // // Ideally, it would also have these SNaN attributes // * When used in a calculation, a floating point exception -// occures. +// occurs. // * No possibility of a valid calculation would generate // ON_UNSET_VALUE. // * float f = (float)ON_UNSET_VALUE would create an invalid @@ -318,12 +318,12 @@ The values must never be a valid user heap or stack pointer value. /* Description: -Paramters: +Parameters: x - [out] returned value of x is an SNan (signalling not a number). Remarks: Any time an SNaN passes through an Intel FPU, the result - is a QNaN (quiet nan) and the invalid operation excpetion + is a QNaN (quiet nan) and the invalid operation exception flag is set. If this exception is not masked, then the exception handler is invoked. @@ -951,11 +951,11 @@ public: /* Returns: - Empty string or the git hash of the revison of the source code used to build this application. + Empty string or the git hash of the revision of the source code used to build this application. The git hash is a hexadecimal number represented in UTF-8 string. Remarks: Developer builds return "". - Build system builds return the git revsion hash. + Build system builds return the git revision hash. */ static const char* SourceGitRevisionHash(); @@ -1172,7 +1172,7 @@ public: /// ON::LengthUnitSystem::None indicates no length unit system. The scale factor /// when converting between a specified unit system and None is always 1.0. /// ON::LengthUnitSystem::None is used as a unit system for models and - /// instance defitions that should be imported or referenced with no + /// instance definitions that should be imported or referenced with no /// scaling applied. /// None = 0, @@ -1328,7 +1328,7 @@ public: /// /// The ON::LengthUnitSystem::Unset is used to indicate no unit system is set. - /// This is a differnt condition from ON::LengthUnitSystem::None. + /// This is a different condition from ON::LengthUnitSystem::None. /// Unset = 255 }; @@ -1607,7 +1607,7 @@ public: Unset = 0, /// - /// Interactivly ask the user to choose one of the following methods + /// Interactively ask the user to choose one of the following methods /// to resolve component name conflicts. /// QueryMethod = 1, @@ -1635,7 +1635,7 @@ public: /// /// Keep both components. - /// Resolve the name conflict by interactivly asking for an unused name + /// Resolve the name conflict by interactively asking for an unused name /// to assign to the new component. /// KeepBothComponentsQueryRename = 5, @@ -1834,7 +1834,7 @@ public: // The x/y/z_2pt_perspective_view projections are ordinary perspective // projection. Using these values insures the ON_Viewport member - // fuctions properly constrain the camera up and camera direction vectors + // functions properly constrain the camera up and camera direction vectors // to preserve the specified perspective vantage. enum view_projection : unsigned int { @@ -2222,7 +2222,7 @@ public: //// surface_loft_end_condition ////////////////////////////////////////////// // - // End condition paramter values for ON_Curve::CreateCubicLoft() and + // End condition parameter values for ON_Curve::CreateCubicLoft() and // ON_Surface::CreateCubicLoft(). enum cubic_loft_end_condition { @@ -2271,7 +2271,7 @@ public: Aligned = 1, /// - /// Angle bewteen two lines. + /// Angle between two lines. /// Angular = 2, @@ -2356,7 +2356,7 @@ public: /// MiddleOfBottom = 4, /// - /// Attach to the basline of the last line. (Independent of glyphs being displayed.) + /// Attach to the baseline of the last line. (Independent of glyphs being displayed.) /// Bottom = 5, /// @@ -2574,7 +2574,7 @@ class ON_CLASS ON_COMPONENT_INDEX public: // Do not change these values; they are stored in 3dm archives - // and provide a persistent way to indentify components of + // and provide a persistent way to identify components of // complex objects. enum TYPE { diff --git a/opennurbs_dimension.h b/opennurbs_dimension.h index d8b79169..e8484b89 100644 --- a/opennurbs_dimension.h +++ b/opennurbs_dimension.h @@ -582,12 +582,12 @@ public: Pass nullptr if a dim_style is not available. line1 - [in] point_on_line1 - [in] - If point_on_line1 is specified, it inidicates which semi-infinite portion of line1 to dimension. + If point_on_line1 is specified, it indicates which semi-infinite portion of line1 to dimension. Otherwise the midpoint of lne1 as a segment is used. When in doubt, pass ON_3dPoint::UnsetPoint. line2 - [in] point_on_line2 - [in] - If point_on_line2 is specified, it inidicates which semi-infinite portion of line2 to dimension. + If point_on_line2 is specified, it indicates which semi-infinite portion of line2 to dimension. Otherwise the midpoint of line2 as a segment is used. When in doubt, pass ON_3dPoint::UnsetPoint. point_on_angular_dimension_arc - [in] diff --git a/opennurbs_dimensionstyle.cpp b/opennurbs_dimensionstyle.cpp index bf8057d8..c4519026 100644 --- a/opennurbs_dimensionstyle.cpp +++ b/opennurbs_dimensionstyle.cpp @@ -1533,6 +1533,8 @@ static void Internal_V6LengthDisplayFromV5LengthFormatAndFactor( v6_length_factor = 1.0; v6_dimension_length_display = ON_DimStyle::LengthDisplay::Miles; break; + default: + break; } return; diff --git a/opennurbs_dimensionstyle.h b/opennurbs_dimensionstyle.h index bd248167..ba3dadb8 100644 --- a/opennurbs_dimensionstyle.h +++ b/opennurbs_dimensionstyle.h @@ -224,7 +224,7 @@ private: double m_mask_border = 0.0; // At some point, the reserved fields may have the name changed and be - // used to store additional informtion of how to draw the mask, + // used to store additional information of how to draw the mask, // (feathered edges, rounded corners, etc.). unsigned int m_reserved3 = 0; mutable ON_SHA1_Hash m_content_hash = ON_SHA1_Hash::ZeroDigest; @@ -403,7 +403,7 @@ public: Returns: True: "this" and src have identical names, dimension style appearance attributes, - and identical atttributes inherited from the same parent dimension style. + and identical attributes inherited from the same parent dimension style. ON_ModelComponent settings other than Name() and ParentId() are not compared. Remaraks: @@ -682,7 +682,7 @@ public: /// /// AlternateLengthFactor is a rarely used. See Length factor for - /// a discription of this property. + /// a description of this property. /// AlternateLengthFactor = 18, @@ -1413,7 +1413,7 @@ public: using the current settings for TextHeight() and Font(). Remarks: Typically close to the average with of a decimal digit (0123456789) and used - to line up colmns of numeric values. + to line up columns of numeric values. */ double TextWidthOfFigureSpace() const; @@ -1477,13 +1477,13 @@ public: // Distance scale factor for alternate display /// /// AlternateLengthFactor is a rarely used. See Length factor for - /// a discription of this property. + /// a description of this property. /// double AlternateLengthFactor() const; /// /// AlternateLengthFactor is a rarely used. See Length factor for - /// a discription of this property. + /// a description of this property. /// void SetAlternateLengthFactor(double); @@ -1570,7 +1570,7 @@ public: false: (default) The setting identified by field_id is inherited from the parent dimension style identified by ParentId(). true: - The setting identified by field_id is independet of any parent dimension style. + The setting identified by field_id is independent of any parent dimension style. */ bool IsFieldOverride(ON_DimStyle::field field_id) const; @@ -1644,7 +1644,7 @@ public: Parameters: parent_dim_style - [in] If you are getting ready to modify and existing annotation object, - a good options for this paramter is the dimstyle returned by ON_Annotation.DimStyle(); + a good options for this parameter is the dimstyle returned by ON_Annotation.DimStyle(); If you are getting ready to create a new annotation object, then get an ON_DimStyleContext class and pass ON_DimStyleContext.CurrentDimStyle(). In Rhino, use CRhinoDoc.DimStyleContext() to get an ON_DimStyleContext. @@ -1769,7 +1769,7 @@ public: Description: For every dimension style property identified by a field_id ON_DimStyle::field enum, except Name and Index, if source and parent have different values, then - set the field overide for that property to true. + set the field override for that property to true. Parameters: src - [in] It is permitted for src to be this. @@ -1782,7 +1782,7 @@ public: ); /* - Descripton: + Description: Set the parent dimension style id to parent.Id() and copies all inherited appearance properties from parent. Parameters: @@ -2046,7 +2046,7 @@ public: /// Ideally, ON_DimStyle::UnitSystem() would specify the text height units /// and ON_DimStyle::DimScale() cound be adjusted as model space extents require. /// Text in instance definitions would have a well defined height and references - /// to those instance defintions would display predictably in both model space and page space. + /// to those instance definitions would display predictably in both model space and page space. /// ON::LengthUnitSystem UnitSystem() const; @@ -2068,7 +2068,7 @@ public: /// Ideally, ON_DimStyle::UnitSystem() would specify the text height units /// and ON_DimStyle::DimScale() cound be adjusted as model space extents require. /// Text in instance definitions would have a well defined height and references - /// to those instance defintions would display predictably in both model space and page space. + /// to those instance definitions would display predictably in both model space and page space. /// void SetUnitSystem(ON::LengthUnitSystem us); @@ -2081,9 +2081,9 @@ public: Less ideally, both source_unit_system and destination_unit_system are model space units. Parameters: bUseName - [in] - Consider the name when assinging a unit system. + Consider the name when assigning a unit system. For example, a dimension style name "Millimters Small" would - be assinged a unit system of millimeters. + be assigned a unit system of millimeters. source_unit_system - [in] unit system in the context where the dimension style originated. destination_unit_system - [in] @@ -2113,7 +2113,7 @@ public: /// Ideally, ON_DimStyle::UnitSystem() would specify the text height units /// and ON_DimStyle::DimScale() cound be adjusted as model space extents require. /// Text in instance definitions would have a well defined height and references - /// to those instance defintions would display predictably in both model space and page space. + /// to those instance definitions would display predictably in both model space and page space. Returns: true if the unit system is set to an explicit valid length unit. */ @@ -2215,13 +2215,13 @@ private: /// /// The LengthResolution property controls the precision of dimension length display. /// - /// DECIMAL LENGHT DISPLAY: + /// DECIMAL LENGTH DISPLAY: /// If m_dimension_length_display is any of the ON_DimStyle::LengthDisplay decimal formats, /// then m_lengthresolution is the number of digits after the decimal point. /// For example, if m_lengthresolution is 2, then dimension length display will be n.ff /// If m_lengthresolution=7, then dimension length display will be n.fffffff. /// - /// FRACTONAL LENGHT DISPLAY: + /// FRACTONAL LENGTH DISPLAY: /// If m_dimension_length_display is ON_DimStyle::LengthDisplay::InchesFractional or /// ON_DimStyle::LengthDisplay::FeetAndInches, then fractional length display is used. /// In this case any fractional part will be rouded to the closest multiple @@ -2464,7 +2464,7 @@ private: /// Ideally, ON_DimStyle::UnitSystem() would specify the text height units /// and ON_DimStyle::DimScale() cound be adjusted as model space extents require. /// Text in instance definitions would have a well defined height and references - /// to those instance defintions would display predictably in both model space and page space. + /// to those instance definitions would display predictably in both model space and page space. ON::LengthUnitSystem m_dimstyle_unitsystem = ON::LengthUnitSystem::None; ON::TextOrientation m_text_orientation = ON::TextOrientation::InPlane; diff --git a/opennurbs_evaluate_nurbs.h b/opennurbs_evaluate_nurbs.h index ee196f0d..e44644e8 100644 --- a/opennurbs_evaluate_nurbs.h +++ b/opennurbs_evaluate_nurbs.h @@ -110,7 +110,7 @@ Parameters: COMMENTS: If a degree d NURBS has n control points, then the OpenNURBS knot vector - for the entire NURBS curve has length d+n-1. The knot[] paramter to this + for the entire NURBS curve has length d+n-1. The knot[] parameter to this function points to the 2*d knots active for the span being evaluated. Most literature, including DeBoor and The NURBS Book, @@ -296,7 +296,7 @@ Parameters: n = v_stride*( (i+j)*(i+j+1)/2 + j). Returns: - True if succcessful. + True if successful. See Also: ON_NurbsSurface::Evaluate ON_EvaluateNurbsSpan @@ -374,7 +374,7 @@ Parameters: n = v_stride*( d*(d+1)*(d+2)/6 + (j+k)*(j+k+1)/2 + k) Returns: - True if succcessful. + True if successful. See Also: ON_NurbsCage::Evaluate ON_EvaluateNurbsSpan diff --git a/opennurbs_extensions.h b/opennurbs_extensions.h index 3069d56f..93fa9c88 100644 --- a/opennurbs_extensions.h +++ b/opennurbs_extensions.h @@ -51,7 +51,7 @@ public: /* Returns: - Number of failures, erros, and warnings. + Number of failures, errors, and warnings. */ unsigned int TotalCount() const; @@ -439,11 +439,11 @@ public: continuing. Returns: True - Succesful. If model_geometry_reference.IsEmpty() is true, + Successful. If model_geometry_reference.IsEmpty() is true, then no more geometry objects are available and you should call IncrementalReadFinish(). False - An error occured and reading should terminate. + An error occurred and reading should terminate. Remarks: You must call IncrementalReadBegin() before making any calls to IncrementalReadModelObject(). @@ -640,7 +640,7 @@ public: ON_String m_sStartSectionComments; // Properties include revision history, notes, information about - // the applicaton that created the file, and an optional preview image. + // the application that created the file, and an optional preview image. ON_3dmProperties m_properties; // Settings include tolerance, and unit system, and defaults used @@ -849,7 +849,7 @@ public: bManagedComponent - [in] If bManagedComponent is true, then ~ONX_Model will delete the component. If bManagedComponent is false, then you are responsible for insuring - the component exists past the desctruction of this ONX_Model. + the component exists past the destruction of this ONX_Model. bResolveIdAndNameConflicts - [in] If bResolveIdAndNameConflicts is false, then model_component.Id() must be non-nil @@ -875,7 +875,7 @@ public: /* Description: - Add an copy of the model_geometry and attrbutes to this model. + Add an copy of the model_geometry and attributes to this model. Parameters: geometry_object - [in] @@ -910,7 +910,7 @@ public: /* Description: - Add an copy of the model_geometry and attrbutes to this model. + Add an copy of the model_geometry and attributes to this model. Parameters: managed_geometry_object - [in] @@ -946,7 +946,7 @@ public: /* Description: - Add geometry and attibutes to this model and control how the instances are managed. + Add geometry and attributes to this model and control how the instances are managed. Parameters: bManageGeometry - [in] @@ -968,7 +968,7 @@ public: are active. attributes - [in] - nullptr if not avaiable. + nullptr if not available. bResolveIdAndNameConflicts - [in] If bResolveIdAndNameConflicts is false, then attributes must be nullptr @@ -1056,7 +1056,7 @@ public: Remarks: ONX_Model::ComponentFromRuntimeSerialNumber() used to get a reference rather than a copy of the model's primary ON_ModelComponentReference. This is the function that must be used if a caller is going to - use exclusive access funcitons like + use exclusive access functions like ON_ModelComponent* ON_ModelComponentReference::ExclusiveModelComponent() ON_3dmObjectAttributes* ON_ModelGeometryComponent::ExclusiveAttributes() @@ -1764,12 +1764,12 @@ public: Fail = 1, /// - /// Test was performed and completed, but at least one ON_ERROR occured. + /// Test was performed and completed, but at least one ON_ERROR occurred. /// Errors = 2, /// - /// Test was performed and completed, but at least one ON_WARNING occured. + /// Test was performed and completed, but at least one ON_WARNING occurred. /// Warnings = 3, @@ -1780,13 +1780,13 @@ public: Pass = 4, /// - /// Test was not perfomed because the input did not satisfy prerequisites or an + /// Test was not performed because the input did not satisfy prerequisites or an /// earlier test failed. /// For example, if a ONX_ModelReadTest::TestType::ReadWriteReadCompare /// test is requested and the source file is a Rhino 1 file, the compare /// test is skipped. /// For example, if a ONX_ModelReadTest::TestType::ReadWriteRead - /// test is requested and the Write test failes, the second Read test is skipped. + /// test is requested and the Write test fails, the second Read test is skipped. /// Skip = 5, }; @@ -1829,7 +1829,7 @@ public: If text_log is not nullptr, then a summary of the test is sent to text_log. Returns: True if every test passed with no warnings or errors. - False if a test failed or warnings or errors occured. + False if a test failed or warnings or errors occurred. */ bool ReadTest( const char* file_path, @@ -1857,7 +1857,7 @@ public: If text_log is not nullptr, then a summary of the test is sent to text_log. Returns: True if every test passed with no warnings or errors. - False if a test failed or warnings or errors occured. + False if a test failed or warnings or errors occurred. */ bool ReadTest( const wchar_t* file_path, @@ -1885,7 +1885,7 @@ public: If text_log is not nullptr, then a summary of the test is sent to text_log. Returns: True if every test passed with no warnings or errors. - False if a test failed or warnings or errors occured. + False if a test failed or warnings or errors occurred. */ bool ReadTest( FILE* fp, @@ -1913,7 +1913,7 @@ public: If text_log is not nullptr, then a summary of the test is sent to text_log. Returns: True if every test passed with no warnings or errors. - False if a test failed or warnings or errors occured. + False if a test failed or warnings or errors occurred. */ bool ReadTest( ON_BinaryArchive& archive, diff --git a/opennurbs_file_utilities.h b/opennurbs_file_utilities.h index 909d462d..31c1e5b4 100644 --- a/opennurbs_file_utilities.h +++ b/opennurbs_file_utilities.h @@ -318,7 +318,7 @@ public: path - [in] path to split Returns: - The file name extension portion of the path, inlcuding the leading period or "dot". + The file name extension portion of the path, including the leading period or "dot". */ static const ON_wString FileNameExtensionFromPath( const wchar_t* path @@ -725,7 +725,7 @@ public: FILE pointer returned by ON_FileStream::Open(). Returns: >= 0: current file position - -1: an error occured + -1: an error occurred */ static ON__INT64 CurrentPosition( FILE* fp ); @@ -810,7 +810,7 @@ public: fp - [in] FILE pointer returned by ON_FileStream::Open(). Returns: - true if flush was successful. False if an error occured. + true if flush was successful. False if an error occurred. */ static bool Flush( FILE* fp ); @@ -832,7 +832,7 @@ public: file's contents were last modified is returned here as the number of seconds since midnight January 1, 1970. Returns: - true if the query was successful. False if an error occured. + true if the query was successful. False if an error occurred. */ static bool GetFileInformation( FILE* fp, @@ -866,7 +866,7 @@ public: ON_ContentHash& operator=(const ON_ContentHash&) = default; /* - Descripton: + Description: Create an ON_ContentHash class with the specified size, hash and times. Parameters: sha1_name_hash - [in] @@ -884,7 +884,7 @@ public: If 0 is passed in, the current time is used. content_last_modified_time - [in] Pass 0 if not known. - The time the hashed information that was last modifed in seconds since January 1, 1970 UCT. + The time the hashed information that was last modified in seconds since January 1, 1970 UCT. If content_last_modified_time > hash_time, then 0 is used. Returns: An ON_ContentHash with size and SHA-1 hash and times set from the parameters, @@ -898,7 +898,7 @@ public: ); /* - Descripton: + Description: Create an ON_ContentHash from a memory buffer. Parameters: sha1_name_hash - [in] @@ -919,7 +919,7 @@ public: ); /* - Descripton: + Description: Create an ON_ContentHash from a file stream. Parameters: sha1_file_name_hash - [in] @@ -929,7 +929,7 @@ public: fp - [in] pointer to a file opened with ON:FileOpen(...,"rb") Returns: An ON_ContentHash with size and SHA-1 hash and times set from the file, - hash time = now, and content last modifed time set from the file system + hash time = now, and content last modified time set from the file system information returned by ON_FileStream::GetFileInformation(). */ static ON_ContentHash CreateFromFile( @@ -938,13 +938,13 @@ public: ); /* - Descripton: + Description: Create an ON_ContentHash from a file stream. Parameters: filename - [in] name of file. Returns: An ON_ContentHash with size and SHA-1 hash and times set from the file, - hash time = now, and content last modifed time set from the file system + hash time = now, and content last modified time set from the file system information returned by ON_FileStream::GetFileInformation(). */ static ON_ContentHash CreateFromFile( @@ -975,13 +975,13 @@ public: /* Returns: - Time the hash SHA-1 hash was cacluated in seconds since January 1, 1970 UCT. + Time the hash SHA-1 hash was calculated in seconds since January 1, 1970 UCT. */ ON__UINT64 HashCalculationTime() const; /* Returns: - Time the hashed content was last modifed in seconds since January 1, 1970 UCT. + Time the hashed content was last modified in seconds since January 1, 1970 UCT. 0 is returned if this time is not known. This time should be used for important decisions as a last resort. @@ -1026,7 +1026,7 @@ public: /* Description: Test a file to see if it has a matching size and SHA-1 hash. - Paramters: + Parameters: fp - [in] pointer to file opened with ON::OpenFile(...,"rb") bSkipTimeCheck - [in] if true, the time of last modification is not checked. @@ -1041,7 +1041,7 @@ public: /* Description: Test a file to see if it has a matching size and SHA-1 content hash. - Paramters: + Parameters: filename - [in] Returns: True if the file exists, can be read, and has a matching byte_count @@ -1157,7 +1157,7 @@ public: /* Returns: - true if a and b have differnt ByteCount() or SHA-1 content hash values. + true if a and b have different ByteCount() or SHA-1 content hash values. */ static bool DifferentContent( const ON_ContentHash& a, @@ -1219,7 +1219,7 @@ private: // Time this hash was set (always > 0 if this ON_ContentHash is set). ON__UINT64 m_hash_time = 0; // number of seconds since Jan 1, 1970, UCT - // Time the content was last modifed. + // Time the content was last modified. // This time is often unknown, or set incorrectly. ON__UINT64 m_content_time = 0; // number of seconds since Jan 1, 1970, UCT @@ -1299,10 +1299,10 @@ public: ///File name exists in base path directory. BasePath = 3, - ///File with mathing content exists. + ///File with matching content exists. ContentMatch = 4, - ///Most recently modifed file. + ///Most recently modified file. MostRecent = 5 }; #pragma endregion @@ -1550,7 +1550,7 @@ public: Remarks: The value of the hash is saved in a runtime cache so using this function when comparing paths is efficient - when multple compares are required. + when multiple compares are required. See Also: ON_NameHash::CreateFilePathHash( ON_FileReference& file_reference ); */ @@ -1581,7 +1581,7 @@ private: mutable ON_ContentHash m_recent_content_hash; - // m_full_path_hash is chached runtime information. The value is not saved + // m_full_path_hash is cached runtime information. The value is not saved // in .3dm archives. It is calculated on demand. mutable ON_SHA1_Hash m_full_path_hash = ON_SHA1_Hash::EmptyContentHash; // File path hash. @@ -1625,7 +1625,7 @@ public: directory_name - [in] The directory to look in. item_name_filter - [in] - If this paramter is null, then the iteration + If this parameter is null, then the iteration includes all names in the directory. The item name to search for. This parameter can include wildcard characters, such as an @@ -1640,7 +1640,7 @@ public: There are no matching items. Remarks: - Calling FirstItem() is eqivalent to calling Initialize() and then calling NextItem(). + Calling FirstItem() is equivalent to calling Initialize() and then calling NextItem(). */ bool Initialize( const wchar_t* directory_name diff --git a/opennurbs_font.h b/opennurbs_font.h index 6c99975f..af0b81a1 100644 --- a/opennurbs_font.h +++ b/opennurbs_font.h @@ -262,7 +262,7 @@ public: Signed distance from the baseline to highest point on a glyph outline. Remarks: - If every glyph outline in the font has (0,0) on the basline, then Ascent() + If every glyph outline in the font has (0,0) on the baseline, then Ascent() is the maximum glyph bounding box Y. Ascent typically includes internal leading, the space used for @@ -281,7 +281,7 @@ public: This value is typically negative because glyphs for letters like 'g' and 'j' typically have a portion of their outline below the baseline. However, some fonts have positive descent. - If every glyph outline in the font has (0,0) on the basline, then Descent() + If every glyph outline in the font has (0,0) on the baseline, then Descent() is the minimum glyph bounding box Y. Windows: = -DWRITE_FONT_METRICS.descent @@ -290,7 +290,7 @@ public: /* Returns: - The postive distance to move the base line when moving to a new line of text. + The positive distance to move the base line when moving to a new line of text. Remarks: For almost every font used to render English text, LineSpace() > (Ascent() - Descent()). @@ -299,7 +299,7 @@ public: with (Ascent() - Descent()). For fonts designed to render horizontal lines of text, LineSpace() is a - vertical distance. For fonts desingned to render vertical lines of text, + vertical distance. For fonts designed to render vertical lines of text, LineSpace() is a horizontal distance. Depending on the context, the direction to move can be up, down, left or right. @@ -354,7 +354,7 @@ public: If the capial height property of a font is not available, the ascent of I or H can be used instead. (There are - commonly used fonts where using other glpyhs gives undesirable results.)OfI. + commonly used fonts where using other glyphs gives undesirable results.)OfI. Windows: = DWRITE_FONT_METRICS.capHeight Apple: = CTFontGetAscent(...) @@ -367,7 +367,7 @@ public: The font's typographic x-height. Remarks: - The x-height is used to help select a substitute font to use for missing glpyhs. + The x-height is used to help select a substitute font to use for missing glyphs. */ int AscentOfx() const; @@ -624,7 +624,7 @@ public: ON_2dex m_bbmax = ON_2dex::Unset; // m_max_basepoint.i = maximum horizontal delta in any line. Increases to the right, decreases to the left. - // m_max_basepoint.i = vertical delta to basline of bottom line. Increases upward, decreases downward. + // m_max_basepoint.i = vertical delta to baseline of bottom line. Increases upward, decreases downward. ON_2dex m_max_basepoint = ON_2dex::Zero; // m_advance is a vector that specifies where the basepoint should be moved @@ -871,7 +871,7 @@ public: NotOriented = 3, - // An error occured in orientation calculations + // An error occurred in orientation calculations Error = 15 }; @@ -886,7 +886,7 @@ public: { /// /// This value should be used for parameters where the type is has not - /// been explicity to determined. + /// been explicitly to determined. /// Unset = 0, @@ -944,7 +944,7 @@ public: Opennurbs searches the description saved in field 10 of the name table for the strings "Engraving - single stroke" / "Engraving - double stroke" / "Engraving" to identify fonts that are desgned for engraving (and which tend to render poorly when - used to dispaly text devices like screens, monitors, and printers). + used to display text devices like screens, monitors, and printers). The SLF (single line fonts) are examples of fonts that have Engraving in field 10. Parameters: field_10_description - [in] @@ -993,7 +993,7 @@ public: be set to what you plan on using when rendering the glyph. The orientation of outer_figur can be either clockwise or counterclockwise and, in the context of the entire glyph, outer_figure can be an inner or outer boundary. - For example, the registered trademark glpyh (UNICODE U+00AE) is an example where + For example, the registered trademark glyph (UNICODE U+00AE) is an example where four nested figures with alternating orientations are common. bPerformExtraChecking - [in] In general, when sorting glyph outlines as they come froma font file, set @@ -1318,7 +1318,7 @@ public: figure outline bounding box. For example, the glyph metrics box for 1 (numeral one) often contains space beyond the glyph outline because 1 visually occupies the same space as a 2. The choice is up to the - font designer and takes into account the desired font asthetics of columns of numbers. + font designer and takes into account the desired font aesthetics of columns of numbers. */ const ON_BoundingBox OutlineBoundingBox() const; @@ -1330,7 +1330,7 @@ public: figure outline bounding box. For example, the glyph metrics box for 1 (numeral one) often contains space beyond the glyph outline because 1 visually occupies the same space as a 2. The choice is up to the - font designer and takes into account the desired font asthetics of columns of numbers. + font designer and takes into account the desired font aesthetics of columns of numbers. */ const ON_TextBox GlyphMetrics() const; @@ -1409,7 +1409,7 @@ private: // Unset = unsorted // CounterClockwise: outer figures are CCW // Clockwise: outer fitures are CW - // Error: error occured during sorting + // Error: error occurred during sorting mutable ON_OutlineFigure::Orientation m_sorted_figure_outer_orientation = ON_OutlineFigure::Orientation::Unset; ON__UINT8 m_reserved1 = 0; @@ -1611,7 +1611,7 @@ public: /* Returns: - Number of input errors that have occured. + Number of input errors that have occurred. Remarks: When an error occurs, the current figure is terminated. */ @@ -1673,7 +1673,7 @@ public: const ON_OutlineFigurePoint ActiveFigureStartPoint() const; /* - Expert user tool for getting the curent point of + Expert user tool for getting the current point of the figure being accumulated. */ const ON_OutlineFigurePoint ActiveFigureCurrentPoint() const; @@ -1925,7 +1925,7 @@ public: Returns: If this is a managed glyph or a copy of a managed glyph, and a substitute font or code point is used to render the glyph, - then the substitue is returned. + then the substitute is returned. In all other cases, nullptr is returned. See Also: ON_FontGlyph.RenderGlyph(). @@ -1995,7 +1995,7 @@ public: Remarks: Many fonts do not have a glyph for a every UNICODE codepoint and font substitution is required. If you want to get the freetype face - used for a specfic UNICODE codepoint, call ON_Font::CodepointFreeTypeFace(). + used for a specific UNICODE codepoint, call ON_Font::CodepointFreeTypeFace(). */ const ON__UINT_PTR FreeTypeFace() const; #endif @@ -2029,7 +2029,7 @@ public: bSingleStrokeFont - [in] If true, open contours will not be closed by adding a line segment. height_of_capital - [in] - If > 0, ouptut curves, bounding box, and advance vector are scaled + If > 0, output curves, bounding box, and advance vector are scaled by height_of_capital/(font design capital height). For fonts like Arial, Helvetica, Times Roman, and Courier this means the height of H and I will be height_of_capital. @@ -2090,7 +2090,7 @@ private: // FreeType made from the same LOGFONT on the same has height of Arial I = 184, height of LF = ... // When font does not contain a glyph to render a specified unicode codepoint, - // then one or more glyphs from one or more subsitution fonts are used to + // then one or more glyphs from one or more substitution fonts are used to // render the codepoint. In this case, m_substitutes points to a linked // list of substitute used to render the glyph. // @@ -2110,7 +2110,7 @@ private: void Internal_CopyFrom(const ON_FontGlyph& src); static ON_FontGlyph* Internal_AllocateManagedGlyph(const ON_FontGlyph& src); bool Internal_GetPlatformSubstitute( - ON_FontGlyph& substitue + ON_FontGlyph& substitute ) const; }; @@ -2141,9 +2141,9 @@ public: struct IDWriteFont* m_dwrite_font = nullptr; - // prefered locale used to get the localized name values. - // If the a parrticular string was not available in the prefered locale, - // then other locales are used with "en-us" being the prefered alternate locale. + // preferred locale used to get the localized name values. + // If the a parrticular string was not available in the preferred locale, + // then other locales are used with "en-us" being the preferred alternate locale. ON_wString m_prefered_locale; // from IDWriteFontFamily.GetFamilyNames() @@ -2221,7 +2221,7 @@ public: // Opennurbs searches the description saved in field 10 of the name table // for the strings "Engraving - single stroke" / "Engraving - double stroke" / "Engraving" // to identify fonts that are desgned for engraving (and which tend to render poorly when - // used to dispaly text devices like screens, monitors, and printers). + // used to display text devices like screens, monitors, and printers). // The SLF (single line fonts) are examples of fonts that have Engraving in field 10. ON_wString m_loc_field_10_description; ON_wString m_en_field_10_description; @@ -2257,7 +2257,7 @@ public: // Sample glyph metrics from IDWriteFontFace.GetDesignGlyphMetrics - // "standard" metric glpyhs + // "standard" metric glyphs ON_FontGlyph m_Spacebox; ON_FontGlyph m_Hbox; ON_FontGlyph m_Ibox; @@ -2432,14 +2432,14 @@ public: #pragma region RH_C_SHARED_ENUM [ON_Font::Origin] [Rhino.DocObjects.Font.FontOrigin] [nested:byte] /// /// Platform where font originated. This information is useful when - /// searching for appropriate substitues. + /// searching for appropriate substitutes. /// enum class Origin : unsigned char { /// Not set. Unset = 0, - /// Origin unknown. Changing an ON_Font characteristic like weight or sytle sets the origin to unknown. + /// Origin unknown. Changing an ON_Font characteristic like weight or style sets the origin to unknown. Unknown = 1, /// @@ -2460,7 +2460,7 @@ public: #pragma region RH_C_SHARED_ENUM [ON_Font::FontType] [Rhino.DocObjects.Font.FontType] [nested:byte] /// - /// An enum that reports if the font face is avaialable on the current device. + /// An enum that reports if the font face is available on the current device. /// enum class FontType : unsigned char { @@ -2793,7 +2793,7 @@ public: Otherwise ON_FontFaceQuartet::Empty is returned. Note that managed font quartets can be enlarged to include missing faces by calling ON_Font::FontFromRichTextProperties(). Installed font quartets exactly match - what is installed on the current defice. + what is installed on the current device. if this font is not a member of an installed face quartet. */ const ON_FontFaceQuartet FontQuartet() const; @@ -3167,7 +3167,7 @@ public: Parameters: bAllowBestMatch - [in] If no exact match is available and bAllowBestMach is true and - there are installed fonts with a matching familiy name, + there are installed fonts with a matching family name, then the best match in the family is returned. Returns: If there is a matching installed font, it is returned. @@ -3296,7 +3296,7 @@ public: (Strikethrough is created as a rendering effect and not a separate face.) Returns: - If there is an installed font, it is returned. Othewise a managed font + If there is an installed font, it is returned. Otherwise a managed font is returned. When the managed font is not installed, the corresponding member of ON_Font::Default::InstalledQuartet() is used to render the font. */ @@ -3346,7 +3346,7 @@ public: /* Description: - Returns the glpyh informationh for used to render a specific code point + Returns the glyph informationh for used to render a specific code point Parameters: unicode_code_point UNICODE code point value @@ -3354,7 +3354,7 @@ public: Glyph rendering information. Remarks: - Typically the returned glpyh uses is a single glpyh in this->ManagedFont(). + Typically the returned glyph uses is a single glyph in this->ManagedFont(). In this case, glyph->SubstitueCount() is 0. In some cases one or more glyphs from one or more substitute fonts are required @@ -3599,7 +3599,7 @@ public: /* Returns: If this font is a managed font that references a font that is not installed on this computer, - then a pointer to the installed font that is the substitue for the missing font is returned. + then a pointer to the installed font that is the substitute for the missing font is returned. Otherwise nullptr is returned. */ const ON_Font* SubstituteFont() const; @@ -3757,7 +3757,7 @@ public: private: /* Description: - All font characterisics defined by the input parameters are encoded + All font characteristics defined by the input parameters are encoded in the returned value. Remarks: Used in 3dm archive reading/writing. @@ -3772,14 +3772,14 @@ private: /* Description: - All font characterisics except facename (weight, style, stretch, + All font characteristics except facename (weight, style, stretch, underlined, strikethrough, charset) are encoded in the returned value. Parameters: font_characteristics_as_unsigned - [in] Value returned from ON_Font.FontCharacteristicsAsUnsigned() Returns: - True if the characterstics were set. + True if the characteristics were set. Remarks: Used in 3dm archive reading/writing. */ @@ -3939,8 +3939,8 @@ public: For fonts that have at most 4 faces with the same stretch and variations in weight and slant, the family_name is a good choice. For fonts that have many faces, like Helvetica Neue on Mac OS, - this funciton will generate names that act like a Windows LOGFONT name - for use in archaic name + regular/bold/italic/bold-italic font selction + this function will generate names that act like a Windows LOGFONT name + for use in archaic name + regular/bold/italic/bold-italic font selection user interfaces. Returns: A fake windows logfont name. @@ -4002,7 +4002,7 @@ public: /* Description: - Get a text descripton with family weight, width (stretch), slope (style). + Get a text description with family weight, width (stretch), slope (style). Parameters: family_separator - [in] character to place after family name in the description. @@ -4036,7 +4036,7 @@ public: /* Description: - Get a text descripton with family weight, width (stretch), slope (style). + Get a text description with family weight, width (stretch), slope (style). Parameters: family_separator - [in] character to place after family name in the description. @@ -4084,7 +4084,7 @@ private: public: /* Description: - Get the scale factors for converting heights beween + Get the scale factors for converting heights between Windows device coordinates and Windows logical coordinates. Parameters: @@ -4118,7 +4118,7 @@ public: The Windows convention is to use negative lfHeight values to specify - font character heights and postive height values to specify font cell heights. + font character heights and positive height values to specify font cell heights. font cell height = font acsent + font descent. @@ -4153,11 +4153,11 @@ public: = ascent + descent - internal leading For many common fonts, the "character height" is close to the distance from the bottom of a lower case g to the top of an upper case M. - The internal leading is space reseved for diacritical marks like the + The internal leading is space reserved for diacritical marks like the ring above the A in the UNICODE "LATIN LETTER A WITH RING" U+00C5 glyph. Character height is also known as the "em height". Note that the "em height" is typically larger than the height of the - letter M because "em height" inlcude descent. + letter M because "em height" include descent. */ static int WindowsLogfontCharacterHeightFromPointSize( int map_mode, @@ -4183,7 +4183,7 @@ public: logfont_character_height - [in] This value must be a Windows LOGFONT character height in units - determine from map_mode and hdc. If you have a LOGFONT with postive + determine from map_mode and hdc. If you have a LOGFONT with positive lfHeight value, you must get the fonts TEXTMETRICS and subbr Returns: @@ -4339,7 +4339,7 @@ public: if ( nullptr != font_hdc ) { ... - Calls to Windows SDK font managment functions needing an HDC + Calls to Windows SDK font management functions needing an HDC ... ON_Font::DeleteWindowsLogfontDeviceContext(font_hdc); } @@ -4408,7 +4408,7 @@ public: Use the Windows GDI EnumFontFamiliesEx tool to get a list of LOGFONTS. Parameters: preferedLocale - [in] - If not empty, names from this locale will be prefered. + If not empty, names from this locale will be preferred. If preferedLocale = L"GetUserDefaultLocaleName", then ::GetUserDefaultLocaleName will be used to set the preferedLocale. bIncludeSimulatedFontFaces - [in] @@ -4441,7 +4441,7 @@ public: GetDeviceCaps(hdc, LOGPIXELSY) and conversion between device and logical pixel heights DPtoLP(hdc,...) and LPtoDP(hdc,...) are used. Returns: - A Windows LOGFONT with propeties copied from this ON_Font. + A Windows LOGFONT with properties copied from this ON_Font. If WindowsLogFontIsComplete() is true, then all LOGFONT properties are copied from the ON_Font. If WindowsLogFontIsComplete() is false, then the LOGFONT lfHeight, @@ -4580,7 +4580,7 @@ public: Remarks: Many fonts do not have a glyph for a every UNICODE codepoint and font substitution is required. If you want to get the freetype face - used for a specfic UNICODE codepoint, call ON_Font::CodepointFreeTypeFace(). + used for a specific UNICODE codepoint, call ON_Font::CodepointFreeTypeFace(). */ static ON__UINT_PTR FreeTypeFace( const ON_Font* font @@ -4664,7 +4664,7 @@ public: postscript_name - [in] bAcceptPartialMatch - [in] If bAcceptPartialMatch is true, there is not a font on the device with a - matching name, but there are fonts with names that have siginificant overlap, + matching name, but there are fonts with names that have significant overlap, then the font with the best overlap is returned. For example if "Arial-Black" is not present and "Arial-BoldMT" is present, then ON_Font.SetFromPostScriptName(L"Arial-Black",true) will return the @@ -4677,7 +4677,7 @@ public: ); /* - Paramaters: + Parameters: font_name - [in] A UTF-16 or UTF-32 encoded null terminated string. bStopAtHyphen - [in] @@ -4708,7 +4708,7 @@ public: /* Description: Compare the font names ignoring hyphens, underbars, and spaces. - Paramaters: + Parameters: lhs - [in] font name to compare rhs - [in] @@ -4728,7 +4728,7 @@ public: /* Description: Compare the font names ignoring hyphens, underbars, and spaces. - Paramaters: + Parameters: lhs - [in] font name to compare rhs - [in] @@ -4748,7 +4748,7 @@ public: /* Description: Compare the font names ignoring hyphens, underbars, and spaces. - Paramaters: + Parameters: lhs - [in] font name to compare rhs - [in] @@ -4770,7 +4770,7 @@ public: Compare the font names ignoring hyphens, underbars, and spaces. Ignore portions of PostScript names after the hyphen that separates the font family and font face. - Paramaters: + Parameters: lhs - [in] font name to compare rhs - [in] @@ -4792,7 +4792,7 @@ public: Compare the font names ignoring hyphens, underbars, and spaces. Ignore portions of PostScript names after the hyphen that separates the font family and font face. - Paramaters: + Parameters: lhs - [in] font name to compare rhs - [in] @@ -4814,7 +4814,7 @@ public: Compare the font names ignoring hyphens, underbars, and spaces. Ignore portions of PostScript names after the hyphen that separates the font family and font face. - Paramaters: + Parameters: lhs - [in] font name to compare rhs - [in] @@ -4832,7 +4832,7 @@ public: ); /* - Paramaters: + Parameters: dirty_font_name - [in] A UTF-16 or UTF-32 encoded null terminated string. map - [in] @@ -4849,7 +4849,7 @@ public: Parameters: font - [in] bDefaultIfEmpty - [in] - If true and font is nullptr or has emtpy names, then + If true and font is nullptr or has empty names, then the rich text font name for ON_Font::Default is returned, Returns: Font name to use in rich text file fonttbl sections. @@ -5005,11 +5005,11 @@ public: const wchar_t* preferedLocale ); - // Returns the desription saved in field 10. + // Returns the description saved in field 10. // Opennurbs searches the description saved in field 10 of the name table // for the strings "Engraving - single stroke" / "Engraving - double stroke" / "Engraving" // to identify fonts that are desgned for engraving (and which tend to render poorly when - // used to dispaly text devices like screens, monitors, and printers). + // used to display text devices like screens, monitors, and printers). // The SLF (single line fonts) are examples of fonts that have Engraving in field 10. static const ON_wString Field_10_DescriptionFromWindowsDWriteFont( struct IDWriteFont* dwrite_font, @@ -5045,11 +5045,11 @@ public: Parameters: dwrite_font - [in] preferedLocale - [in] - prefered local for strings (family name, font name, face name, postscript name, ...) + preferred local for strings (family name, font name, face name, postscript name, ...) A locale name often has the form "es-es", "en-us", ... - Pass nullptr or empty string list all locales and use "en-us" as the prefered locale name. + Pass nullptr or empty string list all locales and use "en-us" as the preferred locale name. (Most modern fonts distributed with Windows 10 in all locales have en-us names). - Pass "*..." if you want to list all locale names and specify a prefered locale. + Pass "*..." if you want to list all locale names and specify a preferred locale. For example, "*es-es" will list all local names but use "es-es" as the preferedLocale. text_log - [in] destintion for the text description of the font. @@ -5217,7 +5217,7 @@ public: AnnotationFontApplePointSize = 256, // ON_Font::Constants::metric_char is the unicode code point value - // for the glpyh used to calculate critical glyph metrics. + // for the glyph used to calculate critical glyph metrics. // It must be an 'I' or 'H', but we have not tested 'H'. // There are problems with any other upper case latin letter in common fonts. // In particular, the standard 'M' does not work. @@ -5258,7 +5258,7 @@ public: Fonts can be designed and defined at different resolutions and relative scaling is necessary when text contains glyphs from - fonts desinged at different grid resolutions. For example, + fonts designed at different grid resolutions. For example, TrueType font grid with and height is often 1024x1024 or 2048x2014, OpenType grids are often 1000x1000, and PostScript grids are often 1000x1000. Opennurbs "font units" are the units @@ -5287,7 +5287,7 @@ public: scaling. Remarks: See ON_Font.FontMetrics() documentation for important information - about the differnce bewteen normalized and font unit metrics. + about the difference between normalized and font unit metrics. */ const ON_FontMetrics& FontUnitFontMetrics() const; @@ -5309,7 +5309,7 @@ public: Returns: Font character height in points (1 point = 1/72 inch). - See the remarks for a defintion of "character height". + See the remarks for a definition of "character height". Remarks: A "point" is a length unit system. @@ -5325,10 +5325,10 @@ public: For fonts designed for languages that use latin letters, it is common for the character height to be equal to or a little larger than the distance from the bottom of a lower case g to the top of an upper case M. - The character height is also called the "em hieght". + The character height is also called the "em height". Font internal leading is the space above typical capital latin letters - that is reseved for diacritical marks like the ring above the A in + that is reserved for diacritical marks like the ring above the A in the UNICODE "LATIN LETTER A WITH RING" U+00C5 glyph (Angstrom symbol). */ double PointSize() const; @@ -5471,7 +5471,7 @@ public: ); /* - Paramaters: + Parameters: bCheckFamilyName - [in] bCheckPostScriptName - [in] Returns: @@ -5753,7 +5753,7 @@ public: /* Description: The outlines for an engraving font have single-stroke, double-stroke, - or perimeters desinged for path engraving. + or perimeters designed for path engraving. These fonts behave poorly when used for filled font rendering or creating solid extrusions. The OrachTech 2 line fonts are examples of engraving fonts that @@ -5946,16 +5946,16 @@ private: ////////////////////////////////////////////////////////////////////////////////// // - // The "font glpyh definition" parameters completely determine the appearance + // The "font glyph definition" parameters completely determine the appearance // of font glyphs. // - // If all "font glpyh definition" parameters have identical values, + // If all "font glyph definition" parameters have identical values, // text rendered using those fonts will look identical. // - // If two fonts have a "font glpyh definition" parameter with different values, + // If two fonts have a "font glyph definition" parameter with different values, // text rendered using those fonts will not look identical. // - // BEGIN "font glpyh definition" parameters: + // BEGIN "font glyph definition" parameters: // // The font ON_Font::Default has m_runtime_serial_number = 1. @@ -6337,7 +6337,7 @@ public: prefered_weight - [in] prefered_stretch - [in] prefered_style - [in] - Prefered font properties. + Preferred font properties. bRequireFaceMatch - [in] If true and face_name is not empty, then the returned font @@ -6375,7 +6375,7 @@ public: prefered_weight - [in] prefered_stretch - [in] prefered_style - [in] - Prefered font properties. + Preferred font properties. bRequireFaceMatch - [in] If true and face_name is not empty, then the returned font @@ -6515,7 +6515,7 @@ public: Remarks: This is pribarily for old-fashioned font selection UI that harkens back to the days of LOGFONT. The UI displays a name and a bold and italic button - that lets you select one of four releated faces. The name used to be based + that lets you select one of four related faces. The name used to be based on the LOGFONT name. Depending on the contents of the list, there may be some faces in the list that do not appear in the QuartetList(). */ diff --git a/opennurbs_fpoint.h b/opennurbs_fpoint.h index 8037d3dc..c829541a 100644 --- a/opennurbs_fpoint.h +++ b/opennurbs_fpoint.h @@ -500,7 +500,7 @@ public: // Require explicit construction when dev must insure array has length >= 4. explicit ON_4fPoint(const float*); // from float[4] array - // Require explicit construction when loosing precision + // Require explicit construction when losing precision explicit ON_4fPoint(const ON_2dPoint& ); // from 2d point explicit ON_4fPoint(const ON_3dPoint& ); // from 3d point explicit ON_4fPoint(const ON_4dPoint& ); // from 4d point diff --git a/opennurbs_freetype.cpp b/opennurbs_freetype.cpp index cd25ccf2..b5cedd2a 100644 --- a/opennurbs_freetype.cpp +++ b/opennurbs_freetype.cpp @@ -505,6 +505,8 @@ bool ON_FreeType::IsDamagedCharMap( case FT_ENCODING_APPLE_ROMAN: rc = ON_FreeType::UseUnicodeAsAppleRomanCharCode(cmap->face); break; + default: + break; } return rc; diff --git a/opennurbs_freetype_include.h b/opennurbs_freetype_include.h index 89308b47..5ce07d95 100644 --- a/opennurbs_freetype_include.h +++ b/opennurbs_freetype_include.h @@ -218,7 +218,7 @@ // FreeType 2.6.3 has deeply nested includes and uses angle brackets // in its include files (instead of double quotes and relative paths like opennurbs), // the directory ./freetype263/include must be in the "system" includes path. -// It is not feasable or reasonable for all projects that include opennurbs.h to have the +// It is not feasible or reasonable for all projects that include opennurbs.h to have the // freetype includes directory in the system includes path. #if defined(OPENNURBS_FREETYPE_SUPPORT) diff --git a/opennurbs_fsp.h b/opennurbs_fsp.h index ff39529e..bf09164c 100644 --- a/opennurbs_fsp.h +++ b/opennurbs_fsp.h @@ -80,7 +80,7 @@ public: If you do not have a good estimate, then use zero. block_element_capacity - [in] (0 = good default) If block_element_capacity is zero, Create() will calculate a block - size that is efficent for most applications. If you are an expert + size that is efficient for most applications. If you are an expert user and want to specify the number of elements per block, then pass the number of elements per block here. When block_element_capacity > 0 and element_count_estimate > 0, the first @@ -290,7 +290,7 @@ public: /* Description: - Get the i-th elment in the fixed size pool. + Get the i-th element in the fixed size pool. Parameters: element_index - [in] Returns: @@ -427,7 +427,7 @@ private: private: // Used by The ThreadSafe...() functions and for expert users // to use when managing memory controlled by this pool. Best - // to ingnore this unless you have a very clear idea of what + // to ignore this unless you have a very clear idea of what // you are doing, why you are doing it, and when you are doing it. // Otherwise, you'll find yourself waiting forever on a nested // access request. @@ -552,7 +552,7 @@ public: If not null, the number of elements allocated from the first block is returned in block_element_count. Note that if you have used ReturnElement(), some - of these elemements may have been returned. + of these elements may have been returned. Example: The loop will iteratate through all the blocks. @@ -592,7 +592,7 @@ public: block_element_count - [out] (can be null) If not null, the number of elements allocated from the block is returned in block_element_count. Note that if - you have used ReturnElement(), some of these elemements + you have used ReturnElement(), some of these elements may have been returned. Example: See the FirstBlock() documentation. @@ -629,7 +629,7 @@ public: If you do not have a good estimate, then use zero. block_element_count - [in] (0 = good default) If block_element_count is zero, Create() will calculate a block - size that is efficent for most applications. If you are an expert + size that is efficient for most applications. If you are an expert user and want to specify the number of blocks, then pass the number of elements per block here. When block_element_count > 0 and element_count_estimate > 0, the first block will be large enough @@ -723,7 +723,7 @@ public: /* Description: - Get the i-th elment in the pool. + Get the i-th element in the pool. Parameters: element_index - [in] Returns: @@ -834,7 +834,7 @@ public: /* Description: - Sets the state of the iterator to the initail state that + Sets the state of the iterator to the initial state that exists after construction. This is useful if the iterator has been used the get one or more elements and then the referenced fixed size pool is modified or code wants @@ -852,7 +852,7 @@ public: If not null, the number of elements allocated from the first block is returned in block_element_count. Note that if you have used ReturnElement(), some - of these elemements may have been returned. + of these elements may have been returned. Example: The loop will iteratate through all the blocks. @@ -892,7 +892,7 @@ public: block_element_count - [out] (can be null) If not null, the number of elements allocated from the block is returned in block_element_count. Note that if - you have used ReturnElement(), some of these elemements + you have used ReturnElement(), some of these elements may have been returned. Example: See the FirstBlock() documentation. @@ -905,7 +905,7 @@ public: T* NextBlock( size_t* block_element_count ); private: - // no implementation (you can use a copy construtor) + // no implementation (you can use a copy constructor) class ON_SimpleFixedSizePoolIterator& operator=(const class ON_SimpleFixedSizePoolIterator&); }; diff --git a/opennurbs_geometry.h b/opennurbs_geometry.h index d3cead7f..0bbb0775 100644 --- a/opennurbs_geometry.h +++ b/opennurbs_geometry.h @@ -268,7 +268,7 @@ public: /* Returns: - True if object can be accuratly modified with + True if object can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling. See Also: @@ -280,7 +280,7 @@ public: /* Description: If possible, converts the object into a form that can - be accuratly modified with "squishy" transformations + be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling. Returns: False if object cannot be converted to a deformable diff --git a/opennurbs_gl.h b/opennurbs_gl.h index f0d89ab1..04b07e5d 100644 --- a/opennurbs_gl.h +++ b/opennurbs_gl.h @@ -40,7 +40,7 @@ // Tested compilers: // Apple Xcode 2.4.1 // Support for other Apple compilers is not available. -#include // Open GL auxillary functions +#include // Open GL auxiliary functions #else @@ -149,10 +149,10 @@ void ON_GL( int = 1, // bPermitKnotScaling - If true, surface knots may // be rescaled to avoid knot vectors GL cannot handle. double* = nullptr, // knot_scale0[2] - If not nullptr and bPermitKnotScaling, - // the scaleing applied to the first parameter is + // the scaling applied to the first parameter is // returned here. double* = nullptr // knot_scale0[2] - If not nullptr and bPermitKnotScaling, - // the scaleing applied to the second parameter is + // the scaling applied to the second parameter is // returned here. ); diff --git a/opennurbs_glyph_outline.cpp b/opennurbs_glyph_outline.cpp index b38d7c84..d2cca2cc 100644 --- a/opennurbs_glyph_outline.cpp +++ b/opennurbs_glyph_outline.cpp @@ -1300,6 +1300,8 @@ unsigned int ON_OutlineFigure::Internal_SegmentDegree( } } break; + default: + break; } return 0; diff --git a/opennurbs_hash_table.h b/opennurbs_hash_table.h index a74577ac..2018e6db 100644 --- a/opennurbs_hash_table.h +++ b/opennurbs_hash_table.h @@ -44,7 +44,7 @@ public: If this item has been added to an ON_Hash32Table.AddItem(hash32,item pointer) then the value of hash3d passed as the first argument to ON_Hash32Table.AddItem(hash32,item pointer) is returned. This is the value the ON_Hash32Table uses for this item. - Othewise 0 is returned. + Otherwise 0 is returned. Remarks: This function is useful when copying hash tables. diff --git a/opennurbs_hatch.h b/opennurbs_hatch.h index 0519a4d5..4d0d0572 100644 --- a/opennurbs_hatch.h +++ b/opennurbs_hatch.h @@ -252,7 +252,7 @@ public: Get the number of gaps + dashes in the line Parameters: Return: - nummber of dashes in the line + number of dashes in the line */ int DashCount() const; diff --git a/opennurbs_input_libsdir.h b/opennurbs_input_libsdir.h index af79bf73..f1873559 100644 --- a/opennurbs_input_libsdir.h +++ b/opennurbs_input_libsdir.h @@ -16,11 +16,11 @@ #if !defined(OPENNURBS_INPUT_LIBSDIR_INC_) #define OPENNURBS_INPUT_LIBSDIR_INC_ -#if defined(ON_COMPILER_MSC) && !defined(OPENNURBS_INPUT_LIBS_DIR) +#if defined(ON_COMPILER_MSC) && !defined(OPENNURBS_INPUT_LIBS_DIR) && !defined(ON_CMAKE_BUILD) // This header file insures OPENNURBS_INPUT_LIBS_DIR is defined to be // the path to were the libraries opennurbs.dll links with are located. -// Examples of these libaries are zlib and freetype. +// Examples of these libraries are zlib and freetype. #if defined(OPENNURBS_OUTPUT_DIR) // Typically, OPENNURBS_OUTPUT_DIR is defined in the diff --git a/opennurbs_instance.h b/opennurbs_instance.h index af3f423d..8e6574cd 100644 --- a/opennurbs_instance.h +++ b/opennurbs_instance.h @@ -40,7 +40,7 @@ public: /* Description: Update runtime layer color visibility, locked, ... settings in the - layer table read from a refence file to the values to use in the + layer table read from a reference file to the values to use in the runtime model. This is typically done right after the reference file layer table is read and before the layers are added to the runtime model. @@ -148,7 +148,7 @@ public: // IDEF_UPDATE_TYPE lists the possible relationships between // the instance definition geometry and the archive - // (m_source_archive) containing the original defition. + // (m_source_archive) containing the original definition. enum class IDEF_UPDATE_TYPE : unsigned int { Unset = 0, @@ -161,13 +161,13 @@ public: //embedded_def = 1, // // As of 7 February, "static_def" and "embedded_def" // // and shall be treated the same. Using "static_def" - // // is prefered and "embedded_def" is obsolete. + // // is preferred and "embedded_def" is obsolete. // // The geometry for the instance definition // // is saved in archives, is fixed and has no // // connection to a source archive. // // All source archive information should be // // empty strings and m_source_archive_checksum - // // shoule be "zero". + // // should be "zero". //linked_and_embedded_def = 2, // // The geometry for the instance definition // // is saved in archives. Complete source @@ -195,7 +195,7 @@ public: unsigned int idef_type_as_unsigned ); - // Bits that identify subsets of the instance defintion + // Bits that identify subsets of the instance definition // fields. These bits are used to determine which fields to // set when an ON_InstanceDefinition class is used to // modify an existing instance definition. @@ -463,7 +463,7 @@ public: /* Description: - This property applies when an instance definiton is linked. + This property applies when an instance definition is linked. Returns: true: When reading the file that defines the content of the linked instance definition, @@ -498,7 +498,7 @@ private: // To avoid having to deal with this obsolete type in // your code, using ON_InstanceDefintion::IdefUpdateType() // to get this value. The IdefUpdateType() function - // with convert the obsolte value to the correct + // with convert the obsolete value to the correct // value. ON_InstanceDefinition::IDEF_UPDATE_TYPE m_idef_update_type = ON_InstanceDefinition::IDEF_UPDATE_TYPE::Static; @@ -532,7 +532,7 @@ public: /// /// ON_InstanceDefinition::LinkedComponentStates specifies how model components - /// (layers, materials, dimension styles, ...) from linked instance defintion files + /// (layers, materials, dimension styles, ...) from linked instance definition files /// are appear in the active model. /// enum class eLinkedComponentAppearance : unsigned char @@ -582,7 +582,7 @@ public: /* Returns: - A SHA-1 hash of these instance defintions properties: + A SHA-1 hash of these instance definitions properties: InstanceGeometryIdList() BoundingBox() @@ -595,7 +595,7 @@ public: /* Returns: - A SHA-1 hash of these instance defintions properties + A SHA-1 hash of these instance definitions properties Description() URL() URL_Tag() @@ -752,7 +752,7 @@ private: // linked instance definition. // // For example, if - // idefA = linked instance defintion referencing file A. + // idefA = linked instance definition referencing file A. // idefX = any type of instance definition found in idefA. // // iref = model geometry reference to idefX. diff --git a/opennurbs_internal_V5_annotation.h b/opennurbs_internal_V5_annotation.h index f05b93e1..cfcb02a5 100644 --- a/opennurbs_internal_V5_annotation.h +++ b/opennurbs_internal_V5_annotation.h @@ -564,7 +564,7 @@ public: Remarks: This gets the literal value of the text, there is no substitution for any "<>" substrings. When a dimension - is drawn, any occurance of "<>" will be replaced + is drawn, any occurrence of "<>" will be replaced with the measured value for the dimension and formatted according to the DimStyle settings. @@ -952,7 +952,7 @@ private: // At this point, the ON_OBSOLETE_V5_Annotation and derived classes // exists for a single purpose - to support reading and writing // V5 (4,3,2) 3dm archives. - // In V5 archives all dimension styles, including per opbject overrrides + // In V5 archives all dimension styles, including per object overrides // were in the archive dimstyle table. In V6 and later, override dimstyles // are managed by the object that uses them. // @@ -1042,7 +1042,7 @@ public: Parameters: V6_dim_linear -[in] annotation_context - [in] - Dimstyle and other informtion referenced by V6_dim_linear or nullptr if not available. + Dimstyle and other information referenced by V6_dim_linear or nullptr if not available. destination - [in] If destination is not nullptr, then the V5 linear dimension is constructed in destination. If destination is nullptr, then the new V5 linear dimension @@ -1323,7 +1323,7 @@ public: Overrides virtual ON_OBSOLETE_V5_Annotation::NumericValue(); Returns: If m_type is ON_INTERNAL_OBSOLETE::V5_eAnnotationType::dtDimDiameter, then the diameter - is returned, othewise the radius is returned. + is returned, otherwise the radius is returned. */ double NumericValue() const override; diff --git a/opennurbs_internal_V5_dimstyle.cpp b/opennurbs_internal_V5_dimstyle.cpp index 2d6aaddb..ceb815f0 100644 --- a/opennurbs_internal_V5_dimstyle.cpp +++ b/opennurbs_internal_V5_dimstyle.cpp @@ -2299,7 +2299,8 @@ bool ON_V5x_DimStyle::OverrideFields(const ON_V5x_DimStyle& src, const ON_V5x_Di case Field::fn_dim_arrow_blockname2: SetArrowBlockId2(copyfrom->ArrowBlockId2()); break; - + default: + break; } } diff --git a/opennurbs_internal_V5_dimstyle.h b/opennurbs_internal_V5_dimstyle.h index 5fde7cd6..7d65b308 100644 --- a/opennurbs_internal_V5_dimstyle.h +++ b/opennurbs_internal_V5_dimstyle.h @@ -391,7 +391,7 @@ public: // Change the fields in this dimstyle to match the fields of the // source dimstyle for all of the fields that are marked overridden in the source - // and to match the parent for all of the fields not marked overriden. + // and to match the parent for all of the fields not marked overridden. // Returns true if any overrides were set. bool OverrideFields( const ON_V5x_DimStyle& source, const ON_V5x_DimStyle& parent); diff --git a/opennurbs_internal_Vx_annotation.cpp b/opennurbs_internal_Vx_annotation.cpp index df7a9403..baee8351 100644 --- a/opennurbs_internal_Vx_annotation.cpp +++ b/opennurbs_internal_Vx_annotation.cpp @@ -551,6 +551,8 @@ ON_OBSOLETE_V5_TextObject* ON_OBSOLETE_V5_TextObject::CreateFromV6TextObject( case ON::TextHorizontalAlignment::Right: justification |= ON_OBSOLETE_V5_Annotation::eTextJustification::tjRight; break; + default: + break; } switch (valign) { @@ -563,6 +565,8 @@ ON_OBSOLETE_V5_TextObject* ON_OBSOLETE_V5_TextObject::CreateFromV6TextObject( case ON::TextVerticalAlignment::Bottom: justification |= ON_OBSOLETE_V5_Annotation::eTextJustification::tjBottom; break; + default: + break; } ON_OBSOLETE_V5_TextObject* V5_text_object diff --git a/opennurbs_internal_unicode_cp.h b/opennurbs_internal_unicode_cp.h index 7939efb6..5175791e 100644 --- a/opennurbs_internal_unicode_cp.h +++ b/opennurbs_internal_unicode_cp.h @@ -52,7 +52,7 @@ // When possible, Rhino and opennurbs replace code page // encodings with UNICODE in RTF. All runtimes strings // use UNICODE UTF-8, UTF-16, or UTF-32 encodings. -// Whenever posssible, the UNICODE encoding is used +// Whenever possible, the UNICODE encoding is used // to retrieve glyph information from fonts. #define ON_DOUBLE_BYTE_CODE_PAGE_SUPPORT #endif @@ -76,7 +76,7 @@ bool ON_IsPotentialWindowsCodePage932DoubleByteEncoding( /* Description: Convert a Windows code page 932 encoded value to a UNICODE code point. - This code page is often used for Japanese glpyhs. + This code page is often used for Japanese glyphs. Parameters: code_page_932_character_value - [in] @@ -119,7 +119,7 @@ bool ON_IsPotentialWindowsCodePage949DoubleByteEncoding( /* Description: Convert a Windows code page 949 encoded value to a UNICODE code point. - This code page is often used for Korean glpyhs. + This code page is often used for Korean glyphs. Parameters: code_page_949_character_value - [in] diff --git a/opennurbs_ipoint.h b/opennurbs_ipoint.h index a49ded0d..01e4b3da 100644 --- a/opennurbs_ipoint.h +++ b/opennurbs_ipoint.h @@ -58,7 +58,7 @@ public: ON_2iPoint& operator-=(const class ON_2iVector&); // It is intentional that points are not added to points to encourage - // code that is clear about what is a location and what is diplacement. + // code that is clear about what is a location and what is displacement. public: /* diff --git a/opennurbs_knot.h b/opennurbs_knot.h index 0ae6c484..98edc052 100644 --- a/opennurbs_knot.h +++ b/opennurbs_knot.h @@ -230,7 +230,7 @@ bool ON_IsValidKnotVector( ON_DECL bool ON_ClampKnotVector( - // Sets inital/final order-2 knots to values in + // Sets initial/final order-2 knots to values in // knot[order-2]/knot[cv_count-1]. int, // order (>=2) int, // cv count @@ -240,7 +240,7 @@ bool ON_ClampKnotVector( ON_DECL bool ON_MakeKnotVectorPeriodic( - // Sets inital and final order-2 knots to values + // Sets initial and final order-2 knots to values // that make the knot vector periodic int, // order (>=2) int, // cv count diff --git a/opennurbs_layer.h b/opennurbs_layer.h index 4ba1048d..ba2fd28a 100644 --- a/opennurbs_layer.h +++ b/opennurbs_layer.h @@ -361,8 +361,8 @@ public: /* Description: - The persistent visbility setting is used for layers whose - visibilty can be changed by a "parent" object. A common case + The persistent visibility setting is used for layers whose + visibility can be changed by a "parent" object. A common case is when a layer is a child layer (ON_Layer.m_parent_id is not nil). In this case, when a parent layer is turned off, then child layers are also turned off. The persistent @@ -378,7 +378,7 @@ public: and the parent layer is turned on (after being off), then this layer will continue to be off. Remarks: - When the persistent visbility is not explicitly set, this + When the persistent visibility is not explicitly set, this function returns the current value of IsVisible(). See Also: ON_Layer::SetPersistentVisibility @@ -404,7 +404,7 @@ public: /* Description: Remove any explicit persistent visibility setting from this - layer. When persistent visibility is not explictly set, + layer. When persistent visibility is not explicitly set, the value of ON_Layer::IsVisible() is used. Remarks: See ON_Layer::PersistentVisibility for a detailed description @@ -639,7 +639,7 @@ public: /* Description: - Remove any explicity persistent locking settings from this + Remove any explicitly persistent locking settings from this layer. Remarks: See ON_Layer::PersistentLocking for a detailed description of @@ -844,7 +844,7 @@ private: // // m_extension_bits & 0x01: // The value of ( m_extension_bits & 0x01) is used to speed - // common per viewport visiblity and color queries. + // common per viewport visibility and color queries. // 0x00 = there may be per viewport settings on this layer. // 0x01 = there are no per viewport settings on this layer. // diff --git a/opennurbs_light.h b/opennurbs_light.h index fe6588ed..1872e7d5 100644 --- a/opennurbs_light.h +++ b/opennurbs_light.h @@ -177,7 +177,7 @@ public: ////////// // The spot exponent varies from 0.0 to 128.0 and provides - // an exponential interface for controling the focus or + // an exponential interface for controlling the focus or // concentration of a spotlight (like the // OpenGL GL_SPOT_EXPONENT parameter). The spot exponent // and hot spot parameters are linked; changing one will @@ -189,7 +189,7 @@ public: ////////// // The hot spot setting runs from 0.0 to 1.0 and is used to - // provides a linear interface for controling the focus or + // provides a linear interface for controlling the focus or // concentration of a spotlight. // A hot spot setting of 0.0 corresponds to a spot exponent of 128. // A hot spot setting of 1.0 corresponds to a spot exponent of 0.0. diff --git a/opennurbs_line.h b/opennurbs_line.h index 10922a2a..4af7eb81 100644 --- a/opennurbs_line.h +++ b/opennurbs_line.h @@ -399,12 +399,12 @@ public: // Returns: // Index of edge opposite to m_V[i] that is longest. - // When lenghts are equal, lowest index has priority. + // When lengths are equal, lowest index has priority. unsigned char LongestEdge() const; // Returns: // Index of edge opposite to m_V[i] that is shortest. - // When lenghts are equal, lowest index has priority. + // When lengths are equal, lowest index has priority. unsigned char ShortestEdge() const; // Returns: @@ -429,7 +429,7 @@ public: // Returns: // N = ( b-a) X ( c-a) - // where a,b,c are the verticies + // where a,b,c are the vertices // See Also: // ON_Triangle UnitNormal() ON_3dVector Normal() const; @@ -437,7 +437,7 @@ public: // Returns: // Normal().Unitize() // Notes: - // Ensure !IsDegenerate() to gaurentee that UnitNormal().Length()==1 + // Ensure !IsDegenerate() to guarantee that UnitNormal().Length()==1 // and the result is not just a bunch of noise. Can return zero vector // in some degenerate cases. ON_3dVector UnitNormal() const; @@ -445,7 +445,7 @@ public: // Returns: // Plane containing Triangle with normal given by UnitNormal(). // Notes: - // Ensure !IsDegenerate() to gaurentee meaningful result + // Ensure !IsDegenerate() to guarantee meaningful result ON_PlaneEquation PlaneEquation() const; /* @@ -580,7 +580,7 @@ public: void Spin(unsigned char move); public: - ON_3dPoint m_V[3]; // verticies + ON_3dPoint m_V[3]; // vertices }; /* diff --git a/opennurbs_linestyle.h b/opennurbs_linestyle.h index d6a42a9a..d8c018b1 100644 --- a/opennurbs_linestyle.h +++ b/opennurbs_linestyle.h @@ -59,7 +59,7 @@ public: ON_UUID m_viewport_id; // identifies the ON_Viewport // If nil, then the display material // will be used in all viewports - // that are not explictly referenced + // that are not explicitly referenced // in other ON_DisplayMaterialRefs. ON_UUID m_display_material_id; // id used to find display attributes diff --git a/opennurbs_locale.h b/opennurbs_locale.h index 3f8ea403..cba32ff0 100644 --- a/opennurbs_locale.h +++ b/opennurbs_locale.h @@ -208,7 +208,7 @@ public: /* Returns: ISO 639 language code. - When avilable, two letter codes from ISO 639-1 are prefered. + When available, two letter codes from ISO 639-1 are preferred. Remarks: The InvariantCulture.LanguageCode() is "". See Also: @@ -306,7 +306,7 @@ public: ISO 639 language code. - When avilable, two letter codes from ISO 639-1 are prefered. + When available, two letter codes from ISO 639-1 are preferred. http://www.iso.org/iso/language_codes