Rhino C++ API
8.10
|
#include <rhinoSdkDoc.h>
Public Types | |
enum | display_engine_id { display_engine_none = 0, display_engine_opengl = 1, display_engine_direct3d = 2, display_engine_count } |
Attributes. More... | |
Public Member Functions | |
CRhinoDoc (class CRhDoc &doc) | |
double | AbsoluteTolerance () const |
bool | ActivateCommandWindowCaret () |
const CRhinoCommand * | ActiveCommand () const |
const CRhinoCommandContext::COMMAND_STYLE | ActiveCommandStyle () const |
bool | ActiveConstructionPlane (ON_Plane &plane) |
unsigned int | ActiveRhinoViewSerialNumber () const |
ON::active_space | ActiveSpace () const |
const ON_UnitSystem | ActiveSpaceUnits () const |
CRhinoView * | ActiveView () const |
ON_RUNTIME_APPLE. More... | |
CRhinoBrepObject * | AddBrepObject (const ON_Brep &brep, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
CRhinoCurveObject * | AddCurveObject (const ON_Arc &arc, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
CRhinoCurveObject * | AddCurveObject (const ON_BezierCurve &bezier_curve, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
CRhinoCurveObject * | AddCurveObject (const ON_Circle &circle, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
CRhinoCurveObject * | AddCurveObject (const ON_Curve &curve, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
CRhinoCurveObject * | AddCurveObject (const ON_Line &line, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
CRhinoCurveObject * | AddCurveObject (const ON_Polyline &polyline, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
unsigned int | AddCustomUndoEvent (CRhinoUndoEventHandler *undo_event_handler) |
const class CRhinoDimAngular * | AddDimAngularObject (ON_Arc arc, double offset, const ON_DimStyle *dim_style=nullptr, const ON_3dmObjectAttributes *attributes=nullptr) |
const class CRhinoDimAngular * | AddDimAngularObject (ON_Line line1, ON_3dPoint point_on_line1, ON_Line line2, ON_3dPoint point_on_line2, ON_3dPoint point_on_angular_dimension_arc, bool bSetExtensionPoints, const ON_DimStyle *dim_style=nullptr, const ON_3dmObjectAttributes *attributes=nullptr) |
const class CRhinoDimLinear * | AddDimLinearObject (ON_3dPoint extension_point0, ON_3dPoint extension_point1, ON_3dPoint dimension_line_point, ON_3dVector plane_normal, const ON_DimStyle *dim_style=nullptr, const ON_3dmObjectAttributes *attributes=nullptr) |
const class CRhinoDimLinear * | AddDimLinearObject (ON_3dPoint extension_point0, ON_3dPoint extension_point1, ON_Line dimension_line, ON_3dVector plane_normal, const ON_DimStyle *dim_style=nullptr, const ON_3dmObjectAttributes *attributes=nullptr) |
CRhinoExtrusionObject * | AddExtrusionObject (const ON_Extrusion &extrusion, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, bool bReference=NULL) |
void | AddGrip (CRhinoGripObject &grip) |
const class CRhinoLeader * | AddLeaderObject (const wchar_t *leader_text, const ON_Plane &plane, int leader_polyline_point_count, const ON_3dPoint *leader_polyline_points, const ON_DimStyle *dim_style=nullptr, const ON_3dmObjectAttributes *attributes=nullptr) |
CRhinoMeshObject * | AddMeshObject (const ON_Mesh &mesh, bool bRequireValidMesh, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
CRhinoMeshObject * | AddMeshObject (const ON_Mesh &mesh, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
void | AddMruCommand (const wchar_t *cmd, const wchar_t *display_string, const wchar_t *shortcut, const UINT modifier_flags) |
void | AddMruCommand (const wchar_t *cmd, const wchar_t *display_string=NULL) |
bool | AddObject (CRhinoObject *object, bool bReferenceObject=false, bool bInstanceDefinition=false) |
CRhinoPointCloudObject * | AddPointCloudObject (int point_count, const ON_3dPoint *point_list, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
CRhinoPointObject * | AddPointObject (const ON_3dPoint &point, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
CRhinoSurfaceObject * | AddSurfaceObject (const ON_Surface &surface, const ON_3dmObjectAttributes *pAttributes=NULL, CRhinoHistory *pHistory=NULL, BOOL32 bReference=NULL) |
const class CRhinoText * | AddTextObject (const wchar_t *text, const ON_Plane &plane, const ON_3dPoint text_location, const ON_DimStyle *dim_style=nullptr, const ON_3dmObjectAttributes *attributes=nullptr) |
double | AngleToleranceDegrees () const |
double | AngleToleranceRadians () const |
void | AppendPageView (class CRhinoPageView &pageView) |
int | ArrangeViews (bool bMakeVisible) const |
bool | Audit (ON_TextLog *text_log, bool bAttemptRepair) |
BOOL32 | AutoDelete (void) const |
unsigned int | AutomaticallySetActiveRhinoViewSerialNumber (unsigned int ineligible_rhino_view_sn) |
bool | BeginUndoRecord (const CRhinoCommand *) |
bool | BeginUndoRecord (const wchar_t *sActionDescription) |
unsigned int | BeginUndoRecordEx (const CRhinoCommand *) |
unsigned int | BeginUndoRecordEx (const wchar_t *sActionDescription) |
void | BeginWaitCursor () |
const ON_BoundingBox & | BoundingBox (bool bTight, bool bIncludeCustomRenderMeshes, bool bIncludeCurves) const |
class CRhCameraIcon * | CameraIcon (CRhinoView *view=0) const |
void | ChangeTitleToUnNamed () |
void | ClearMarks (CRhinoObjectIterator &, int=0) |
void | ClearPathName (void) |
void | ClearReadFileResult () |
void | ClearRedoRecords () |
void | ClearUndoRecords (bool=false) |
void | ClearUndoRecords (unsigned int undo_record_sn, bool bPurgeDeletedObjects) |
unsigned int | CloseAllOtherDocuments () const |
bool | CloseRhinoView (CRhinoView *pView) |
const CRhinoApp::CRhMruCommandRecord * | CommandToRepeat () const |
const ON_wString | ComponentNameFromCandidateName (ON_ModelComponent::Type component_type, bool bMakeUniqueAndValid, const wchar_t *candidate_name) const |
int | ConstructionPlaneCount () const |
const class IRhRdkContents & | Contents () const |
int | CreateDefaultDimstyles (ON_ClassArray< ON_DimStyle > &dimstyles) |
class CRhinoDimAngular * | CreateDimAngularObject (const ON_DimAngular &dim_angular, const ON_3dmObjectAttributes *attributes=nullptr) const |
class CRhinoDimLinear * | CreateDimLinearObject (const ON_DimLinear &dim_linear, const ON_3dmObjectAttributes *attributes=nullptr) const |
class CRhinoLeader * | CreateLeaderObject (const ON_Leader &leader, const ON_3dmObjectAttributes *attributes=nullptr) const |
class CRhinoLeader * | CreateLeaderObject (const wchar_t *leader_text, const ON_Plane &plane, int leader_polyline_point_count, const ON_3dPoint *leader_polyline_points, const ON_DimStyle *dim_style=nullptr, const ON_3dmObjectAttributes *attributes=nullptr) const |
unsigned int | CreateRhinoPageView (const wchar_t *title=nullptr) |
unsigned int | CreateRhinoView (const ON_3dmView *view, bool bShowView) |
unsigned int | CreateRhinoView (const ON_3dmView *view, CRuntimeClass *pMfcViewRuntimeClass, bool bShowView) |
class CRhinoText * | CreateTextObject (const ON_Text &text, const ON_3dmObjectAttributes *attributes=nullptr) const |
class CRhinoText * | CreateTextObject (const wchar_t *text, const ON_Plane &plane, const ON_3dPoint text_location, const ON_DimStyle *dim_style=nullptr, const ON_3dmObjectAttributes *attributes=nullptr) const |
void | CreateViewLayout (int view_count, const ON_3dmView *views) |
int | CullUndoRecords () |
int | CullUndoRecords (int min_step_count, size_t max_memory_size_bytes) |
const class IRhRdkCurrentEnvironment & | CurrentEnvironment () const |
CRhUndoRecord * | CurrentUndoRecord () const |
unsigned int | CurrentUndoRecordSerialNumber () const |
const ON_3dmObjectAttributes | DefaultObjectAttributes () const |
void | DefaultViewLayout () |
void | DefaultViewLayout (ON_BoundingBox model_bbox) |
void | DeferredRedraw (void) |
bool | DeleteObject (const CRhinoObjRef &objref, bool bQuiet=true, bool bIgnoreModes=false) |
const CRhinoDimStyleContext | DimStyleContext () const |
int | DisplayEngineStatus (int engine_id) const |
const class IRhRdkDithering & | Dithering () const |
enum CRhinoDocStatus | DocStatus () const |
unsigned int | DocumentMissingFontTest (bool bInteractive, unsigned int begin_dimstyle_search_at_sn, unsigned int begin_object_search_at_sn) |
BOOL32 | DoFileSave () |
BOOL32 | DoSave (LPCTSTR lpszPathName, BOOL32 bReplace=TRUE) |
void | EnableCameraIcon (CRhinoView *view) |
CRhinoGet * | EnableGet (CRhinoGet *) |
void | EnableUndoRecording (bool=true) |
void | EnableValidateNewObjects (bool bEnable) |
bool | EndUndoRecord () |
<- OBSOLETE More... | |
bool | EndUndoRecord (unsigned int undo_record_sn) |
bool | EndUndoRecord (unsigned int undo_record_sn0, unsigned int undo_record_sn1) |
void | EndWaitCursor () |
void | EnterCommand (const CRhinoCommand *cmd, unsigned int *undo_record_sn) |
class CRhEventManager * | EventManager (void) const |
ON_RUNTIME_APPLE. More... | |
CRhinoCommand::result | ExecuteCommand (const wchar_t *cmd_name) |
void | ExitCommand (unsigned int rhino_doc_sn0, unsigned int rhino_doc_sn1, const CRhinoCommand *cmd, unsigned int undo_record_sn) |
const class CRhRdkContent * | FindContentInstance (const ON_UUID &instanceId) const |
bool | FindView (const wchar_t *title, ON_3dmView &view, bool include_standard_views=true, bool include_page_views=true) |
bool | FindView (const wchar_t *title, ON_3dmView &view, CRhinoView::ViewTypeFilter view_types) |
bool | FindView (const wchar_t *title, ON_3dmView &view, CRhinoView::ViewTypeFilter view_types) const |
void | FlashObjectList (ON_SimpleArray< const CRhinoObject * > &obj_list, int flash_style=1) |
void | FourViewLayout (bool bUseMatchingViews=false) |
void | FourViewLayout (ON_BoundingBox model_bbox, bool bThirdAngleProjection, bool bUseMatchingViews) |
void | FourViewLayout (ON_BoundingBox model_bbox, bool bUseMatchingViews=false) |
void | Get3dmAnnotationContext (class ON_3dmAnnotationContext &annotation_context) const |
void | Get3dmSettings (class ON_3dmSettings &settings) const |
void | GetDefaultObjectAttributes (ON_3dmObjectAttributes &) const |
attributes to use for new object More... | |
CDocTemplate * | GetDocTemplate () const |
virtual void | GetEmbeddedFilesList (TextureReportFilter filter, ON_ClassArray< ON_wString > &sFiles) const |
POSITION | GetFirstViewPosition () const |
int | GetMRUCommands (ON_ClassArray< ON_wString > &display_strings, ON_ClassArray< ON_wString > ¯os) const |
CView * | GetNextView (POSITION &rPosition) const |
int | GetPageViewNumber (const class CRhinoPageView &pageView) const |
ON_wString | GetPathName () const |
CRhinoDimstyleTable* DimstyleTable();. More... | |
int | GetRedoRecords (ON_SimpleArray< class CRhUndoRecord * > &) const |
ON_wString | GetTitle (void) const |
int | GetUndoRecords (ON_SimpleArray< class CRhUndoRecord * > &) const |
bool | GetUserString (const wchar_t *key, ON_wString &string_value) const |
int | GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const |
int | GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const |
int | GetViewList (ON_SimpleArray< CRhinoView * > &view_list, bool include_standard_views=true, bool include_page_views=true) |
int | GetViewList (ON_SimpleArray< CRhinoView * > &view_list, CRhinoView::ViewTypeFilter filter) const |
bool | GetWriteFileOptonsAndWrite (CRhinoFileWriteOptions fwo_in) |
bool | GetWriteFileOptonsAndWrite (CRhinoFileWriteOptions fwo_in, CRhinoFileWriteOptions &fwo_out) |
const class IRhRdkGroundPlane & | GroundPlane () const |
bool | HasUndoRecords () const |
bool | HideObject (const CRhinoObjRef &objref, bool bIgnoreLayerMode=false) |
hides object in document More... | |
bool | ImportPlugInFileReadInProgress () const |
int | InCommand (bool bIgnoreScriptRunnerCommands=false) const |
CRhinoGet * | InGet () const |
CRhinoGetColor * | InGetColor () const |
Returns non-null if currently in a CRhinoGetString::GetString();. More... | |
CRhinoGetMeshes * | InGetMeshes () const |
Returns non-null if currently in a CRhinoGetString::GetString();. More... | |
CRhinoGetNumber * | InGetNumber () const |
Returns non-null if currently in a CRhinoGetString::GetString();. More... | |
CRhinoGetObject * | InGetObject () const |
Returns non-null if currently in a CRhinoGetPoint::GetObject();. More... | |
CRhinoGetOption * | InGetOption () const |
Returns non-null if currently in a CRhinoGetString::GetString();. More... | |
CRhinoGetPoint * | InGetPoint () const |
Returns non-null if currently in a CRhinoGetPoint::GetPoint();. More... | |
CRhinoGetString * | InGetString () const |
Returns non-null if currently in a CRhinoGetString::GetString();. More... | |
bool | InScriptRunnerCommand () const |
void | InvalidateBoundingBox () const |
unsigned int | InvalidObjectCount () const |
bool | IsAvailable () const |
bool | IsClosing () const |
bool | IsCreating () const |
bool | IsDocumentLocked () const |
bool | IsDocumentReadOnly () const |
bool | IsHeadless () const |
bool | IsInitializing () const |
BOOL32 | IsModified (void) const |
bool | IsOpening () const |
const class IRhRdkLinearWorkflow & | LinearWorkflow () const |
bool | LockObject (const CRhinoObjRef &objref, bool bIgnoreLayerMode=false) |
locks object in document More... | |
const ON_Object * | LookupDocumentObject (ON_UUID id, bool bIgnoreDeleted) const |
int | LookupObject (const CRhinoGroup &, ON_SimpleArray< CRhinoObject * > &) const |
int | LookupObject (const CRhinoLayer &, ON_SimpleArray< const CRhinoObject * > &) const |
int | LookupObject (const CRhinoLayer &, ON_SimpleArray< CRhinoObject * > &) const |
int | LookupObject (const CRhinoLinetype &, ON_SimpleArray< CRhinoObject * > &) const |
int | LookupObject (const CRhinoMaterial &, ON_SimpleArray< CRhinoObject * > &) const |
const CRhinoObject * | LookupObject (ON_UUID object_uuid) const |
use CRhinoObjectIterator to iterate through CRhinoObject list(s) More... | |
const CRhinoObject * | LookupObjectByRuntimeSerialNumber (unsigned int runtime_serial_number) const |
const CRhinoObject * | LookupObjectByRuntimeSerialNumber (unsigned int runtime_serial_number, CRhinoObjectIterator &it) const |
const ON_ComponentManifest & | Manifest () const |
bool | ModelComponentCheck (const ON_ModelComponent *model_component, int table_index, ON_wString *error_description) const |
const wchar_t * | ModelName () const |
const ON_UnitSystem & | ModelUnits () const |
bool | ModifyObjectAttributes (const CRhinoObjRef &objref, const CRhinoObjectAttributes &new_attributes, BOOL32 bQuiet=false) |
AFX_MODULE_STATE * | ModuleState (void) const |
CRhinoObject * | MorphObject (const CRhinoObject *old_object, const ON_SpaceMorph &morph, bool bAddNewObjectToDoc, bool bDeleteOriginal) |
const ON_ClassArray< CRhinoApp::CRhMruCommandRecord > & | MruCommandList () const |
const wchar_t * | MruMenuString () const |
MRU Commands for this document. More... | |
unsigned int | NewView (const ON_3dmView &new_view) |
unsigned int | NewView (const ON_3dmView &new_view, bool bShowView) |
bool | NextConstructionPlane (ON_Plane &plane) |
unsigned int | NextUndoRecordSerialNumber () const |
bool | ObjectFinderIsValid (ON_TextLog *text_log, unsigned int max_error_count, size_t *sn_count, size_t *id_count) const |
void | OnCloseDocument () |
BOOL32 | OnNewDocument () |
BOOL32 | OnOpenDocument (LPCTSTR lpszPathName) |
BOOL32 | OnSaveDocument (LPCTSTR lpszPathName) |
const ON_UnitSystem & | PageUnits () const |
void | PageViewDetailIsActive (BOOL32 isActive) |
int | PickObjects (const CRhinoPickContext &, CRhinoObjRefArray &) const |
PickObjects() returns number of objects added to array. More... | |
int | PickObjects (const CRhinoPickContext &, CRhinoObjRefArray &, bool bSilent) const |
PickObjects() returns number of objects added to array. More... | |
class CRhDocSerializeStatus * | PopSerializeStatus () |
const class IRhRdkPostEffects & | PostEffects () const |
bool | PrevConstructionPlane (ON_Plane &plane) |
CRhinoDocProperties & | Properties () |
const CRhinoDocProperties & | Properties () const |
int | PurgeAnonymousUserTable (bool bQuiet) |
unsigned int | PurgeCyclicInstanceReferences () |
unsigned int | PurgeLinkedIDefModel (unsigned int linked_idef_model_sn) |
bool | PurgeObject (CRhinoObject *&object) |
unsigned int | PurgeWorkSessionReferenceModel (unsigned int worksession_ref_model_sn) |
void | PushConstructionPlane (const ON_Plane &plane) |
void | PushSerializeStatus (class CRhDocSerializeStatus *) |
const class CRhRdkDocument & | RdkDocument () const |
ON::ReadFileResult | Read3DM (ON_BinaryArchive &archive, class CRhFileReadOptions &fro3dm) |
const class CRhFileReadOptions * | ReadFileOptions () const |
ON::ReadFileResult | ReadFileResult () const |
int | ReadFileVersion () const |
bool | ReadingAncillaryModel (unsigned int *worksession_ref_model_sn, const CRhinoInstanceDefinition **idef, ON_UUID *grandparent_layer_id) const |
bool | ReadPlugInFile (class CRhinoFileImportPlugIn *import_plug_in, int file_extension_index, class CRhFileReadOptions &fro) |
bool | Redo () |
bool | RedoActive () const |
void | Redraw () |
void | Redraw (unsigned int display_hint) |
void | RedrawViewHelper (CRhinoView *view, int view_redraw_display_hint) |
void | Regen () |
void | RemoveGrip (CRhinoGripObject &grip) |
void | RemovePageView (class CRhinoPageView &pageView) |
const class IRhRdkRenderChannels & | RenderChannels () const |
void | RepeatCommand () |
repeats previous command More... | |
void | ReplaceModelViews (int view_count, const ON_3dmView *views) |
const CRhinoBrepObject * | ReplaceObject (const CRhinoObjRef &objref, const ON_Brep &brep) |
const CRhinoCurveObject * | ReplaceObject (const CRhinoObjRef &objref, const ON_Curve &curve) |
const CRhinoExtrusionObject * | ReplaceObject (const CRhinoObjRef &objref, const ON_Extrusion &extrusion) |
const CRhinoObject * | ReplaceObject (const CRhinoObjRef &objref, const ON_Geometry &geometry, bool bIgnoreModes) |
const CRhinoMeshObject * | ReplaceObject (const CRhinoObjRef &objref, const ON_Mesh &mesh) |
const CRhinoSubDObject * | ReplaceObject (const CRhinoObjRef &objref, const ON_SubD &subd) |
const CRhinoSurfaceObject * | ReplaceObject (const CRhinoObjRef &objref, const ON_Surface &surface) |
bool | ReplaceObject (const CRhinoObjRef &objref, CRhinoObject *new_object, bool bIgnoreModes, bool bSkipInCommandTest) |
bool | ReplaceObject (const CRhinoObjRef &objref, CRhinoObject *new_object, bool bIgnoreModes=false) |
const CRhinoPointObject * | ReplaceObject (const CRhinoObjRef &objref, ON_3dPoint point) |
const CRhinoSubDObject * | ReplaceObject (const CRhinoObjRef &objref, ON_SubDRef subd_ref) |
void | ResetViewPipelines (void) |
void | RestoreWaitCursor () |
call after MessageBox More... | |
bool | RhinoFileReadInProgress () const |
bool | RunMenuScript (const wchar_t *s) |
void | RunMruCommand (int cmd_index) |
void | RunMruFavoriteCommand (int cmd_index) |
const CRhinoCommand * | RunningCommand (int i) const |
const ON_SimpleArray< const CRhinoCommand * > & | RunningCommandsStack () |
bool | RunScript (const class CRhinoScriptContext &script) |
bool | RunScript (const wchar_t *script, int echo_mode=1) |
bool | RunScriptEx (const wchar_t *script, const wchar_t *mruDisplayString, int echo_mode=1) |
unsigned int | RuntimeSerialNumber () const |
const class IRhRdkSafeFrame & | SafeFrame () const |
CDocument * | SafeMFCDoc (void) |
const CDocument * | SafeMFCDoc (void) const |
bool | SaveDocument (bool bUseBatchMode) |
bool | SaveModified (bool bUseBatchMode) |
BOOL32 | SaveModified (void) |
int | ScaleObjects (CRhinoObjectIterator &it, double scale, bool bDeleteOriginal, bool bAddTransformHistory, bool bTransformReferenceObjects) |
class CRhDocSerializeStatus * | SerializeStatus () const |
bool | SetActiveRhinoViewSerialNumber (unsigned int new_active_rhino_view_sn) |
void | SetAutoDelete (BOOL32 bAutoDelete) |
void | SetCommandToRepeat (const CRhinoApp::CRhMruCommandRecord &rec) |
void | SetModelName (const char *) |
void | SetModelName (const wchar_t *) |
void | SetModifiedFlag (BOOL32 bModified=TRUE) |
void | SetMruMenuString (LPCTSTR str) |
void | SetPageViewNumber (class CRhinoPageView &pageView, int page) |
void | SetPathName (LPCTSTR, BOOL32 bAddToMRU=TRUE) |
void | SetReadFileResult (ON::ReadFileResult read_file_result) |
void | SetRedrawDisplayHint (unsigned int display_hint, bool bShadedOnly=false) const |
unsigned int | SetSubDAppearance (ON_SubDComponentLocation subd_appearance) |
void | SetTitle (LPCTSTR) |
bool | SetUserString (const wchar_t *key, const wchar_t *string_value) |
bool | ShowObject (const CRhinoObjRef &objref, bool bIgnoreLayerMode=false) |
shows hidden object More... | |
const class IRhRdkSkylight & | Skylight () const |
BOOL32 | SnapTo (const CRhinoSnapContext &snap_context, CRhinoSnapEvent &snap_event, const ON_SimpleArray< ON_3dPoint > *construction_points=0, const ON_SimpleArray< ON_3dPoint > *snap_points=0, const ON_SimpleArray< ON_3dPoint > *int_snap_points=0) const |
const ON_SimpleArray< class CRhinoPageView * > & | SortedPageViewList () |
void | StatusBarProgressMeterEnd () |
int | StatusBarProgressMeterPos (const wchar_t *pszLabel, int nPos, bool bAbsolute) |
int | StatusBarProgressMeterPos (int nPos, bool bAbsolute=true) |
int | StatusBarProgressMeterStart (int nLower, int nUpper, const wchar_t *pszLabel=nullptr, bool bEmbedLabel=true, bool bShowPercent=true) |
ON_SubDComponentLocation | SubDAppearance () const |
const class IRhRdkSun & | Sun () const |
const CRhinoDocTableReference & | Table (ON_ModelComponent::Type component_type) const |
const wchar_t * | TemplateFileUsed () const |
virtual TextureReportResult | TextureReport (TextureReportFilter initialFilter, bool bAllowAbort, bool bForceDisplayIfEmpty) |
void | ThreeViewLayout (bool bUseMatchingViews=false) |
void | ThreeViewLayout (ON_BoundingBox model_bbox, bool bUseMatchingViews=false) |
CRhinoObject * | TransformObject (const CRhinoObject *old_object, const ON_Xform &xform, bool bAddNewObjectToDoc, bool bDeleteOriginal, bool bAddTransformHistory) |
CRhinoObject * | TransformObject (const CRhinoObject *old_object, const ON_Xform &xform, bool bAddNewObjectToDoc, bool bDeleteOriginal, bool bAddTransformHistory, bool bTransformReferenceObjects, ON_2dexMap *pGroupMap=0) |
CRhinoObject * | TransformObject (CRhinoObjRef &objref, const ON_Xform &xform, bool bDeleteOriginal=true, bool bIgnoreModes=false, bool bAddTransformHistory=false) |
int | TransformObjects (CRhinoObjectIterator &it, const ON_Xform &xform, bool bDeleteOriginal, bool bIgnoreModes, bool bAddTransformHistory, bool bTransformReferenceObjects) |
As of Sept 14, 2017, This is not used by rhino. More... | |
int | TransformObjects (CRhinoObjectIterator &it, const ON_Xform &xform, bool bDeleteOriginal=true, bool bIgnoreModes=false, bool bAddTransformHistory=false) |
As of Sept 14, 2017, This is not used by rhino. More... | |
bool | UndeleteObject (const CRhinoObject *object) |
bool | Undo (class CRhUndoRecord *=NULL) |
bool | UndoActive () const |
int | UndoRecordCount () const |
bool | UndoRecordingIsActive () const |
true if actually happening now More... | |
bool | UndoRecordingIsEnabled () const |
true if permitted More... | |
size_t | UndoRecordMemorySize () const |
ON::LengthUnitSystem | UnitSystem () const |
OBSOLETE - USE ModelUnits or PageUnits. More... | |
bool | UnlockObject (const CRhinoObjRef &objref, bool bIgnoreLayerMode=false) |
unlocks locked object More... | |
int | UnselectAll (BOOL32 bIgnorePersistentSelections=false) |
void | UpdateAllViews (CView *pSender, LPARAM lHint=0L, CObject *pHint=NULL) |
class CRhAnonymousUserTable * | UserDataTable (void) |
bool | ValidateNewObjects () const |
const CRhinoView * | ViewFromViewportId (ON_UUID viewport_id) const |
void | ViewModified (CRhinoView *) |
bool | Write3dmFile (ON_BinaryArchive &binary_archive, CRhinoFileWriteOptions fwo_in) |
bool | Write3dmFile (ON_BinaryArchive &binary_archive, CRhinoFileWriteOptions fwo_in, CRhinoFileWriteOptions &fwo_out) |
bool | WriteFile (CRhinoFileWriteOptions fwo_in) |
bool | WriteFile (CRhinoFileWriteOptions fwo_in, CRhinoFileWriteOptions &fwo_out) |
const class CRhinoFileWriteOptions * | WriteFileInProgress () const |
bool | WriteFilePathAndOptionsDialog (CRhinoFileWriteOptions fwo_in, unsigned int minimum_rhino_3dm_version_rescrition, CRhinoFileWriteOptions &fwo_out, HWND pWndParent=0) const |
Static Public Member Functions | |
static unsigned int | CloseAllDocuments () |
static bool | CloseDocument (unsigned int rhino_doc_sn) |
static unsigned int | CreateDocument (const wchar_t *sModelTemplateFileName, const CRhinoCreateDocumentOptions *create_document_options) |
static const wchar_t * | DefaultDimstyleNamePrefix () |
< SHARED_HANDLERS More... | |
static unsigned int | DocumentCount () |
static CRhinoDoc * | FromRuntimeSerialNumber (unsigned int doc_runtime_serial_number) |
static unsigned int | GetDocList (ON_SimpleArray< unsigned int > &rhino_doc_sn_list) |
static unsigned int | GetDocList (unsigned int rhino_doc_sn0, size_t rhino_doc_sn_list_capacity, unsigned int *rhino_doc_sn_list) |
static void | GetUntitledDocName (ON_wString &sUntitledDocName) |
static unsigned int | HeadRuntimeSerialNumber () |
static bool | IsValidDocPointer (const void *rhino_doc) |
static bool | IsValidDocReference (const CRhinoDoc &rhino_doc) |
static unsigned int | ModelessUserInterfaceDocSerialNumber () |
static unsigned int | NextRuntimeSerialNumber () |
static unsigned int | OpenDocument (const wchar_t *sModelFileName, const CRhinoOpenDocumentOptions *open_document_options) |
static void | RecreateRhinoViewHWnds () |
static void | RedrawAllDocs () |
static void | RedrawAllDocs (unsigned int display_hint) |
static void | RedrawDoc (unsigned int rhino_doc_sn) |
static unsigned int | RuntimeSerialNumber (const CRhinoDoc *rhino_doc) |
static bool | SaveAllModifiedDocuments () |
static bool | SaveAllModifiedDocuments (bool bUseBatchMode) |
static unsigned int | TailRuntimeSerialNumber () |
static unsigned int | TargetDocSerialNumber () |
Public Attributes | |
class CRhDocSdkExtension * | m__doc_sdk_extension |
class CRhIDefUpdate * | m__idef_update |
runtime information used when updating linked instance definitions More... | |
CRhinoBitmapTable | m_bitmap_table |
CRhinoDimStyleTable | m_dimstyle_table |
CRhinoGroupTable | m_group_table |
CRhinoHatchPatternTable | m_hatchpattern_table |
CRhinoHistoryRecordTable | m_history_record_table |
CRhinoInstanceDefinitionTable | m_instance_definition_table |
CRhinoLayerTable | m_layer_table |
CRhinoLightTable | m_light_table |
CRhinoLinetypeTable | m_linetype_table |
CRhinoMaterialTable | m_material_table |
class CRhSelSetManager * | m_selset_manager |
CRhinoTextureMappingTable | m_texture_mapping_table |
Static Public Attributes | |
static const unsigned int | NullRuntimeSerialNumber |
Friends | |
class | C_EW_Manager |
class | CRhDoc |
class | CRhinoApp |
class | CRhinoFileMenu |
class | CRhinoInstanceDefinitionTable |
class | CRhinoLayerTable |
class | CRhinoObjectIterator |
class | CRhinoRead3dmHelper |
class | CRhPushPopDocStatus |
int | RhinoMemoryErrorHandler (int) |
SDK classes. More... | |
void | RhSetTemplateFileUsed (CRhinoDoc &, const wchar_t *) |
CRhinoDoc::CRhinoDoc | ( | class CRhDoc & | doc | ) |
double CRhinoDoc::AbsoluteTolerance | ( | ) | const |
Returns: Model space absolute tolerance. Remarks: Use DocProperties().PageUnitsAndTolerances() for page space.
bool CRhinoDoc::ActivateCommandWindowCaret | ( | ) |
Description: Activates flashing caret in command prompt.
const CRhinoCommand* CRhinoDoc::ActiveCommand | ( | ) | const |
Returns: Pointer to currently running command.
const CRhinoCommandContext::COMMAND_STYLE CRhinoDoc::ActiveCommandStyle | ( | ) | const |
Returns: Style of currently running command: interactive_ui, script_ui, or batch_ui
bool CRhinoDoc::ActiveConstructionPlane | ( | ON_Plane & | plane | ) |
unsigned int CRhinoDoc::ActiveRhinoViewSerialNumber | ( | ) | const |
Viewport layout Returns: The runtime serial number of the CRhinoView that is this document's current active view. Remarks: Whenever a document needs a single view to perform a calculation it uses the active view. Examples include
ON::active_space CRhinoDoc::ActiveSpace | ( | ) | const |
const ON_UnitSystem CRhinoDoc::ActiveSpaceUnits | ( | ) | const |
CRhinoView* CRhinoDoc::ActiveView | ( | ) | const |
ON_RUNTIME_APPLE.
CRhinoBrepObject* CRhinoDoc::AddBrepObject | ( | const ON_Brep & | brep, |
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add a brep object to Rhino. Parameters: brep - [in] A duplicate of this brep is added to Rhino. pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoBrepObject and calls CRhinoDoc::AddObject. The input brep is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoMeshObject::CRhinoMeshObject() CRhinoDoc::AddObject
CRhinoCurveObject* CRhinoDoc::AddCurveObject | ( | const ON_Arc & | arc, |
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add an arc object to Rhino. Parameters: arc - [in] pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. pHistory - [in] (optional) history bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoCurveObject and calls CRhinoDoc::AddObject. The input arc is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoCurveObject::CRhinoCurveObject() CRhinoDoc::AddObject
CRhinoCurveObject* CRhinoDoc::AddCurveObject | ( | const ON_BezierCurve & | bezier_curve, |
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add a Bezier curve object to Rhino. Parameters: bezier_curve - [in] pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoCurveObject and calls CRhinoDoc::AddObject. The input bezier_curve is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoCurveObject::CRhinoCurveObject() CRhinoDoc::AddObject
CRhinoCurveObject* CRhinoDoc::AddCurveObject | ( | const ON_Circle & | circle, |
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add an circle object to Rhino. Parameters: circle - [in] pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. pHistory - [in] (optional) history bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoCurveObject and calls CRhinoDoc::AddObject. The input circle is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoCurveObject::CRhinoCurveObject() CRhinoDoc::AddObject
CRhinoCurveObject* CRhinoDoc::AddCurveObject | ( | const ON_Curve & | curve, |
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add a curve object to Rhino. Parameters: curve - [in] A duplicate of this curve is added to Rhino. pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoCurveObject and calls CRhinoDoc::AddObject. The input curve is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoCurveObject::CRhinoCurveObject() CRhinoDoc::AddObject
CRhinoCurveObject* CRhinoDoc::AddCurveObject | ( | const ON_Line & | line, |
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add a line object to Rhino. Parameters: line - [in] (line is copied) pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. pHistory - [in] (optional) history bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoCurveObject and calls CRhinoDoc::AddObject. The input line is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoCurveObject::CRhinoCurveObject() CRhinoDoc::AddObject
CRhinoCurveObject* CRhinoDoc::AddCurveObject | ( | const ON_Polyline & | polyline, |
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add a polyline object to Rhino. Parameters: polyline - [in] pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. pHistory - [in] (optional) history bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoCurveObject and calls CRhinoDoc::AddObject. The input polyline is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoCurveObject::CRhinoCurveObject() CRhinoDoc::AddObject
unsigned int CRhinoDoc::AddCustomUndoEvent | ( | CRhinoUndoEventHandler * | undo_event_handler | ) |
Description: If you want to your plug-in to do something when the Rhino Undo/Redo command runs, the call AddCustomUndoEvent during your command.
This function is for expert plug-in developers. If you don't do a good job here, you will really break Rhino. Parameters: undo_event_handler - [in] Pointer to a class allocated with a call to new. Never delete this class. Never pass a pointer to a stack variable. Returns: If a non zero number is returned, then this is the runtime serial number Rhino has assigned to this undo event. If zero is returned, then the user has disabled undo and undo_event_handler was deleted.
const class CRhinoDimAngular* CRhinoDoc::AddDimAngularObject | ( | ON_Arc | arc, |
double | offset, | ||
const ON_DimStyle * | dim_style = nullptr , |
||
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) |
Description: Add an angular dimension to the document. Parameters: arc - [in] offset - [in] See the corresponding version of ON_DimAngular.Create() for a description of these parameters. dim_style - [in] nullptr, document dimension style, or a valid override style. If invalid, then the current dimension style will be used. The CRhinoDoc.DimStyleFromProperties() function is useful for initializing dimension style settings.
const class CRhinoDimAngular* CRhinoDoc::AddDimAngularObject | ( | ON_Line | line1, |
ON_3dPoint | point_on_line1, | ||
ON_Line | line2, | ||
ON_3dPoint | point_on_line2, | ||
ON_3dPoint | point_on_angular_dimension_arc, | ||
bool | bSetExtensionPoints, | ||
const ON_DimStyle * | dim_style = nullptr , |
||
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) |
Description: Add an angular dimension to the document. Parameters: arc - [in] offset - [in] See the corresponding version of ON_DimAngular.Create() for a description of these parameters. dim_style - [in] nullptr, document dimension style, or a valid override style. If invalid, then the current dimension style will be used. The CRhinoDoc.DimStyleFromProperties() function is useful for initializing dimension style settings.
const class CRhinoDimLinear* CRhinoDoc::AddDimLinearObject | ( | ON_3dPoint | extension_point0, |
ON_3dPoint | extension_point1, | ||
ON_3dPoint | dimension_line_point, | ||
ON_3dVector | plane_normal, | ||
const ON_DimStyle * | dim_style = nullptr , |
||
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) |
Description: Add an aligned linear dimension to the document. The dimension line is parallel to the segment connecting the dimension points. Parameters: extension_point0 - [in] extension_point1 - [in] locations of one of the points being dimensioned. The dimension line will be parallel to the segment connecting these points. dimension_line_point - [in] a point on the linear dimension line. plane_normal - [in] A vector perpendicular to the line between the extension points that defines the orientation of the dimension's plane. dim_style - [in] nullptr, document dimension style, or a valid override style. If invalid, then the current dimension style will be used. The CRhinoDoc.DimStyleFromProperties() function is useful for initializing dimension style settings. attributes - [in] nullptr or object attributes.
const class CRhinoDimLinear* CRhinoDoc::AddDimLinearObject | ( | ON_3dPoint | extension_point0, |
ON_3dPoint | extension_point1, | ||
ON_Line | dimension_line, | ||
ON_3dVector | plane_normal, | ||
const ON_DimStyle * | dim_style = nullptr , |
||
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) |
Description: Add a rotated linear dimension to the document. The dimension line is explicitly specified. Parameters: extension_point0 - [in] extension_point1 - [in] locations of one of the points being dimensioned. The dimension line will be parallel to the segment connecting these points. dimension_line - [in] the dimension line. This is treated as an infinite line and the points are automatically calculated. plane_normal - [in] A vector perpendicular to the line between the extension points that defines the orientation of the dimension's plane. The dimension line is projected to this plane. dim_style - [in] nullptr, document dimension style, or a valid override style. If invalid, then the current dimension style will be used. The CRhinoDoc.DimStyleFromProperties() function is useful for initializing dimension style settings. attributes - [in] nullptr or object attributes.
CRhinoExtrusionObject* CRhinoDoc::AddExtrusionObject | ( | const ON_Extrusion & | extrusion, |
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
bool | bReference = NULL |
||
) |
Description: Add an extrusion object to Rhino. Parameters: extrusion - [in] A duplicate of this extrusion is added to Rhino. pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoExtrusionObject and calls CRhinoDoc::AddObject. The input extrusion is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoCurveObject::CRhinoCurveObject() CRhinoDoc::AddObject
void CRhinoDoc::AddGrip | ( | CRhinoGripObject & | grip | ) |
const class CRhinoLeader* CRhinoDoc::AddLeaderObject | ( | const wchar_t * | leader_text, |
const ON_Plane & | plane, | ||
int | leader_polyline_point_count, | ||
const ON_3dPoint * | leader_polyline_points, | ||
const ON_DimStyle * | dim_style = nullptr , |
||
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) |
Description: Create a leader object and add it to the document. Parameters: leader_text - [in] plane - [in] ON_Plane::World_xy or the current view's construction plane are good candidates. The plane origin is ignored leader_polyline_point_count - [in] leader_polyline_points - [in] 3d points (will be projected to the plane) First point is arrow tip and last point is text location. dim_style - [in] If nullptr, document dimension style, or a valid override style. If invalid, then the current dimension style will be used. The ON_DimStyle::CreateFromfProperties() function is useful for getting a good value for this parameter. attributes - [in] If nullptr, current defaults will be used.
Example:
const ON_3dPoint leader_points[3] = { ON_3dPoint(0,0,0), ///< arrow head ON_3dPoint(5,0,0), ON_3dPoint(10,5,0) ///< text location };
/ If you want to specify text appearance or other custom properties ... ON_DimStyle style = ON_DimStyle::DimStyleFromProperties( doc->DimStyleContext().CurrentDimStyle(), ... );
doc->AddLeaderObject( L"Abra Cadabra", ON_Plane::World_xy, 3, leader_points, &style, nullptr );
Remarks: If you need to specify fancier settings, use the version of AddLeaderObject that has a ON_Leader parameter.
CRhinoMeshObject* CRhinoDoc::AddMeshObject | ( | const ON_Mesh & | mesh, |
bool | bRequireValidMesh, | ||
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add a mesh object to Rhino. Parameters: mesh - [in] A duplicate of this mesh is added to Rhino. bRequireValidMesh - [in] If true, the mesh will not be added to the Rhino document if it fails a validity check. pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoMeshObject and calls CRhinoDoc::AddObject. The input mesh is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoMeshObject::CRhinoMeshObject() CRhinoDoc::AddObject
CRhinoMeshObject* CRhinoDoc::AddMeshObject | ( | const ON_Mesh & | mesh, |
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add a mesh object to Rhino. Parameters: mesh - [in] A duplicate of this mesh is added to Rhino. pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoMeshObject and calls CRhinoDoc::AddObject. The input mesh is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoMeshObject::CRhinoMeshObject() CRhinoDoc::AddObject
void CRhinoDoc::AddMruCommand | ( | const wchar_t * | cmd, |
const wchar_t * | display_string, | ||
const wchar_t * | shortcut, | ||
const UINT | modifier_flags | ||
) |
Description: Add MRU command to list, pop old commands off when list reaches max size. Parameters: cmd - [in] command macro to add display_string - [in] String displayed in mru command pop-up menu, if NUL then displays macro. shortcut - [in] String displayed as the shortcut modifier_flags - [in] modifiers for the shortcut (Mac only)
void CRhinoDoc::AddMruCommand | ( | const wchar_t * | cmd, |
const wchar_t * | display_string = NULL |
||
) |
Description: Add MRU command to list, pop old commands off when list reaches max size. Parameters: cmd - [in] command macro to add display_string - [in] String displayed in mru command pop-up menu, if NUL then displays macro.
bool CRhinoDoc::AddObject | ( | CRhinoObject * | object, |
bool | bReferenceObject = false , |
||
bool | bInstanceDefinition = false |
||
) |
Description: Adds an object to the document. The attributes need to be set before you add the object. Use GetDefaultObjectAttributes() to get the current default attributes. Parameters: object - [in] bReferenceObject - [in] if true, the object is added as a reference object that will not be saved bReferenceObject - [in] if true, the object is added as a reference object that will not be saved bInstanceDefinition - [in] if true, the object is added to the instance definition geometry list. The instance definition geometry objects are never directly displayed. They are are referenced by CRhinoInstanceObjects.
Remarks: The object that is being added must be created by calling new to instantiate a class derived from CRhinoObject. Classes like CRhinoPointObject, CRhinoCurveObject, CRhinoSurfaceObject, CRhinoMeshObject, and CRhinoBrepObject can be used.
SeeAlso: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoPointObject::CRhinoPointObject() CRhinoPointCloudObject::CRhinoPointCloudObject() CRhinoCurveObject::CRhinoCurveObject() CRhinoSurfaceObject::CRhinoSurfaceObject() CRhinoBrepObject::CRhinoBrepObject() CRhinoMeshObject::CRhinoMeshObject() CRhinoDoc::ReplaceObject CRhinoDoc::AddObject
CRhinoPointCloudObject* CRhinoDoc::AddPointCloudObject | ( | int | point_count, |
const ON_3dPoint * | point_list, | ||
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add a point cloud object to Rhino. Parameters: point_count - [in] number of points in list point_list - [in] array of 3d points /// pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. pHistory - [in] (optional) history bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoPointCloudObject and calls CRhinoDoc::AddObject. The input point_list is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoPointCloudObjectObject::CRhinoPointCloudObjectObject() CRhinoDoc::AddObject
CRhinoPointObject* CRhinoDoc::AddPointObject | ( | const ON_3dPoint & | point, |
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add a point object to Rhino. Parameters: point - [in] (point is copied) pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. pHistory - [in] (optional) history bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoPointObject and calls CRhinoDoc::AddObject. The input point is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoPointObject::CRhinoPointObject() CRhinoDoc::AddObject
CRhinoSurfaceObject* CRhinoDoc::AddSurfaceObject | ( | const ON_Surface & | surface, |
const ON_3dmObjectAttributes * | pAttributes = NULL , |
||
CRhinoHistory * | pHistory = NULL , |
||
BOOL32 | bReference = NULL |
||
) |
Description: Add a surface object to Rhino. Parameters: surface - [in] A duplicate of this surface is added to Rhino. pAttributes - [in] (optional) attributes. If NULL, the current default attributes are used. bReference - [in] true if the point object is from a reference file. Reference objects do not persist in archives. Remarks: This is an easy to use wrapper that creates a new CRhinoSurfaceObject and calls CRhinoDoc::AddObject. The input surface is copied and should be deleted by the caller when its no longer needed. See Also: CRhinoDoc::AddPointObject CRhinoDoc::AddPointCloudObject CRhinoDoc::AddCurveObject CRhinoDoc::AddSurfaceObject CRhinoDoc::AddMeshObject CRhinoDoc::AddBrepObject CRhinoDoc::ReplaceObject CRhinoSurfaceObject::CRhinoSurfaceObject() CRhinoDoc::AddObject
const class CRhinoText* CRhinoDoc::AddTextObject | ( | const wchar_t * | text, |
const ON_Plane & | plane, | ||
const ON_3dPoint | text_location, | ||
const ON_DimStyle * | dim_style = nullptr , |
||
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) |
Description: Create a text object and add it to the document. Parameters: text - [in] plane - [in] location specified by valign and halign is at plane.Origin(). dim_style - [in] If nullptr, document dimension style, or a valid override style. If invalid, then the current dimension style will be used. The CRhinoDoc.DimStyleFromTextProperties() function is useful for initializing dimension style settings.
Example:
ON_DimStyle style; / If you want to specify text appearance or other properties ... doc->DimStyleFromTextProperties( ON::AnnotationType::Text,...,&style); / If you want to use current appearance ... style = doc->m_dim_style_table.CurrentDimStyle(); doc->AddLeaderObject( L"Abra Cadabra", ON_Plane::World_xy, ON_3dPoint(1,2,3), &style, nullptr );
Remarks: If you need to specify fancier settings, use the version of AddTextObject that has a ON_Text parameter.
double CRhinoDoc::AngleToleranceDegrees | ( | ) | const |
Returns: Model space angle tolerance. Remarks: Use DocProperties().PageUnitsAndTolerances() for page space.
double CRhinoDoc::AngleToleranceRadians | ( | ) | const |
Returns: Model space angle tolerance. Remarks: Use DocProperties().PageUnitsAndTolerances() for page space.
void CRhinoDoc::AppendPageView | ( | class CRhinoPageView & | pageView | ) |
Description: Append page view window to list of page views for this model. Parameters: pageView: [in] CRhinoPageView to be added
int CRhinoDoc::ArrangeViews | ( | bool | bMakeVisible | ) | const |
Description: Arrange the placements of the document's views. Parameters: rect - [in] Typically, this is the value returned by RhinoApp().MainFrameViewClientRect() bMakeVisible - [in] True to make the views visible. Returns: Number of views the document has. Remarks: ArrangeViews() does not modify any active view settings and that is intentional.
bool CRhinoDoc::Audit | ( | ON_TextLog * | text_log, |
bool | bAttemptRepair | ||
) |
Audit the contents of the model. Returns true if model is valid. If an error is detected and the ON_TextLog pointer is not NULL, then a description of the error is logged. If bAttemptRepair is true, than Audit attempts to repair any problems it detects.
BOOL32 CRhinoDoc::AutoDelete | ( | void | ) | const |
unsigned int CRhinoDoc::AutomaticallySetActiveRhinoViewSerialNumber | ( | unsigned int | ineligible_rhino_view_sn | ) |
Description: Insures the document has an active view if at all possible. Parameters: ineligible_rhino_view_sn - [in] Any view with this serial number will not be used. This parameter is useful when a view will soon be deleted, hidden, or otherwise rendered useless as an active view and should not be considered as a candidate for the documents active view. Returns: The serial number of the document's active view.
bool CRhinoDoc::BeginUndoRecord | ( | const CRhinoCommand * | ) |
OBSOLETE Call CRhinoDoc::BeginUndoRecordEx(...)
bool CRhinoDoc::BeginUndoRecord | ( | const wchar_t * | sActionDescription | ) |
OBSOLETE Call CRhinoDoc::BeginUndoRecordEx(...)
unsigned int CRhinoDoc::BeginUndoRecordEx | ( | const CRhinoCommand * | ) |
Description: Used to begin recording undo information when a command starts. Example:
unsigned int undo_record_sn = BeginUndoRecordEx(...); ... doc->EndUndoRecord(undo_record_sn);
Returns: Serial number of record. Returns 0 if record is not started because undo information is already being recorded or undo is disabled.
unsigned int CRhinoDoc::BeginUndoRecordEx | ( | const wchar_t * | sActionDescription | ) |
Description: Used to begin recording undo information when the document is changed outside of a command. An example begin changes caused by the modeless layer or object properties dialogs when commands are not running. Example:
unsigned int undo_record_sn = BeginUndoRecordEx(...); ... doc->EndUndoRecord(undo_record_sn);
Returns: Serial number of record. Returns 0 if record is not started because undo information is already being recorded or undo is disabled.
void CRhinoDoc::BeginWaitCursor | ( | ) |
const ON_BoundingBox& CRhinoDoc::BoundingBox | ( | bool | bTight, |
bool | bIncludeCustomRenderMeshes, | ||
bool | bIncludeCurves | ||
) | const |
Description: Get a bounding box of all the visible geometry in the model. The wireframe icons used to display render lights are NOT included. Page space geometry is NOT included Returns; bounding box See Also CRhinoLightTable::WireframeIconsBoundingBox( const CRhinoView* )
Description: Get a tight bounding box of all the visible geometry in the model. The wireframe icons used to display render lights are NOT included. Page space geometry is NOT included Returns; bounding box See Also CRhinoLightTable::WireframeIconsBoundingBox( const CRhinoView* ) CRhinoObject::GetTightBoundingBox
Description: Get a bounding box of all the visible geometry in the model. The wireframe icons used to display render lights are NOT included. Page space geometry is NOT included / bTight: [in] use CRhinoObject::TightBoundingBox in the calculation instead of BoundingBox / bIncludeCustomRenderMeshes: [in] Resolve custom render meshes for all objects and use those / bIncludeCurves: [in] include curves and annotations in the calculation Returns; bounding box See Also CRhinoLightTable::WireframeIconsBoundingBox( const CRhinoView* ) CRhinoObject::GetTightBoundingBox
class CRhCameraIcon* CRhinoDoc::CameraIcon | ( | CRhinoView * | view = 0 | ) | const |
Description: Determine if a camera icon is begin shown. Parameters: view - [in] if NULL, then all views are tested. if not NULL, then just view is tested. Returns: If a camera icon is on, a pointer to the view whose camera is begin shown is returned. If no camera icon is on, NULL is returned.
void CRhinoDoc::ChangeTitleToUnNamed | ( | ) |
void CRhinoDoc::ClearMarks | ( | CRhinoObjectIterator & | , |
int | = 0 |
||
) |
Set all object marks to mark_value. See CRhinoObject::Mark() and CRhinoObject::IsMarked(). The mark values are for general runtime use and do not persist through save or copy operations.
void CRhinoDoc::ClearPathName | ( | void | ) |
void CRhinoDoc::ClearReadFileResult | ( | ) |
Description: Set the value returned by ReadFileResult() to CRhinoDoc::eReadFileResult::Unset. Typically this happens after Rhino has handled the read in whatever way is appropriate.
void CRhinoDoc::ClearRedoRecords | ( | ) |
void CRhinoDoc::ClearUndoRecords | ( | bool | = false | ) |
void CRhinoDoc::ClearUndoRecords | ( | unsigned int | undo_record_sn, |
bool | bPurgeDeletedObjects | ||
) |
|
static |
Description: Silently closes all documents. Returns: Number of documents that are closed.
unsigned int CRhinoDoc::CloseAllOtherDocuments | ( | ) | const |
Description: Silently closes all documents except this document. Returns: Number of documents that are closed.
|
static |
Description: Silently closes the specified document. Parameters: rhino_doc_sn - [in] Runtime serial number of the CRhinoDoc to close. Returns: True if the serial number was valid and the doc with this serial number was destroyed. False if no existing document has this serial number. Remarks: The modified flag is ignored.
bool CRhinoDoc::CloseRhinoView | ( | CRhinoView * | pView | ) |
Description: Close specified Rhino view. Parameters: pView [i] View to close Returns: Returns true on success; otherwise false
const CRhinoApp::CRhMruCommandRecord* CRhinoDoc::CommandToRepeat | ( | ) | const |
const ON_wString CRhinoDoc::ComponentNameFromCandidateName | ( | ON_ModelComponent::Type | component_type, |
bool | bMakeUniqueAndValid, | ||
const wchar_t * | candidate_name | ||
) | const |
Description: When a component is being added to a model, there are cases when the name will be modified. If the component is from a reference file like a worksession reference or a linked instance definition with reference layers, then a prefix is added to the name. If the name is empty or not unique and bMakeUniqueAndValid is true, then a suffix is added to the name. Parameters: component_type - [in] Type of component. bMakeUniqueAndValid - [in] If true, then empty names and names already in use are modified to be valid and unique. candidate_name - [in] Candidate for the component name. Remarks: This function is used internally when block definitions, annotation styles, line patterns, and hatch patterns are added to the document. When something like a file reading plug-in must know what name will be assigned to the component ahead of time, it can use this function.
int CRhinoDoc::ConstructionPlaneCount | ( | ) | const |
const class IRhRdkContents& CRhinoDoc::Contents | ( | ) | const |
int CRhinoDoc::CreateDefaultDimstyles | ( | ON_ClassArray< ON_DimStyle > & | dimstyles | ) |
Creates some default dimstyles and stores them in the dimstyles array returns the number of styles made
class CRhinoDimAngular* CRhinoDoc::CreateDimAngularObject | ( | const ON_DimAngular & | dim_angular, |
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) | const |
Description: Create an angular dimension object. Caller must add this object to the document. Parameters: dim_angular - [in] attributes - [in] Returns: A pointer of a CRhinoDimAngular that can be modified. You must use CRhinoDoc.AddObject() to add this to the document. Remarks: If you need a simple angular dimension with default settings, use one of the AddDimAnglularObject() functions.
class CRhinoDimLinear* CRhinoDoc::CreateDimLinearObject | ( | const ON_DimLinear & | dim_linear, |
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) | const |
Description: Create an linear dimension object. Caller must add this object to the document. Parameters: dim_linear - [in] attributes - [in] Returns: A pointer of a CRhinoDimLinear that can be modified. You must use CRhinoDoc.AddObject() to add this to the document. Remarks: If you need a simple linear dimension with default settings, use one of the AddDimAnglularObject() functions.
|
static |
Description: Creates an new CRhinoDoc.
Parameters: sModelTemplateFileName - [in]
class CRhinoLeader* CRhinoDoc::CreateLeaderObject | ( | const ON_Leader & | leader, |
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) | const |
Description: Create a leader object. Caller must add it to the document. Parameters: leader - [in] attributes - [in] If nullptr, current defaults will be used. Remarks: If you need a simple leader object with default settings, use the version of AddLeaderObject() that takes a string, plane and points. The CRhinoDoc.DimStyleFromTextProperties() function is useful for initializing dimension style settings.
class CRhinoLeader* CRhinoDoc::CreateLeaderObject | ( | const wchar_t * | leader_text, |
const ON_Plane & | plane, | ||
int | leader_polyline_point_count, | ||
const ON_3dPoint * | leader_polyline_points, | ||
const ON_DimStyle * | dim_style = nullptr , |
||
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) | const |
Description: Create a leader object. Caller must add it to the document. Parameters: leader_text - [in] plane - [in] ON_Plane::World_xy or the current view's construction plane are good candidates. The plane origin is ignored leader_polyline_point_count - [in] leader_polyline_points - [in] 3d points (will be projected to the plane) First point is arrow tip and last point is text location. dim_style - [in] If nullptr, document dimension style, or a valid override style. If invalid, then the current dimension style will be used. The ON_DimStyle::CreateFromProperties() function is useful for getting a good value for this parameter. attributes - [in] If nullptr, current defaults will be used. Remarks: If you need to specify fancier settings, use the version of AddLeaderObject that has a ON_Leader parameter.
unsigned int CRhinoDoc::CreateRhinoPageView | ( | const wchar_t * | title = nullptr | ) |
Description: Create a new page view window. Parameters: title: [in] string that appears in the new page view's title window If NULL, the name will be generated as "Page #" where this is the largest page number. Returns: The runtime serial number of a view or zero if the input was not valid. Remarks : Use CRhinoView::FromRuntimeSerialNumber() to get a pointer to the view.
unsigned int CRhinoDoc::CreateRhinoView | ( | const ON_3dmView * | view, |
bool | bShowView | ||
) |
Description: Creates a new Rhino view. Parameters: view - [in] null or settings to use to initialize the view. pMfcViewRuntimeClass - [in] null or a runtime class derived from CRhinoView. bShowView - [in] If false, the view will not be shown. This is what you should do if you need to perform additional initialization on the view before it appears. If true, the view will be shown and updated. Returns: The runtime serial number of a view or zero if the input was not valid. Remarks: Use CRhinoView::FromRuntimeSerialNumber() to get a pointer to the view.
unsigned int CRhinoDoc::CreateRhinoView | ( | const ON_3dmView * | view, |
CRuntimeClass * | pMfcViewRuntimeClass, | ||
bool | bShowView | ||
) |
class CRhinoText* CRhinoDoc::CreateTextObject | ( | const ON_Text & | text, |
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) | const |
Description: Create a text object. Caller must add this object to the document. Parameters: text - [in] Remarks: If you need a simple text object with default settings, use the version of AddTextObject() that takes a string and plane. The CRhinoDoc.DimStyleFromTextProperties() function is useful for initializing dimension style settings.
class CRhinoText* CRhinoDoc::CreateTextObject | ( | const wchar_t * | text, |
const ON_Plane & | plane, | ||
const ON_3dPoint | text_location, | ||
const ON_DimStyle * | dim_style = nullptr , |
||
const ON_3dmObjectAttributes * | attributes = nullptr |
||
) | const |
Description: Create a text object. Caller must add this object to the document. Parameters: text - [in] plane - [in] location specified by valign and halign is at plane.Origin(). dim_style - [in] If nullptr, document dimension style, or a valid override style. If invalid, then the current dimension style will be used. The CRhinoDoc.DimStyleFromTextProperties() function is useful for initializing dimension style settings.
Example:
ON_DimStyle style; / If you want to specify text appearance or other properties ... doc->DimStyleFromTextProperties( ON::AnnotationType::Text,...,&style); / If you want to use current appearance ... style = doc->m_dim_style_table.CurrentDimStyle(); doc->AddLeaderObject( L"Abra Cadabra", ON_Plane::World_xy, ON_3dPoint(1,2,3), &style, nullptr );
Remarks: If you need to specify fancier settings, use the version of AddTextObject that has a ON_Text parameter.
void CRhinoDoc::CreateViewLayout | ( | int | view_count, |
const ON_3dmView * | views | ||
) |
Description: Destroy all existing views and create a new set of views based on a set of ON_3dmView objects. Similar to ReplaceModelViews, except this function removes all existing views. Parameters: view_count: [in] number of objects in views array views: [in] array of ON_3dmViews
int CRhinoDoc::CullUndoRecords | ( | ) |
Description: Culls the undo list to release memory. Parameters: min_step_count - [in] minimum number of undo steps to keep. max_memory_size_bytes - [in] maximum amount of memory, in bytes, for undo list to use. Returns: Number of culled records. Remarks: In the version with no arguments, the settings in RhinoApp().AppSettings().GeneralSettings() are used.
int CRhinoDoc::CullUndoRecords | ( | int | min_step_count, |
size_t | max_memory_size_bytes | ||
) |
const class IRhRdkCurrentEnvironment& CRhinoDoc::CurrentEnvironment | ( | ) | const |
CRhUndoRecord* CRhinoDoc::CurrentUndoRecord | ( | ) | const |
Returns: Record being currently recorded. If undo recording is disabled or nothing is currently being recorded, then NULL is returned.
unsigned int CRhinoDoc::CurrentUndoRecordSerialNumber | ( | ) | const |
Returns: >0: undo recording is active and being saved on the undo record with the specified serial number. 0: undo recording is not active. (Disabled or nothing is being recorded.)
|
static |
< SHARED_HANDLERS
Returns a translated string to use prepend to a Dimstyle name to mark it as a built-in default dimstyle
const ON_3dmObjectAttributes CRhinoDoc::DefaultObjectAttributes | ( | ) | const |
void CRhinoDoc::DefaultViewLayout | ( | ) |
void CRhinoDoc::DefaultViewLayout | ( | ON_BoundingBox | model_bbox | ) |
void CRhinoDoc::DeferredRedraw | ( | void | ) |
Description: Redraw all views of the active document with a regenerate display hint. This version of Redraw will cause all views to update, but not in any particular order or any specific time. All you can be assured of is that the views will eventually update...
Parameters:
Remarks: The routine basically iterates through all views calling CRhinoView::Redraw()...
See Also CRhinoView::Redraw()
bool CRhinoDoc::DeleteObject | ( | const CRhinoObjRef & | objref, |
bool | bQuiet = true , |
||
bool | bIgnoreModes = false |
||
) |
Description: Deletes objref.Object(). The deletion can be undone by calling UndeleteObject(). Parameters: objref - [in] objref.Object() will be deleted bQuiet = [in] if false, a message box will appear when an object cannot be deleted. bIgnoreModes - [in] If true, locked and hidden objects are transformed. If false objects that are locked, hidden, or on locked or hidden layers are not transformed.
const CRhinoDimStyleContext CRhinoDoc::DimStyleContext | ( | ) | const |
Returns: An class derived from ON_DimStyleContext that can be used whenever an ON_DimStyleContext& parameter is required.
int CRhinoDoc::DisplayEngineStatus | ( | int | engine_id | ) | const |
Description: Return the status of the display engine: Parameters: engine_id - [in] CRhinoDoc::display_engine_opengl or CRhinoDoc::display_engine_direct3d Returns: 0: Engine is not available. 1: Engine is available, but not initialized. 2: Engine is available and initialized.
const class IRhRdkDithering& CRhinoDoc::Dithering | ( | ) | const |
enum CRhinoDocStatus CRhinoDoc::DocStatus | ( | ) | const |
|
static |
Returns: Number of documents.
unsigned int CRhinoDoc::DocumentMissingFontTest | ( | bool | bInteractive, |
unsigned int | begin_dimstyle_search_at_sn, | ||
unsigned int | begin_object_search_at_sn | ||
) |
Parameters: bInteractive - [in] If true and missing fonts are found, a modeless dialog UI is used to inform the user and ask what to do about the missing fonts. begin_dimstyle_search_at_sn - [in] To test all dimstyles, pass 0. To test no dimstyles, pass 0xFFFFFFFFU. To test all dimstyles created during some event, save the value of CRhinoDimStyle::NextRuntimeSerialNumber() before the event and then call GetMissingFontLists() after the event with the saved value as the this parameter. begin_object_search_at_sn - [in] To test all objects, pass 0. To test no objects, pass 0xFFFFFFFFU. To test all objects created during some event, save the value of CRhinoObject::NextRuntimeObjectSerialNumber() before the event and then call GetMissingFontLists() after the event with the saved value as the this parameter. Returns: Number of fonts referenced in the searched dimstyles and objects that are not installed on the current device. Remarks: Deleted dimstyles and deleted objects are always ignored.
BOOL32 CRhinoDoc::DoFileSave | ( | ) |
void CRhinoDoc::EnableCameraIcon | ( | CRhinoView * | view | ) |
Description: Use to turn camera icon on and off. Parameters: view - [in] If NULL, any camera icon is turned off. If not NULL, the camera icon for that view is turned on.
For use by CRhinoGetPoint::GetPoint(), CRhinoGetPoint::GetObject(), CRhinoGetString()
void CRhinoDoc::EnableUndoRecording | ( | bool | = true | ) |
void CRhinoDoc::EnableValidateNewObjects | ( | bool | bEnable | ) |
Parameters: bEnable - [in] true: CRhinoDoc::AddObject() is validates each object as it is added. If the object is not valid, the count of This can be time consuming but is valuable for debugging. false: CRhinoDoc::AddObject() dos not validate objects. Returns: True if CRhinoDoc::AddObject() is validating each object as it is added. This can be time consuming but is valuable for debugging.
bool CRhinoDoc::EndUndoRecord | ( | ) |
<- OBSOLETE
CRhinoDoc::EndUndoRecord() is OBSOLETE Call EndUndoRecord(undo_record_sn) where undo_record_sn is the value returned by BeginUndoRecordEx(...)
bool CRhinoDoc::EndUndoRecord | ( | unsigned int | undo_record_sn | ) |
Description: End current undo if its serial number satisfies undo_record_sn0 <= sn <= undo_record_sn1.
bool CRhinoDoc::EndUndoRecord | ( | unsigned int | undo_record_sn0, |
unsigned int | undo_record_sn1 | ||
) |
End undo if its serial number satisfies undo_record_sn0 <= sn <= undo_record_sn1.
void CRhinoDoc::EndWaitCursor | ( | ) |
void CRhinoDoc::EnterCommand | ( | const CRhinoCommand * | cmd, |
unsigned int * | undo_record_sn | ||
) |
class CRhEventManager* CRhinoDoc::EventManager | ( | void | ) | const |
ON_RUNTIME_APPLE.
list of events (text tokens, view clicks, digitizer points, etc.
CRhinoCommand::result CRhinoDoc::ExecuteCommand | ( | const wchar_t * | cmd_name | ) |
Description: In general, you should use CRhinoApp::RunScript to run commands unless you are trying to modify the Rhino model from a modeless dialog. See the example below for how to handle the modeless dialog situation.
This is a low level tool that searches for a command (a instance of a class derived from CRhinoCommand) with a matching command name, if it finds a command, runs that command by calling the virtual CRhinoCommand::RunCommand() member function.
The command name can be prefaced with a combination of underbar (_), hyphen (-), or right single quote ('). If an underbar is present, then the command name search looks for a matching english command name. If the underbar is not present, the command name search looks for a matching localized command name. If the hyphen is present, then the command is run in script mode; otherwise the command is run in interactive mode. The right single quote is ignored by ExecuteCommand. It is used in scripts to indicate that the text token must be treated as a command name and is important to upstream text token parsing.
Example:
CMyCommand : pubic CRhinoCommand { public: RunCommand(...);
type1 m_my_info1; type2 m_my_info2; bool m_bOkToRunCommand; };
CMyCommand::CMyCommand() { m_bOkToRunCommand = false; }
CMyCommand theMyCommand;
CMyCommand::RunCommand(...) { if (!m_bOkToRunCommand) { RhinoMessageBox(L"Use the MyDialog button to run this command"); return CRhinoCommand::failure; }
/ the dialog has filled in m_my_info1 and m_my_info2. / Use this as the "input" to the command and then / do whatever you need to as if the command were / an ordinary command.
...
return CRhinoCommand::success; }
...
CMyDialog::OnButtonDown(...) { / fill in the parameters theMyCommand.m_my_info1 = ...; theMyCommand.m_my_info2 = ...; theMyCommand.m_bOkToRunCommand = true; RhinoApp().ExectueCommand(theMyCommand.LocalCommandName()); theMyCommand.m_bOkToRunCommand = false; }
Returns: Command return code indicating if the command worked, failed, or was canceled by the user.
void CRhinoDoc::ExitCommand | ( | unsigned int | rhino_doc_sn0, |
unsigned int | rhino_doc_sn1, | ||
const CRhinoCommand * | cmd, | ||
unsigned int | undo_record_sn | ||
) |
const class CRhRdkContent* CRhinoDoc::FindContentInstance | ( | const ON_UUID & | instanceId | ) | const |
Description: Find a content by its instance id. Top-level contents that are attached to the document will be checked. Parameters: instanceId - [in] the instance id of the content to find. Returns: A pointer to the const content or null if not found. If you want to modify the content you will need to call BeginChange() to get a non-const reference.
bool CRhinoDoc::FindView | ( | const wchar_t * | title, |
ON_3dmView & | view, | ||
bool | include_standard_views = true , |
||
bool | include_page_views = true |
||
) |
Description: Find the first view in the view list that has the same viewport title. Note the the title string is not guaranteed unique Parameters: title: [in] viewport title to search for view: [out] if a view is found it is copied into this include_standard_views: [in] look at standard rhino views when searching include_page_views: [in] look at page views when searching Return: true if a view is found with the matching title
bool CRhinoDoc::FindView | ( | const wchar_t * | title, |
ON_3dmView & | view, | ||
CRhinoView::ViewTypeFilter | view_types | ||
) |
bool CRhinoDoc::FindView | ( | const wchar_t * | title, |
ON_3dmView & | view, | ||
CRhinoView::ViewTypeFilter | view_types | ||
) | const |
void CRhinoDoc::FlashObjectList | ( | ON_SimpleArray< const CRhinoObject * > & | obj_list, |
int | flash_style = 1 |
||
) |
Description: Cause objects selection state to change momentarily so the object appears to flash on the screen Parameters: obj_list - [in] list of objects to flash flash_style - [in] 0 = invisible - visible flash, 1 = object color - selected color
void CRhinoDoc::FourViewLayout | ( | bool | bUseMatchingViews = false | ) |
void CRhinoDoc::FourViewLayout | ( | ON_BoundingBox | model_bbox, |
bool | bThirdAngleProjection, | ||
bool | bUseMatchingViews | ||
) |
void CRhinoDoc::FourViewLayout | ( | ON_BoundingBox | model_bbox, |
bool | bUseMatchingViews = false |
||
) |
|
static |
Description: Get a pointer to a CRhinoDoc from a runtime_serial number. Parameters: doc_runtime_serial_number - [in] Returns: The document with the matching runtime serial number or null if no document exists. Remarks: The runtime serial number does not persist in 3dm archives and is not unique between instance of Rhino.exe. It should be used whenever you are tempted to save a CRhinoDoc pointer because Rhino documents can be deleted unexpectedly. See Also: CRhinoDoc::RuntimeSerialNumber();
void CRhinoDoc::Get3dmAnnotationContext | ( | class ON_3dmAnnotationContext & | annotation_context | ) | const |
void CRhinoDoc::Get3dmSettings | ( | class ON_3dmSettings & | settings | ) | const |
void CRhinoDoc::GetDefaultObjectAttributes | ( | ON_3dmObjectAttributes & | ) | const |
attributes to use for new object
Model
|
static |
Description: In most cases, it is easier, faster and more robust to use a CRhinoDocIterator to go through the list of documents. In the rare case when you really do want a list of all existing document serial numbers, use this function. Parameters: rhino_doc_sn_list - [out] list of rhino document serial numbers in increasing order. Returns: Number of rhino document serial numbers in rhino_doc_sn_list[]. See Also: CRhinoDocIterator
|
static |
Description: In most cases, it is easier, faster and more robust to use a CRhinoDocIterator to go through the list of documents. In the rare case when you really do want a list of existing document serial numbers, use this function. Parameters: rhino_doc_sn0 - [in] Serial numbers <= rhino_doc_sn0 will not be added to rhino_doc_sn_list[]. rhino_doc_sn_list_capacity - [in] maximum number of elements in rhino_doc_sn_list[] array. rhino_doc_sn_list - [out] list of rhino document serial numbers > rhino_doc_sn0. Returns: Number of rhino documents set in rhino_doc_sn_list[]. See Also: CRhinoDocIterator
CDocTemplate* CRhinoDoc::GetDocTemplate | ( | ) | const |
|
virtual |
POSITION CRhinoDoc::GetFirstViewPosition | ( | ) | const |
int CRhinoDoc::GetMRUCommands | ( | ON_ClassArray< ON_wString > & | display_strings, |
ON_ClassArray< ON_wString > & | macros | ||
) | const |
CView* CRhinoDoc::GetNextView | ( | POSITION & | rPosition | ) | const |
int CRhinoDoc::GetPageViewNumber | ( | const class CRhinoPageView & | pageView | ) | const |
Description: Get page number of a page view window for this model. Parameters: pageView: [in] CRhinoPageView to be found Returns: page number (starting at 0) of the pageView on success -1 on failure
ON_wString CRhinoDoc::GetPathName | ( | ) | const |
CRhinoDimstyleTable* DimstyleTable();.
Re-implement CDocument
int CRhinoDoc::GetRedoRecords | ( | ON_SimpleArray< class CRhUndoRecord * > & | ) | const |
Returns: Number of undo records.
ON_wString CRhinoDoc::GetTitle | ( | void | ) | const |
int CRhinoDoc::GetUndoRecords | ( | ON_SimpleArray< class CRhUndoRecord * > & | ) | const |
Returns: Number of undo records.
|
static |
bool CRhinoDoc::GetUserString | ( | const wchar_t * | key, |
ON_wString & | string_value | ||
) | const |
Description: Get user string from the document. Parameters: key - [in] id used to retrieve the string. string_value - [out] Returns: True if a string with id was found.
int CRhinoDoc::GetUserStringKeys | ( | ON_ClassArray< ON_wString > & | user_string_keys | ) | const |
Description: Get a list of all user string keys on the document. Parameters: user_string_keys - [out] user string keys are appended to this list. Returns: Number of elements appended to the user_strings list.
int CRhinoDoc::GetUserStrings | ( | ON_ClassArray< ON_UserString > & | user_strings | ) | const |
Description: Get a list of all user strings on the document. Parameters: user_strings - [out] user strings are appended to this list. Returns: Number of elements appended to the user_strings list.
int CRhinoDoc::GetViewList | ( | ON_SimpleArray< CRhinoView * > & | view_list, |
bool | include_standard_views = true , |
||
bool | include_page_views = true |
||
) |
Description: Gets an array of all the views. Parameters: view_list - [out] list of views include_standard_views - [in] add standard views to the view_list include_page_views - [in] add page views to the view list Returns: Number of views.
int CRhinoDoc::GetViewList | ( | ON_SimpleArray< CRhinoView * > & | view_list, |
CRhinoView::ViewTypeFilter | filter | ||
) | const |
Description: Gets an array of all the views. Parameters: view_list - [out] list of views filter - [in] enum specifying the types of views to include in the list Returns: Number of views.
bool CRhinoDoc::GetWriteFileOptonsAndWrite | ( | CRhinoFileWriteOptions | fwo_in | ) |
Description: Use CRhinoDoc::GetWriteFileOptonsAndWrite() to get a file name and additional file writing options and then write the file. Parameters: fwo - [in] file writing options fwo_out - [out] When you need to know the actual file writing options that were used, then call the version with an fwo_out parameter. The exact details about what options were used and the file writing status information is returned here. Remarks: GetWriteFileOptonsAndWrite(fwo_in,fwo_out) calls CRhinoDoc::WriteFilePathAndOptionsDialog(fwo_in,false,fwo_out) to get the file name and file writing options and then calls CRhinoDoc::WriteFile(fwo_out,fwo_out) to write the file.
bool CRhinoDoc::GetWriteFileOptonsAndWrite | ( | CRhinoFileWriteOptions | fwo_in, |
CRhinoFileWriteOptions & | fwo_out | ||
) |
const class IRhRdkGroundPlane& CRhinoDoc::GroundPlane | ( | ) | const |
bool CRhinoDoc::HasUndoRecords | ( | ) | const |
Returns true if document contains undo records.
|
static |
Returns: The serial number of the oldest document that exists or 0 if no documents exist. This will be the smallest serial number of any document that currently exits.
bool CRhinoDoc::HideObject | ( | const CRhinoObjRef & | objref, |
bool | bIgnoreLayerMode = false |
||
) |
hides object in document
Description: If objref.Object()->IsNormal() is true, then the object will be hidden. Parameters: objref - [in] reference to object to hide bIgnoreLayerMode - [in] if true, the object will be hidden even if it is on a layer that is locked or off. Returns: true if the object was successfully hidden. See Also: CRhinoDoc::ShowObject CRhinoDoc::LockObject
bool CRhinoDoc::ImportPlugInFileReadInProgress | ( | ) | const |
Returns: True if a file import plug-in is actively reading a file.
int CRhinoDoc::InCommand | ( | bool | bIgnoreScriptRunnerCommands = false | ) | const |
Description: This is a low level tool to determine if Rhino is currently running a command. Parameters: bIgnoreScriptRunnerCommands - [in] if true, script running commands like "ReadCommandFile" and the RhinoScript plug-ins "RunScript" are not counted. Returns: Number of active commands.
CRhinoGet* CRhinoDoc::InGet | ( | ) | const |
Returns non-null if currently in a CRhinoGetPoint::GetPoint(), CRhinoGetObject::GetObject(), or CRhinoGetString::GetString()
CRhinoGetColor* CRhinoDoc::InGetColor | ( | ) | const |
Returns non-null if currently in a CRhinoGetString::GetString();.
CRhinoGetMeshes* CRhinoDoc::InGetMeshes | ( | ) | const |
Returns non-null if currently in a CRhinoGetString::GetString();.
CRhinoGetNumber* CRhinoDoc::InGetNumber | ( | ) | const |
Returns non-null if currently in a CRhinoGetString::GetString();.
CRhinoGetObject* CRhinoDoc::InGetObject | ( | ) | const |
Returns non-null if currently in a CRhinoGetPoint::GetObject();.
CRhinoGetOption* CRhinoDoc::InGetOption | ( | ) | const |
Returns non-null if currently in a CRhinoGetString::GetString();.
CRhinoGetPoint* CRhinoDoc::InGetPoint | ( | ) | const |
Returns non-null if currently in a CRhinoGetPoint::GetPoint();.
CRhinoGetString* CRhinoDoc::InGetString | ( | ) | const |
Returns non-null if currently in a CRhinoGetString::GetString();.
bool CRhinoDoc::InScriptRunnerCommand | ( | ) | const |
Description: This is a low level tool to determine if Rhino is currently running a script running command like "ReadCommandFile" or the RhinoScript plug-in's "RunScript". Returns: True if a script running command is active.
void CRhinoDoc::InvalidateBoundingBox | ( | ) | const |
Description: Destroys the cached scene bounding box so that it will be regenerated again. from scratch next time the view is regenerated See Also CRhinoDoc::BoundingBox() const
unsigned int CRhinoDoc::InvalidObjectCount | ( | ) | const |
Returns: If object validation is enabled ( CRhinoDoc::ValidateNewObjects() is true), then this function returns the number of invalid objects added in the current command. If the value is >= 255, then at least 255 "bad" objects have been added. The count is set to zero when a new command begins.
bool CRhinoDoc::IsAvailable | ( | ) | const |
Returns: True if the document is available for general use. Is is not being being created, opened, closing, or closed.
bool CRhinoDoc::IsClosing | ( | ) | const |
Returns: True if this document is closing or has been closed.
bool CRhinoDoc::IsCreating | ( | ) | const |
Returns true if the CRhinoDoc::CreateDocument() is in the process of creating a document. Remarks: Use (IsInitializing() && !IsOpening()) to determine if CRhinoDoc::CreateDocument() is creating a document.
bool CRhinoDoc::IsDocumentLocked | ( | ) | const |
Description: Check to see if the file associated with this document is locked. If it is locked then this is the only document that will be able to write the file. Other instances of Rhino will fail to write this document. Returns: Returns true if the document is locked otherwise false. See Also: CRhinoDoc::LockDocument CRhinoDoc::UnLockDocument
bool CRhinoDoc::IsDocumentReadOnly | ( | ) | const |
Description: This method identifies the current read-only mode for this document. Returns: Returns true if the document is can be viewed but NOT saved. Returns false if document can be viewed and saved.
bool CRhinoDoc::IsHeadless | ( | ) | const |
bool CRhinoDoc::IsInitializing | ( | ) | const |
Returns (IsCreating() or IsOpening()).
BOOL32 CRhinoDoc::IsModified | ( | void | ) | const |
bool CRhinoDoc::IsOpening | ( | ) | const |
Returns true if the CRhinoDoc::OpenDocument() has created a document and is in the process of reading the model file. Remarks: Use (IsInitializing() && !IsOpening()) to determine if CRhinoDoc::CreateDocument() is creating a document.
|
static |
Returns: True if the rhino_doc pointer is null or points to an existing CRhinoDoc. Remarks: Calling CRhinoDoc::IsValidDocPointer() is fast and should be used before dereferencing a CRhinoDoc pointer that could possibly be invalid. For example, CRhinoView::GetDocument() uses CRhinoDoc::IsValidDocPointer() to validate the pointer saved by MFC before returning it.
|
static |
Returns: True if the rhino_doc reference is valid and refers to an existing CRhinoDoc. Remarks: Calling CRhinoDoc::IsValidDocReference() is fast and should be used before using a CRhinoDoc reference that could possibly be invalid.
const class IRhRdkLinearWorkflow& CRhinoDoc::LinearWorkflow | ( | ) | const |
bool CRhinoDoc::LockObject | ( | const CRhinoObjRef & | objref, |
bool | bIgnoreLayerMode = false |
||
) |
locks object in document
Description: If objref.Object()->IsNormal() is true, then the object will be locked. Parameters: objref - [in] reference to normal object to lock bIgnoreLayerMode - [in] if true, the object will be locked even if it is on a layer that is locked or off. Returns: true if the object was successfully hidden. See Also: CRhinoDoc::UnlockObject CRhinoDoc::HideObject
Description: Lookup any document object (geometry, layers, materials, fonts, ...) by id. Returns: NULL or a pointer to the document object.
int CRhinoDoc::LookupObject | ( | const CRhinoGroup & | , |
ON_SimpleArray< CRhinoObject * > & | |||
) | const |
int CRhinoDoc::LookupObject | ( | const CRhinoLayer & | , |
ON_SimpleArray< const CRhinoObject * > & | |||
) | const |
int CRhinoDoc::LookupObject | ( | const CRhinoLayer & | , |
ON_SimpleArray< CRhinoObject * > & | |||
) | const |
int CRhinoDoc::LookupObject | ( | const CRhinoLinetype & | , |
ON_SimpleArray< CRhinoObject * > & | |||
) | const |
int CRhinoDoc::LookupObject | ( | const CRhinoMaterial & | , |
ON_SimpleArray< CRhinoObject * > & | |||
) | const |
const CRhinoObject* CRhinoDoc::LookupObject | ( | ON_UUID | object_uuid | ) | const |
use CRhinoObjectIterator to iterate through CRhinoObject list(s)
objects (geometry, annotation, etc.) object search Remarks: Obsolete function. Use these static functions. CRhinoObject::FromId() CRhinoObject::FromRuntimeSerialNumber()
const CRhinoObject* CRhinoDoc::LookupObjectByRuntimeSerialNumber | ( | unsigned int | runtime_serial_number | ) | const |
Remarks: Obsolete function. Use these static functions. CRhinoObject::FromId() CRhinoObject::FromRuntimeSerialNumber()
const CRhinoObject* CRhinoDoc::LookupObjectByRuntimeSerialNumber | ( | unsigned int | runtime_serial_number, |
CRhinoObjectIterator & | it | ||
) | const |
Remarks: Obsolete (and slow) function. Use these static functions. CRhinoObject::FromId() CRhinoObject::FromRuntimeSerialNumber() Then check the result to see if you want to use it.
const ON_ComponentManifest& CRhinoDoc::Manifest | ( | ) | const |
Description: A manifest of all model components, including system components. Remarks: Examples of "system" components are
CRhinoDimStyleTable.DefaultDimensionStyle CRhinoDimStyleTable.DefaultInchDecimal CRhinoDimStyleTable.DefaultInchFractional CRhinoDimStyleTable.DefaultFootInchArchitecture CRhinoDimStyleTable.DefaultMillimeterSmall CRhinoDimStyleTable.DefaultMillimeterLarge CRhinoDimStyleTable.DefaultMillimeterArchitecture
bool CRhinoDoc::ModelComponentCheck | ( | const ON_ModelComponent * | model_component, |
int | table_index, | ||
ON_wString * | error_description | ||
) | const |
Description: This is a tool to determine if a model_component is in this CRhinoDoc and correctly entered in the manifest. It is useful for debugging and testing. Parameters: model_component - [in] table_index - [in] If table_index != ON_UNSET_INT_INDEX and the component requires a unique index, then the index is tested for validity. error_description - [out] If an error is detected, a description is returned here. Returns: If the model_component is in this CRhinoDoc and everything is correctly set, then true is returned. Otherwise false is returned.
|
static |
Returns: The runtime serial number of the document modeless user interface should reference when displaying information. It is often the case the 0 is returned. Remarks:
const wchar_t* CRhinoDoc::ModelName | ( | ) | const |
const ON_UnitSystem& CRhinoDoc::ModelUnits | ( | ) | const |
bool CRhinoDoc::ModifyObjectAttributes | ( | const CRhinoObjRef & | objref, |
const CRhinoObjectAttributes & | new_attributes, | ||
BOOL32 | bQuiet = false |
||
) |
Description: Modifies an object's attributes. Cannot be used to change object id.
Parameters: objref - [in] reference to object to modify new_attributes - [in] new attributes bQuiet - [in] if true, then warning message boxes are disabled.
Returns: true if successful.
AFX_MODULE_STATE* CRhinoDoc::ModuleState | ( | void | ) | const |
CRhinoObject* CRhinoDoc::MorphObject | ( | const CRhinoObject * | old_object, |
const ON_SpaceMorph & | morph, | ||
bool | bAddNewObjectToDoc, | ||
bool | bDeleteOriginal | ||
) |
Description: Creates a new object that is the morph of the existing object and deletes the existing object if bDeleteOriginal is true.
Parameters: old_object - [in] reference to object to morph. The object objref.Object() will be deleted if bDeleteOriginal is true. morph - [in] space morph to apply bAddNewObjectToDoc - [in] if true, the new object is added to the document. if false, the new object is not added to the document. bDeleteOriginal - [in] if true, the original object is deleted if false, the original object is not deleted
Returns: New object that is the morph of the existing_object. The new object has identical attributes.
Remarks: If the object is locked or on a locked layer, then it cannot be transformed.
const ON_ClassArray<CRhinoApp::CRhMruCommandRecord>& CRhinoDoc::MruCommandList | ( | ) | const |
const wchar_t* CRhinoDoc::MruMenuString | ( | ) | const |
MRU Commands for this document.
unsigned int CRhinoDoc::NewView | ( | const ON_3dmView & | new_view | ) |
Description: Creates a new view. Parameters: new_view - [in] the view parameters Returns: View serial number.
unsigned int CRhinoDoc::NewView | ( | const ON_3dmView & | new_view, |
bool | bShowView | ||
) |
Description: Creates a new view. Parameters: new_view - [in] the view parameters bShowView - [in] show the view Returns: View serial number.
bool CRhinoDoc::NextConstructionPlane | ( | ON_Plane & | plane | ) |
|
static |
Returns: The serial number of the next document to be constructed. Example: Examine documents created by SomeProcess().
const unsigned int rhino_doc_sn0 = CRhinoDoc::NextRuntimeSerialNumber(); SomeProcess(); const unsigned int rhino_doc_sn1 = CRhinoDoc::NextRuntimeSerialNumber(); for ( unsigned int rhino_doc_sn = rhino_doc_sn0; rhino_doc_sn < rhino_doc_sn1; rhino_doc_sn++ ) { CRhinoDoc* doc = CRhinoDoc::FromRuntimeSerialNumber(rhino_doc_sn); if ( 0 == doc ) continue; ... }
unsigned int CRhinoDoc::NextUndoRecordSerialNumber | ( | ) | const |
Returns: The serial number that will be assigned to the next undo record that is constructed.
bool CRhinoDoc::ObjectFinderIsValid | ( | ON_TextLog * | text_log, |
unsigned int | max_error_count, | ||
size_t * | sn_count, | ||
size_t * | id_count | ||
) | const |
This function is a debugging tool that validates the CRhinoObject lists and m_object_finder. If any errors are detected, false is returned. If no errors is detected, true is returned. Pass in a text_log if you want a description of the errors. Set max_error_count to the number of errors you want to allow before checking is halted.
void CRhinoDoc::OnCloseDocument | ( | ) |
BOOL32 CRhinoDoc::OnNewDocument | ( | ) |
BOOL32 CRhinoDoc::OnOpenDocument | ( | LPCTSTR | lpszPathName | ) |
BOOL32 CRhinoDoc::OnSaveDocument | ( | LPCTSTR | lpszPathName | ) |
|
static |
Description: Creates an new CRhinoDoc.
Parameters: sModelFileName - [in]
const ON_UnitSystem& CRhinoDoc::PageUnits | ( | ) | const |
void CRhinoDoc::PageViewDetailIsActive | ( | BOOL32 | isActive | ) |
int CRhinoDoc::PickObjects | ( | const CRhinoPickContext & | , |
CRhinoObjRefArray & | |||
) | const |
PickObjects() returns number of objects added to array.
int CRhinoDoc::PickObjects | ( | const CRhinoPickContext & | , |
CRhinoObjRefArray & | , | ||
bool | bSilent | ||
) | const |
PickObjects() returns number of objects added to array.
bSilent | if true selection filter is applied silently, without flashing the selection filter toolbar |
class CRhDocSerializeStatus* CRhinoDoc::PopSerializeStatus | ( | ) |
const class IRhRdkPostEffects& CRhinoDoc::PostEffects | ( | ) | const |
Return associated RDK Post Effects interface
bool CRhinoDoc::PrevConstructionPlane | ( | ON_Plane & | plane | ) |
CRhinoDocProperties& CRhinoDoc::Properties | ( | ) |
Return current document properties
const CRhinoDocProperties& CRhinoDoc::Properties | ( | ) | const |
int CRhinoDoc::PurgeAnonymousUserTable | ( | bool | bQuiet | ) |
unsigned int CRhinoDoc::PurgeCyclicInstanceReferences | ( | ) |
Description: Searches for and destroys all CRhinoInstanceObject instances in the instance definition geometry table that are at the tail of a cyclic instance reference. Cyclic instance references crash display code. Returns: Number of purged objects. Any value > 0 indicates something managed to create a cyclic instance reference. If the creation point can be found, it should be fixed so it does not create cyclic references.
unsigned int CRhinoDoc::PurgeLinkedIDefModel | ( | unsigned int | linked_idef_model_sn | ) |
Parameters: linked_idef_model_sn - [in] If 0, then all linked instance definition objects are purged. If non-zero, then linked instance definition objects with a matching serial number are purged. Returns: Number of purged objects
bool CRhinoDoc::PurgeObject | ( | CRhinoObject *& | object | ) |
Description: Removes object from document and deletes the pointer.
Parameters: object - [in,out] pointer to object to purge. This object is deleted and the pointer is set to NULL.
unsigned int CRhinoDoc::PurgeWorkSessionReferenceModel | ( | unsigned int | worksession_ref_model_sn | ) |
Parameters: worksession_ref_model_sn - [in] If 0, then all work session reference models are purged. If non-zero, then reference objects with a matching serial number are purged. Returns: Number of purged objects
void CRhinoDoc::PushConstructionPlane | ( | const ON_Plane & | plane | ) |
Universal construction plane stack operators
void CRhinoDoc::PushSerializeStatus | ( | class CRhDocSerializeStatus * | ) |
const class CRhRdkDocument& CRhinoDoc::RdkDocument | ( | ) | const |
ON::ReadFileResult CRhinoDoc::Read3DM | ( | ON_BinaryArchive & | archive, |
class CRhFileReadOptions & | fro3dm | ||
) |
Description: Core Rhino code uses this this function to read 3dm archives. Remarks: Plug-ins cannot use this function because they cannot create CRhFileReadOptions classes. This is intentional.
const class CRhFileReadOptions* CRhinoDoc::ReadFileOptions | ( | ) | const |
Returns: If a file is being read, this returns a pointer to a CRhFileReadOptions class that contains information about that file. If a file is not being read, this returns nullptr. Remarks: Plug-ins cannot use this function because they cannot create CRhFileReadOptions classes. This is intentional.
ON::ReadFileResult CRhinoDoc::ReadFileResult | ( | ) | const |
Returns: The value returned by the most recent call to Read3DM() or ReadPlugInFile().
int CRhinoDoc::ReadFileVersion | ( | ) | const |
Description: Return file version extracted by CRhinoDoc::Read3DM(). Will not return values from referenced or merged files. Returns: Less than zero means no file has bee read otherwise 1 (V1.x), 2( V2.x) or 3 See Also: CRhinoDoc::Read3DM
bool CRhinoDoc::ReadingAncillaryModel | ( | unsigned int * | worksession_ref_model_sn, |
const CRhinoInstanceDefinition ** | idef, | ||
ON_UUID * | grandparent_layer_id | ||
) | const |
Description: Determine if a reference model is currently being read and get information about what type of reference is being read. This information is sometimes required by file reading plug-ins.
Parameters: worksession_ref_model_sn - [out] If a work session reference model is currently being read, then the returned value of *worksession_ref_model_sn will be the non-zero work session reference model serial number. Otherwise the returned value of *worksession_ref_model_sn will be zero. Pass null if you do not want this information.
idef - [out] If an instance definition reference model is currently being read, then the returned value of idef will be non-null. When the Insert command is being used to create a block definition, this idef can be a static, linked and embedded, or linked idef. When an out-of-date block definition is being updated, this idef can be linked and embedded or linked. Pass null if you do not want this information.
grandparent_layer_id - [out] If a reference model is currently being read, then the returned value of *grandparent_layer_id will be the id of the grandparent layer for that reference model. Otherwise the returned value of grandparent_layer_id will be nil. Pass null if you do not want this information.
Returns: True if a reference file is currently being read.
Remarks: Worksession reference models can contain linked instance definitions and linked instance definitions can contain embedded instance definitions.
bool CRhinoDoc::ReadPlugInFile | ( | class CRhinoFileImportPlugIn * | import_plug_in, |
int | file_extension_index, | ||
class CRhFileReadOptions & | fro | ||
) |
Description: Core Rhino code uses this this function to call file reading plug-ins to read files. Remarks: Plug-ins cannot use this function because they cannot create CRhFileReadOptions classes. This is intentional.
|
static |
Description: Creates new window handles for every CRhinoView.
bool CRhinoDoc::Redo | ( | ) |
bool CRhinoDoc::RedoActive | ( | ) | const |
Returns: True if Redo() is currently active.
void CRhinoDoc::Redraw | ( | ) |
Description: Redraw all views of the active document. Remarks: If you change something in the active document – like adding objects, deleting objects, modifying layer or object display attributes, etc., then you need to call CRhinoDoc::Redraw to redraw all the views.
If you change something in a particular view like the projection, construction plane, background bitmap, etc., then you need to call CRhinoView::Redraw to redraw that particular view.
Calling CRhinoDoc::Redraw is conceptually like calling CDoc::UpdateAllViews() but Redraw is faster and draws the active view first.
NEVER CALL UpdateAllViews() IN RHINO.
See Also CRhinoView::SetRedrawDisplayHint CRhinoView::Redraw( unsigned int display_hint )
void CRhinoDoc::Redraw | ( | unsigned int | display_hint | ) |
Description: Redraw all views of the active document with an explicit display hint. This version of Redraw is intended for expert users doing custom drawing.
Parameters: display_hint - [in] one of CRhinoView::regenerate_display_hint CRhinoView::mark_display_hint CRhinoView::refresh_display_hint Remarks: Calling CRhinoDoc::Redraw(display_hint) is the same as making the two calls SetRedrawDisplayHint( display_hint ) Redraw() If you do not know what display hint to use, the just call Redraw() and it will automatically use the appropriate type of redraw.
NEVER CALL UpdateAllViews() IN RHINO. See Also CRhinoView::Redraw() CRhinoView::SetRedrawDisplayHint
|
static |
Description: Calls "Redraw" for all active documents.
|
static |
|
static |
void CRhinoDoc::RedrawViewHelper | ( | CRhinoView * | view, |
int | view_redraw_display_hint | ||
) |
Description: Low level helper for CRhinoView::Redraw(). You should call CRhinoView::Redraw() instead of this function.
void CRhinoDoc::Regen | ( | ) |
Description: Redraw all views of the active document with display hint == regenerate_display_hint. Good for a complete cleanup of the screen after a command that did a bunch of temporary drawing finishes
Remarks: Same as CRhinoDoc::Redraw( CRhinoView::regenerate_display_hint).
CRhinoDoc::Regen can be MUCH SLOWER than calling CRhinoDoc:Redraw() and should be used sparingly. When developing a command, it is best to call Redraw() to see if it will do the trick, and then resort to Regen() if nothing else works. Most commands should not need to call Regen(). See Also CRhinoView::Redraw() CRhinoView::SetRedrawDisplayHint
void CRhinoDoc::RemoveGrip | ( | CRhinoGripObject & | grip | ) |
void CRhinoDoc::RemovePageView | ( | class CRhinoPageView & | pageView | ) |
Description: Remove page view window from list of page views for this model. Parameters: pageView: [in] CRhinoPageView to be added
const class IRhRdkRenderChannels& CRhinoDoc::RenderChannels | ( | ) | const |
void CRhinoDoc::RepeatCommand | ( | ) |
repeats previous command
void CRhinoDoc::ReplaceModelViews | ( | int | view_count, |
const ON_3dmView * | views | ||
) |
Description: Replace the standard rhino views with new rhino views based on a set of ON_3dmView objects. All other views are left unchanged (page and detail views are untouched). Parameters: view_count: [in] number of objects in views array views: [in] array of ON_3dmViews
const CRhinoBrepObject* CRhinoDoc::ReplaceObject | ( | const CRhinoObjRef & | objref, |
const ON_Brep & | brep | ||
) |
Description: Replace one object with new brep object. Parameters: objref - [in] reference to old object to be replaced. The object objref.Object() will be deleted. brep - [in] new brep to be added. A duplicate of the brep is added to the Rhino model. If the brep parameter is on the heap, then the caller is responsible for deleting the brep parameter after the call. If this will be inefficient, use the version of ReplaceObject that takes a CRhinoObject* as the second argument. See Also: CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_3dPoint& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Curve& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Surface& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Brep& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Mesh& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, CRhinoObject* ); Returns: If successful, a pointer to the new CRhinoBrepObject is returned.
const CRhinoCurveObject* CRhinoDoc::ReplaceObject | ( | const CRhinoObjRef & | objref, |
const ON_Curve & | curve | ||
) |
Description: Replace one object with new curve object. Parameters: objref - [in] reference to old object to be replaced. The object objref.Object() will be deleted. curve - [in] new curve to be added. A duplicate of the curve is added to the Rhino model. If the curve parameter is on the heap, then the caller is responsible for deleting the curve parameter after the call. If this will be inefficient, use the version of ReplaceObject that takes a CRhinoObject* as the second argument. Example:
ON_NurbsSurface nurbs_surface = ...; CRhinoObject* rhino_object = ...; ///< existing rhino object ReplaceObject( CRhinoObjRef( rhino_object ), nurbs_surface ); See Also: CRhinoDoc::ReplaceObject( const CRhinoObjRef&, ON_3dPoint ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Curve& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Surface& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Brep& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Mesh& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, CRhinoObject* ); Returns: If successful, a pointer to the new CRhinoCurveObject is returned.
const CRhinoExtrusionObject* CRhinoDoc::ReplaceObject | ( | const CRhinoObjRef & | objref, |
const ON_Extrusion & | extrusion | ||
) |
Description: Replace one object with new extrusion object. Parameters: objref - [in] reference to old object to be replaced. The object objref.Object() will be deleted. brep - [in] new brep to be added. A duplicate of the extrusion is added to the Rhino model. If the extrusion parameter is on the heap, then the caller is responsible for deleting the extrusion parameter after the call. If this will be inefficient, use the version of ReplaceObject that takes a CRhinoObject* as the second argument. See Also: CRhinoDoc::ReplaceObject(const CRhinoObjRef&, const ON_3dPoint&); CRhinoDoc::ReplaceObject(const CRhinoObjRef&, const ON_Curve&); CRhinoDoc::ReplaceObject(const CRhinoObjRef&, const ON_Surface&); CRhinoDoc::ReplaceObject(const CRhinoObjRef&, const ON_Brep&); CRhinoDoc::ReplaceObject(const CRhinoObjRef&, const ON_Mesh&); CRhinoDoc::ReplaceObject(const CRhinoObjRef&, CRhinoObject*); Returns: If successful, a pointer to the new CRhinoExtrusionObject is returned.
const CRhinoObject* CRhinoDoc::ReplaceObject | ( | const CRhinoObjRef & | objref, |
const ON_Geometry & | geometry, | ||
bool | bIgnoreModes | ||
) |
Description: Replace the geometry in one object. Parameters: objref - [in] reference to old object to be replaced. The object objref.Object() will be deleted. geometry - [in] new geometry to be added. A duplicate of the geometry is added to the Rhino model. If the geometry parameter is on the heap, then the caller is responsible for deleting the mesh parameter after the call. If this will be inefficient, use the version of ReplaceObject that takes a CRhinoObject* as the second argument. bIgnoreModes - [in] If true, locked and hidden objects are replaced. If false objects that are locked, hidden, or on locked or hidden layers are not replaced. Returns: If successful, a pointer to the new CRhinoObject is returned.
const CRhinoMeshObject* CRhinoDoc::ReplaceObject | ( | const CRhinoObjRef & | objref, |
const ON_Mesh & | mesh | ||
) |
Description: Replace one object with new mesh object. Parameters: objref - [in] reference to old object to be replaced. The object objref.Object() will be deleted. mesh - [in] new mesh to be added. A duplicate of the mesh is added to the Rhino model. If the mesh parameter is on the heap, then the caller is responsible for deleting the mesh parameter after the call. If this will be inefficient, use the version of ReplaceObject that takes a CRhinoObject* as the second argument. See Also: CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_3dPoint& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Curve& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Surface& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Brep& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Mesh& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, CRhinoObject* ); Returns: If successful, a pointer to the new CRhinoMeshObject is returned.
const CRhinoSubDObject* CRhinoDoc::ReplaceObject | ( | const CRhinoObjRef & | objref, |
const ON_SubD & | subd | ||
) |
Description: Replace one object with a new SubD object. Parameters: objref - [in] reference to old object to be replaced. The object objref.Object() will be deleted. subd - [in] new SubD to be added. A duplicate of the SubD is added to the Rhino model. If the SubD parameter is on the heap, then the caller is responsible for deleting the mesh parameter after the call. If this will be inefficient, use the version of ReplaceObject that takes an ON_SubDRef as the 2nd argument. Returns: If successful, a pointer to the new CRhinoSubDObject is returned.
const CRhinoSurfaceObject* CRhinoDoc::ReplaceObject | ( | const CRhinoObjRef & | objref, |
const ON_Surface & | surface | ||
) |
Description: Replace one object with new surface object. Parameters: objref - [in] reference to old object to be replaced. The object objref.Object() will be deleted. surface - [in] new surface to be added. A duplicate of the surface is added to the Rhino model. If the surface parameter is on the heap, then the caller is responsible for deleting the surface parameter after the call. If this will be inefficient, use the version of ReplaceObject that takes a CRhinoObject* as the second argument. Example:
ON_NurbsSurface nurbs_surface = ...; CRhinoObject* rhino_object = ...; ///< existing rhino object ReplaceObject( CRhinoObjRef( rhino_object ), nurbs_surface ); See Also: CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_3dPoint& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Curve& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Surface& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Brep& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Mesh& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, CRhinoObject* ); Returns: If successful, a pointer to the new CRhinoSurfaceObject is returned.
bool CRhinoDoc::ReplaceObject | ( | const CRhinoObjRef & | objref, |
CRhinoObject * | new_object, | ||
bool | bIgnoreModes, | ||
bool | bSkipInCommandTest | ||
) |
bool CRhinoDoc::ReplaceObject | ( | const CRhinoObjRef & | objref, |
CRhinoObject * | new_object, | ||
bool | bIgnoreModes = false |
||
) |
Description: Replace one object with another. Conceptually, this function is the same as calling
Setting new_object attributes = old_object attributes DeleteObject(old_object); AddObject(old_object);
Parameters: objref - [in] reference to old object to be replaced. The object objref.Object() will be deleted. new_object - [in] new object to be activated - must not be in document. bIgnoreModes - [in] If true, locked and hidden objects are replaced. If false objects that are locked, hidden, or on locked or hidden layers are not replaced. bSkipInCommandTest - [in] In order for undo, history, event watcher expectations, and other important core processes to work correctly, ReplaceObject() must be run inside of a command. If it is not, as is common when modeless user interface code calls replace object, a "proxy" command is automatically run. In extremely rare cases, this is not desired. If you are an expert and you are certain that you want to run replace object outside of a command, then call ReplaceObject with bSkipInCommandTest = true. See Also: CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_3dPoint& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Curve& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Surface& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Brep& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Mesh& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, CRhinoObject* ); Returns: true if successful.
const CRhinoPointObject* CRhinoDoc::ReplaceObject | ( | const CRhinoObjRef & | objref, |
ON_3dPoint | point | ||
) |
Description: Replace one object with new point object. Parameters: objref - [in] reference to old object to be replaced. The object objref.Object() will be deleted. point - [in] new point to be added. The point is copied. Example:
ON_NurbsSurface nurbs_surface = ...; CRhinoObject* rhino_object = ...; ///< existing rhino object ReplaceObject( CRhinoObjRef( rhino_object ), nurbs_surface ); See Also: CRhinoDoc::ReplaceObject( const CRhinoObjRef&, ON_3dPoint ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Curve& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Surface& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Brep& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, const ON_Mesh& ); CRhinoDoc::ReplaceObject( const CRhinoObjRef&, CRhinoObject* ); Returns: If successful, a pointer to the new CRhinoPointObject is returned.
const CRhinoSubDObject* CRhinoDoc::ReplaceObject | ( | const CRhinoObjRef & | objref, |
ON_SubDRef | subd_ref | ||
) |
Description: Replace one object with a new SubD object. Parameters: objref - [in] reference to old object to be replaced. The object objref.Object() will be deleted. subd_ref - [in] new SubD to be added. The new object will reference the same subd as subd_ref. Returns: If successful, a pointer to the new CRhinoSubDObject is returned.
void CRhinoDoc::ResetViewPipelines | ( | void | ) |
Description: Resets all of the view pipelines to make sure they're all using the expected default pipeline (i.e. GetDefaultDisplayPipelineClass()). Certain situations arise where the pipeline class gets switched out to be something different than the default class...an example would be a shaded analysis mode getting set in a view that is currently using GDI wireframe...When the analysis mode is canceled, the view needs to return back to the GDI wireframe (i.e. the default display class). This routine simply ensures that all views are configured to their appropriate default display class.
Parameters: none
Remarks: The routine basically iterates through all views calling: CRhinoView::SetupDisplayPipeline()
void CRhinoDoc::RestoreWaitCursor | ( | ) |
call after MessageBox
bool CRhinoDoc::RhinoFileReadInProgress | ( | ) | const |
Returns: True if Rhino is actively reading a .3dm file.
bool CRhinoDoc::RunMenuScript | ( | const wchar_t * | s | ) |
void CRhinoDoc::RunMruCommand | ( | int | cmd_index | ) |
Description: Called by CMruCommandMenu::MruCmd() to run a m_mru_command_list command macro. Will move the macro from its current list position to top of display list. Parameters: cmd_index - [in] command macro to run
void CRhinoDoc::RunMruFavoriteCommand | ( | int | cmd_index | ) |
Description: Called by CMruCommandMenu::Favorite() to run a CRhinoAppGeneralSettings.m_popup_favorites macro. Will make sure command does not show up on the MRU list Parameters: cmd - [in] m_mru_command_list index of command to run
const CRhinoCommand* CRhinoDoc::RunningCommand | ( | int | i | ) | const |
Description: When script running or nestable commands are running, there can be more than one command running at a given time. The private array m_running_commands_stack[] keeps track of all the commands that are running. The one on the end of the array is the "active" command. You really should not be using this function, except when you are forced to hack around a sticky situation that requires you to know when a certain command (like a base level script running command) may be active. Parameters: i - [in] 0 based index. Returns: Pointer to command.
const ON_SimpleArray<const CRhinoCommand*>& CRhinoDoc::RunningCommandsStack | ( | ) |
bool CRhinoDoc::RunScript | ( | const class CRhinoScriptContext & | script | ) |
bool CRhinoDoc::RunScript | ( | const wchar_t * | script, |
int | echo_mode = 1 |
||
) |
Description: Run a Rhino command script. Parameters: script - [in] script to run echo_mode - [in] Controls how the script is echoed in the command output window. 0 = silent - nothing is echoed 1 = verbatim - the script is echoed literally Remarks: Rhino acts as if each character in the script string had been typed in the command prompt. When RunScript is called from a "script runner" command, it completely runs the script before returning. When RunScript is called outside of a command, it returns and the script is run. This way menus and buttons can use RunScript to execute complicated functions.
bool CRhinoDoc::RunScriptEx | ( | const wchar_t * | script, |
const wchar_t * | mruDisplayString, | ||
int | echo_mode = 1 |
||
) |
Description: Run a Rhino command script. Parameters: script - [in] script to run mruDisplayString - [in] If this is a valid string then the macro is added to the MRU command list using this string, if it is NULL or an empty string then false is returned. echo_mode - [in] Controls how the script is echoed in the command output window. 0 = silent - nothing is echoed 1 = verbatim - the script is echoed literally Remarks: Rhino acts as if each character in the script string had been typed in the command prompt. When RunScript is called from a "script runner" command, it completely runs the script before returning. When RunScript is called outside of a command, it returns and the script is run. This way menus and buttons can use RunScript to execute complicated functions.
unsigned int CRhinoDoc::RuntimeSerialNumber | ( | ) | const |
Description: The CRhinoDoc runtime serial number is a value >= 1 that and is unique for each instance of a CRhinoDoc class in a given instance of the Rhino.exe application. A value of 0 is unset and never identifies a document. The first CRhinoDoc created has serial number 1. The serial number can be used to identify find and identify documents and is a fast and robust way to specify a document (as opposed to passing around a CRhinoDoc pointer or reference). See Also: CRhinoDoc::FromSerialNumber(); Remarks:
|
static |
Parameters: rhino_doc - [in] This parameter can be null, in which case zero is returned. Returns: The runtime serial number of the rhino_doc parameter. Remarks: This function is provided so that code doesn't have to check for a null pointer before calling the member function CRhinoDoc.RuntimeSerialNumber(). If the rhino_doc pointer is not null, this function returns rhino_doc->RuntimeSerialNumber().
const class IRhRdkSafeFrame& CRhinoDoc::SafeFrame | ( | ) | const |
CDocument* CRhinoDoc::SafeMFCDoc | ( | void | ) |
const CDocument* CRhinoDoc::SafeMFCDoc | ( | void | ) | const |
|
static |
Description: Calls CRhinoDoc.SaveModified() for every existing document. Returns: If the user answers "cancel" to any of the queries, then false is returned. Otherwise true is returned.
|
static |
Description: Calls CRhinoDoc.SaveModified() for every existing document. If the user answers "cancel" to any of the queries, then false is returned. Otherwise true is returned. Parameters: bUseBatchMode - [in] Use true to suppress dialog boxes. Returns: If the user answers "cancel" to any of the queries, then false is returned. Otherwise true is returned.
bool CRhinoDoc::SaveDocument | ( | bool | bUseBatchMode | ) |
Description: This is the function that is used to "save" the document. If this function does not work for you, then call CRhinoDoc::WriteFile(). Parameters: bUseBatchMode - [in] Returns: True: Success. False: Failure.
bool CRhinoDoc::SaveModified | ( | bool | bUseBatchMode | ) |
BOOL32 CRhinoDoc::SaveModified | ( | void | ) |
int CRhinoDoc::ScaleObjects | ( | CRhinoObjectIterator & | it, |
double | scale, | ||
bool | bDeleteOriginal, | ||
bool | bAddTransformHistory, | ||
bool | bTransformReferenceObjects | ||
) |
Description: Creates a new object that is a scaled version of the input object and deletes the existing object if bDeleteOriginal is true.
Scale all objects in the iterator around world origin
This is called for unit changes and in addition to scaling geometry, it may change some attributes. As of Sept 14, 2017, it will scale hatch patterns of hatch objects
class CRhDocSerializeStatus* CRhinoDoc::SerializeStatus | ( | ) | const |
Description: The MFC framework does not provide a good way for options to be passed into the CDocument virtual functions like Serialize, SaveAs, DoSave, ...
bool CRhinoDoc::SetActiveRhinoViewSerialNumber | ( | unsigned int | new_active_rhino_view_sn | ) |
Parameters: new_active_rhino_view_sn - [in] The runtime serial number of a CRhinoView for this document. Returns: True if the input parameter was valid and the document's active view was set.
void CRhinoDoc::SetAutoDelete | ( | BOOL32 | bAutoDelete | ) |
void CRhinoDoc::SetCommandToRepeat | ( | const CRhinoApp::CRhMruCommandRecord & | rec | ) |
void CRhinoDoc::SetModelName | ( | const char * | ) |
void CRhinoDoc::SetModelName | ( | const wchar_t * | ) |
void CRhinoDoc::SetModifiedFlag | ( | BOOL32 | bModified = TRUE | ) |
void CRhinoDoc::SetMruMenuString | ( | LPCTSTR | str | ) |
void CRhinoDoc::SetPageViewNumber | ( | class CRhinoPageView & | pageView, |
int | page | ||
) |
Description: Set page number of a page view window for this model. Parameters: pageView: [in] CRhinoPageView to be changed page: [in] new page number for pageView
void CRhinoDoc::SetPathName | ( | LPCTSTR | , |
BOOL32 | bAddToMRU = TRUE |
||
) |
void CRhinoDoc::SetReadFileResult | ( | ON::ReadFileResult | read_file_result | ) |
Description: Set the value returned by ReadFileResult() to CRhinoDoc::eReadFileResult::Unset. Typically this happens after Rhino has handled the read in whatever way is appropriate.
void CRhinoDoc::SetRedrawDisplayHint | ( | unsigned int | display_hint, |
bool | bShadedOnly = false |
||
) | const |
Description: Expert user tool to set flags used by CRhinoDoc::Redraw(). Parameters: display_hint - [in] one of CRhinoView::regenerate_display_hint CRhinoView::mark_display_hint CRhinoView::refresh_display_hint dm - [in] If the display hint only applies to a certain display mode, set dm to that mode. Otherwise the display hint will be applied to all views.
unsigned int CRhinoDoc::SetSubDAppearance | ( | ON_SubDComponentLocation | subd_appearance | ) |
Parameters: subd_appearance - [in] ON_SubDComponentLocation::Surface - SubD display will be smooth shaded surfaces. ON_SubDComponentLocation::ControlNet - SubD display will be flat shaded control polygons. Returns: Number of subds whose appearance changed. Remarks: SubDAppearance() is a runtime property. It is not saved in 3dm files.
void CRhinoDoc::SetTitle | ( | LPCTSTR | ) |
bool CRhinoDoc::SetUserString | ( | const wchar_t * | key, |
const wchar_t * | string_value | ||
) |
user key-value string pairs on the document Description: Attach a user string to the document. Parameters: key - [in] id used to retrieve this string. string_value - [in] If NULL, the string with this id will be removed. Returns: True if successful.
bool CRhinoDoc::ShowObject | ( | const CRhinoObjRef & | objref, |
bool | bIgnoreLayerMode = false |
||
) |
shows hidden object
Description: If objref.Object()->IsHidden() is true, then the object will be returned to normal (visible and selectable) mode. Parameters: objref - [in] reference to normal object to show bIgnoreLayerMode - [in] if true, the object will be shown even if it is on a layer that is locked or off. Returns: true if the object was successfully shown. See Also: CRhinoDoc::HideObject
const class IRhRdkSkylight& CRhinoDoc::Skylight | ( | ) | const |
BOOL32 CRhinoDoc::SnapTo | ( | const CRhinoSnapContext & | snap_context, |
CRhinoSnapEvent & | snap_event, | ||
const ON_SimpleArray< ON_3dPoint > * | construction_points = 0 , |
||
const ON_SimpleArray< ON_3dPoint > * | snap_points = 0 , |
||
const ON_SimpleArray< ON_3dPoint > * | int_snap_points = 0 |
||
) | const |
Description: Object snapping tool. Parameters: snap_context - [in] snap_event - [out] If SnapTo returns true, then the type and location of the snap is returned in snap_event. construction_points - [in] optional array of points that will be snapped to independent of current point osnap settings. snap_points - [in] optional array of points that will be snapped to if point osnap is enabled. int_snap_points - [in] optional array of points that will be snapped to if int osnap is enabled. Used for snapping to isocurve intersections when input is constrained to a brep or brep face. Returns: true if a snap occurred.
const ON_SimpleArray<class CRhinoPageView*>& CRhinoDoc::SortedPageViewList | ( | ) |
Description: Returns sorted list of all the page views in this model. The sort order can be considered the page number order
void CRhinoDoc::StatusBarProgressMeterEnd | ( | ) |
Description: Ends, or hides, Rhino's status bar progress meter. See Also: CRhinoDoc::StatusBarProgressMeterStart CRhinoDoc::StatusBarProgressMeterPos
int CRhinoDoc::StatusBarProgressMeterPos | ( | const wchar_t * | pszLabel, |
int | nPos, | ||
bool | bAbsolute | ||
) |
Description: Sets the current position of Rhino's status bar progress meter. Parameters: pszLabel - [in] The short description of the progress (e.g. "Calculating", "Meshing", etc). nPos - [in] The position. If ON_UNSET_INT_INDEX, then only the label will be updated. bAbsolute - [in] If true, then the progress meter is moved to nPos (absolute). If false, then the progress meter is moved nPos from the current position (relative). Returns: The previous position if successful. See Also: CRhinoDoc::StatusBarProgressMeterStart CRhinoDoc::StatusBarProgressMeterEnd
int CRhinoDoc::StatusBarProgressMeterPos | ( | int | nPos, |
bool | bAbsolute = true |
||
) |
Description: Sets the current position of Rhino's status bar progress meter. Parameters: nPos - [in] The position. bAbsolute - [in] If true, then the progress meter is moved to nPos (absolute). If false, then the progress meter is moved nPos from the current position (relative). Returns: The previous position if successful. See Also: CRhinoDoc::StatusBarProgressMeterStart CRhinoDoc::StatusBarProgressMeterEnd
int CRhinoDoc::StatusBarProgressMeterStart | ( | int | nLower, |
int | nUpper, | ||
const wchar_t * | pszLabel = nullptr , |
||
bool | bEmbedLabel = true , |
||
bool | bShowPercent = true |
||
) |
Description: Starts, or shows, Rhino's status bar progress meter. Parameters: nLower - [in] The lower limit of the progress meter's range. nUpper - [in] The upper limit of the progress meter's range. pszLabel - [in] The short description of the progress (e.g. "Calculating", "Meshing", etc). bEmbedLabel - [in] If true, then the label will be embedded in the progress meter. If false, then the label will appear to the left of the progress meter. bShowPercent - [in] If true, then the percent complete will appear in the progress meter. Returns: 1 - The progress meter was created successfully. 0 - The progress meter was not created. -1 - The progress meter was not created because some other process has already created it. See Also: CRhinoDoc::StatusBarProgressMeterPos CRhinoDoc::StatusBarProgressMeterEnd
ON_SubDComponentLocation CRhinoDoc::SubDAppearance | ( | ) | const |
Returns: ON_SubDComponentLocation::Surface - SubD display will be smooth shaded surfaces. ON_SubDComponentLocation::ControlNet - SubD display will be flat shaded control polygons. Remarks: SubDAppearance() is a runtime property. It is not saved in 3dm files.
const class IRhRdkSun& CRhinoDoc::Sun | ( | ) | const |
const CRhinoDocTableReference& CRhinoDoc::Table | ( | ON_ModelComponent::Type | component_type | ) | const |
|
static |
Returns: The serial number of the newest document that exists or 0 if no documents exist. This will be the largest serial number of any document that currently exits. Remarks: Other documents may have been created and deleted after this document.
|
static |
Returns: The runtime serial number of the document a command will use if a specific document is not otherwise specified. Remarks:
const wchar_t* CRhinoDoc::TemplateFileUsed | ( | ) | const |
Description: Call this method to get the name of the template file used to create this document. This is a runtime value only present if the document was newly created. Returns: Returns full path to template used to create this document on File/New
|
virtual |
void CRhinoDoc::ThreeViewLayout | ( | bool | bUseMatchingViews = false | ) |
void CRhinoDoc::ThreeViewLayout | ( | ON_BoundingBox | model_bbox, |
bool | bUseMatchingViews = false |
||
) |
CRhinoObject* CRhinoDoc::TransformObject | ( | const CRhinoObject * | old_object, |
const ON_Xform & | xform, | ||
bool | bAddNewObjectToDoc, | ||
bool | bDeleteOriginal, | ||
bool | bAddTransformHistory | ||
) |
Description: Creates a new object that is the transformation of the existing object and deletes the existing object if bDeleteOriginal is true.
Parameters: old_object - [in] reference to object to morph. The object objref.Object() will be deleted if bDeleteOriginal is true. xform - [in] transformation to apply bAddNewObjectToDoc - [in] if true, the new object is added to the document. if false, the new object is not added to the document. bDeleteOriginal - [in] if true, the original object is deleted if false, the original object is not deleted bAddTransformHistory - [in] If true and history recording is turned on, then transformation history is recorded. This will be adequate for simple transformation commands like rotate, move, scale, and so on that do not have auxiliary input objects. For fancier commands, that have an auxiliary object, like the spine curve in ArrayAlongCrv, set bAddTransformHistory to false. Returns: New object that is the morph of the existing_object. The new object has identical attributes.
Remarks: If the object is locked or on a locked layer, then it cannot be transformed.
CRhinoObject* CRhinoDoc::TransformObject | ( | const CRhinoObject * | old_object, |
const ON_Xform & | xform, | ||
bool | bAddNewObjectToDoc, | ||
bool | bDeleteOriginal, | ||
bool | bAddTransformHistory, | ||
bool | bTransformReferenceObjects, | ||
ON_2dexMap * | pGroupMap = 0 |
||
) |
Description: Creates a new object that is the transformation of the existing object and deletes the existing object if bDeleteOriginal is true.
Parameters: old_object - [in] reference to object to morph. The object objref.Object() will be deleted if bDeleteOriginal is true. xform - [in] transformation to apply bAddNewObjectToDoc - [in] if true, the new object is added to the document. if false, the new object is not added to the document. bDeleteOriginal - [in] if true, the original object is deleted if false, the original object is not deleted bAddTransformHistory - [in] If true and history recording is turned on, then transformation history is recorded. This will be adequate for simple transformation commands like rotate, move, scale, and so on that do not have auxiliary input objects. For fancier commands, that have an auxiliary object, like the spine curve in ArrayAlongCrv, set bAddTransformHistory to false. bTransformReferenceObjects - [in] If true reference objects are allowed to be transformed. pGroupMap - [in/out] Optional group map if copy transforming multiple grouped objects, and the new objects should be grouped with other copies and not the originals.
Returns: New object that is the morph of the existing_object. The new object has identical attributes.
Remarks: If the object is locked or on a locked layer, then it cannot be transformed.
CRhinoObject* CRhinoDoc::TransformObject | ( | CRhinoObjRef & | objref, |
const ON_Xform & | xform, | ||
bool | bDeleteOriginal = true , |
||
bool | bIgnoreModes = false , |
||
bool | bAddTransformHistory = false |
||
) |
Description: Creates a new object that is the transformation of the existing object and deletes the existing object if bDeleteOriginal is true.
Parameters: objref - [in] reference to object to transform. The object objref.Object() will be deleted if bDeleteOriginal is true. xform - [in] transformation to apply bDeleteOriginal = [in] if true, the original object is deleted if false, the original object is not deleted bIgnoreModes - [in] If true, locked and hidden objects are transformed. If false objects that are locked, hidden, or on locked or hidden layers are not transformed. bAddTransformHistory - [in] If true and history recording is turned on, then transformation history is recorded. This will be adequate for simple transformation commands like rotate, move, scale, and so on that do not have auxiliary input objects. For fancier commands, that have an auxiliary object, like the spine curve in ArrayAlongCrv, set bAddTransformHistory to false. Returns: New object that is the transformation of the existing_object. The new object has identical attributes.
Remarks: If the object is locked or on a locked layer, then it cannot be transformed.
int CRhinoDoc::TransformObjects | ( | CRhinoObjectIterator & | it, |
const ON_Xform & | xform, | ||
bool | bDeleteOriginal, | ||
bool | bIgnoreModes, | ||
bool | bAddTransformHistory, | ||
bool | bTransformReferenceObjects | ||
) |
As of Sept 14, 2017, This is not used by rhino.
bIgnoreModes | (unused) |
int CRhinoDoc::TransformObjects | ( | CRhinoObjectIterator & | it, |
const ON_Xform & | xform, | ||
bool | bDeleteOriginal = true , |
||
bool | bIgnoreModes = false , |
||
bool | bAddTransformHistory = false |
||
) |
As of Sept 14, 2017, This is not used by rhino.
Description: Transforms every object in a list.
Parameters: it - [in] iterates through list of objects to transform xform - [in] transformation to apply bDeleteOriginal = [in] if true, the original objects are deleted if false, the original objects are not deleted bIgnoreModes - [in] (Parameter is unused and does nothing) If true, locked and hidden objects are transformed. If false objects that are locked, hidden, or on locked or hidden layers are not transformed. bAddTransformHistory - [in] If true and history recording is turned on, then transformation history is recorded. This will be adequate for simple transformation commands like rotate, move, scale, and so on that do not have auxiliary input objects. For fancier commands, that have an auxiliary object, like the spine curve in ArrayAlongCrv, set bAddTransformHistory to false. Returns: Number of objects that were transformed.
Remarks: This is similar to calling TransformObject() for each object int the list except that this function will modify locked and hidden objects. It is used for things like scaling the entire model when a unit system is changed.
bool CRhinoDoc::UndeleteObject | ( | const CRhinoObject * | object | ) |
Description: If object->IsDeleted() is true, then the object is undeleted.
bool CRhinoDoc::Undo | ( | class CRhUndoRecord * | = NULL | ) |
bool CRhinoDoc::UndoActive | ( | ) | const |
Returns: True if Undo() is currently active.
int CRhinoDoc::UndoRecordCount | ( | ) | const |
Returns: Number of undo records.
bool CRhinoDoc::UndoRecordingIsActive | ( | ) | const |
true if actually happening now
bool CRhinoDoc::UndoRecordingIsEnabled | ( | ) | const |
true if permitted
size_t CRhinoDoc::UndoRecordMemorySize | ( | ) | const |
Returns: Number bytes in used by undo records
ON::LengthUnitSystem CRhinoDoc::UnitSystem | ( | ) | const |
OBSOLETE - USE ModelUnits or PageUnits.
Returns: Model space unit system. Remarks: Use DocProperties().PageUnitsAndTolerances() for page space.
bool CRhinoDoc::UnlockObject | ( | const CRhinoObjRef & | objref, |
bool | bIgnoreLayerMode = false |
||
) |
unlocks locked object
Description: If objref.Object()->IsLocked() is true, then the object will be returned to normal (visible and selectable) mode. Parameters: objref - [in] reference to locked object to unlock bIgnoreLayerMode - [in] if true, the object will be unlocked even if it is on a layer that is locked or off. Returns: true if the object was successfully unlocked. See Also: CRhinoDoc::HideObject
int CRhinoDoc::UnselectAll | ( | BOOL32 | bIgnorePersistentSelections = false | ) |
Description: Unselect objects. Parameters: bIgnorePersistentSelections - [in] if true, then objects that are persistently selected will not be unselected. Returns: Number of object that were unselected. See Also: CRhinoObject::Select CRhinoObject::IsSelected
void CRhinoDoc::UpdateAllViews | ( | CView * | pSender, |
LPARAM | lHint = 0L , |
||
CObject * | pHint = NULL |
||
) |
Description: Pipes calls made to CRhinoDoc->UpdateAllViews() to CRhinoDoc::Redraw(). Developers are not supposed to use UpdateAllViews, but sometimes MFC die hards can't help themselves. Parameters: pSender - [in] (can be NULL) lHint - [in] passed to CRhinoDoc::SetRedrawDisplayHint() before CRhinoDoc::Redraw() is called. pHint - [in] ignored Remarks: UpdateAllViews is not a virtual function on CDoc. So, if somebody calls UpdateAllViews from a CDocument pointer, then we can' do anything about it. The views will eventually get drawn, they just won't get drawn in the right order and the snappy Rhino look-n-feel will be missing. See Also: CRhinoDoc::Redraw
class CRhAnonymousUserTable* CRhinoDoc::UserDataTable | ( | void | ) |
bool CRhinoDoc::ValidateNewObjects | ( | ) | const |
Returns: True if CRhinoDoc::AddObject() is validating each object as it is added. This can be time consuming but is valuable for debugging.
const CRhinoView* CRhinoDoc::ViewFromViewportId | ( | ON_UUID | viewport_id | ) | const |
void CRhinoDoc::ViewModified | ( | CRhinoView * | ) |
Description: If you change a view, then call ViewModified. Parameters: view - [in] view that was modified.
bool CRhinoDoc::Write3dmFile | ( | ON_BinaryArchive & | binary_archive, |
CRhinoFileWriteOptions | fwo_in | ||
) |
Description: Write active objects in the current document to an Rhino 3dm file. Parameters: binary_archive - [in] archive to write to fwo_in - [in] file writing options. fwo_out - [out] Complete file writing options that were used and additional status information. Returns: True: Write succeeded. See fwo_out for detailed information about the options that were used. False: Write failed. See fwo_out for detailed information about the failure.
bool CRhinoDoc::Write3dmFile | ( | ON_BinaryArchive & | binary_archive, |
CRhinoFileWriteOptions | fwo_in, | ||
CRhinoFileWriteOptions & | fwo_out | ||
) |
bool CRhinoDoc::WriteFile | ( | CRhinoFileWriteOptions | fwo_in | ) |
Description: Write information in this model to a file. Parameters: fwo - [in] file writing options fwo_out - [out] When you need to know the actual file writing options that were used, then call the version with an fwo_out parameter. The exact details about what options were used and the file writing status information is returned here. Returns: True: File writing succeeded. False: File writing failed. Example:
/ Get filename and export options. CRhinoFileWriteOptions fwo;
/ Get file name: doc.WriteFilePathAndOptionsDialog(fwo,false,fwo);
/ Write file doc.WriteFile(fwo,fwo);
/ Simple way to write a myFileName.3dm file. CRhinoFileWriteOptions fwo; fwo.SetFileName("myFileName.3dm"); doc.WriteFile(fwo);
Remarks: This is the best choice for general file writing. It handles making backups using temporary files, locking and unlocking, loading file writing plug-ins, and many other details.
bool CRhinoDoc::WriteFile | ( | CRhinoFileWriteOptions | fwo_in, |
CRhinoFileWriteOptions & | fwo_out | ||
) |
const class CRhinoFileWriteOptions* CRhinoDoc::WriteFileInProgress | ( | ) | const |
File Writing Returns: If the document is being saved by CRhinoDoc::WriteFile(), then a pointer to the current file writing options is returned. Otherwise, null is returned. Remarks: Never save the returned pointer. If you need to reference the information later, make a copy. File writing plug-ins can use this information to determine what should be saved.
bool CRhinoDoc::WriteFilePathAndOptionsDialog | ( | CRhinoFileWriteOptions | fwo_in, |
unsigned int | minimum_rhino_3dm_version_rescrition, | ||
CRhinoFileWriteOptions & | fwo_out, | ||
HWND | pWndParent = 0 |
||
) | const |
Description: Ask the user for a file name and additional file writing options. The document's default path and current title will be used to create a default file name. Parameters: fwo_in - [in] Current options that determine how the query is performed.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
SDK classes.
Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete Rhino SDK copyright information see http://www.rhino3d.com/developer.
|
friend |
class CRhDocSdkExtension* CRhinoDoc::m__doc_sdk_extension |
class CRhIDefUpdate* CRhinoDoc::m__idef_update |
runtime information used when updating linked instance definitions
CRhinoBitmapTable CRhinoDoc::m_bitmap_table |
bitmaps used in textures, backgrounds, wallpapers, ...
CRhinoDimStyleTable CRhinoDoc::m_dimstyle_table |
dimension styles used in annotation objects
CRhinoGroupTable CRhinoDoc::m_group_table |
groups
CRhinoHatchPatternTable CRhinoDoc::m_hatchpattern_table |
hatch patterns used to fill hatch objects
CRhinoHistoryRecordTable CRhinoDoc::m_history_record_table |
instance definitions (blocks for you AutoCAD types)
CRhinoInstanceDefinitionTable CRhinoDoc::m_instance_definition_table |
instance definitions (blocks for you AutoCAD types)
CRhinoLayerTable CRhinoDoc::m_layer_table |
layers
CRhinoLightTable CRhinoDoc::m_light_table |
rendering lights
CRhinoLinetypeTable CRhinoDoc::m_linetype_table |
linetypes
CRhinoMaterialTable CRhinoDoc::m_material_table |
rendering materials
class CRhSelSetManager* CRhinoDoc::m_selset_manager |
If the command name starts with an underscore "_", then the English names are searched, otherwise the aliases and localized names are searched. CRhCommandManager* m_command_manager;
CRhinoTextureMappingTable CRhinoDoc::m_texture_mapping_table |
texture mappings
|
static |
Returns: The value that will always return NULL when passed to CRhinoDoc::FromRuntimeSerialNumber. Remarks: This can be passed to functions that take a document runtime serial number to mean "no document".