OpenNURBSObject¶
- class py3dm.OpenNURBSObject¶
Python bindings for the openNURBS
ON_Objectclass.ON_Object: pure virtual base class for all classes that must provide runtime class id or support object level 3DM serialization. Returns- is_corrupt(repair: bool, silent_error: bool, text_log: TextLog) bool¶
Check for corrupt data values that are likely to cause crashes.
- Parameters:
repair (bool) – If
True,const_cast<>will be used to change the corrupt data so that crashes are less likely.silent_error (bool) – If
True, ON_ERROR will not be called when corruption is detected.text_log (TextLog) – If text_log is not null, then a description of corruption is printed using text_log.
Notes
Ideally,
is_corruptwould be a virtual function onON_Object, but doing that at this point would break the public SDK.
- is_valid(text_log: TextLog | None = None) bool¶
Tests an object to see if its data members are correctly initialized.
- Parameters:
text_log (TextLog, optional) – If the object is not valid and
text_logis notNone, then a brief english description of the reason the object is not valid is appended to the log. The information appended totext_logis suitable for low-level debugging purposes by programmers and is not intended to be useful as a high level user interface tool.- Returns:
success –
Trueif the object is valid orFalseif the object is invalid, uninitialized, etc.- Return type:
- remove_user_string(key: str) bool¶
Remove a user string in the form of a
key-valuestring pair from the object.