SnapShotsClient

References
public abstract class SnapShotsClient : IDisposable
This is the abstract interface class for all Snapshot clients.

Constructors

SnapShotsClient

#Since v6.0
SnapShotsClient constructor
public SnapShotsClient()

Properties

CppPointer

#Since v6.0
public nint CppPointer { get; }

SerialNumber

#Since v6.0
public int SerialNumber { get; set; }

Methods

AnimateDocument

#Since v6.0
Called for each frame. Starting at 0.0.
public abstract bool AnimateDocument(
doc,
doc is the current document.
dPos,
dPos is the current frame. Starting at 0.0.
archive_start,
archive_start is a archive to the data of the starting position.
archive_stop
archive_stop is a archive to the data of the ending position.
)
true if successful, otherwise false.

AnimateObject

#Since v6.0
Called for each frame. Starting at 0.0.
public abstract bool AnimateObject(
doc,
doc is the current document.
doc_object,
doc_obj is the current object.
transform,
transform is a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed(scale, rotate etc.).
dPos,
dPos is the current frame. Starting at 0.0.
archive_start,
archive_start is a archive to the data of the starting position.
archive_stop
archive_stop is a archive to the data of the ending position.
)

AnimationStart

#Since v6.0
Called once at the start of an animation.
public abstract void AnimationStart(
doc,
doc is the current document.
iFrames
iFrames is the number of frames to be animated.
)

AnimationStop

#Since v6.0
Called once at the end of an animation.
public abstract bool AnimationStop(
doc
doc is the current document.
)

ApplicationCategory

#Since v6.0
Predefined application category
public static string ApplicationCategory()

Category

#Since v6.0
The category of this client. Usually one of the above predefined categories like e.g object, rendering or application category
public abstract string Category()

ClientId

#Since v6.0
The unique id of this client.
public abstract Guid ClientId()
The unique id of this client.

Dispose

#Since v6.0
SnapShotsClient Dispose
public void Dispose()

DocumentCategory

#Since v6.0
Predefined document category
public static string DocumentCategory()

ExtendBoundingBoxForDocumentAnimation

#Since v6.0
Called once at the start of an animation. This can be used to extend the scene bounding box to avoid clipping.
public abstract void ExtendBoundingBoxForDocumentAnimation(
doc,
doc is the current document.
archive_start,
archive_start is a archive to the data of the starting position.
archive_stop,
archive_stop is a archive to the data of the ending position.
bbox
bbox is the current scene bounding box.
)

ExtendBoundingBoxForObjectAnimation

#Since v6.0
Called once at the start of an animation. This can be used to extend the scene bounding box to avoid clipping.
public abstract void ExtendBoundingBoxForObjectAnimation(
doc,
doc is the current document.
doc_object,
doc_obj is the current object.
transform,
transform is a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed(scale, rotate etc.).
archive_start,
archive_start is a archive to the data of the starting position.
archive_stop,
archive_stop is a archive to the data of the ending position.
bbox
bbox is the current scene bounding box.
)

IsCurrentModelStateInAnySnapshot

#Since v6.0
Called before restoring a snapshot. Warns the user if the current model state is not already saved.
public abstract bool IsCurrentModelStateInAnySnapshot(
doc,
doc is the current document.
archive,
archive is the current state of the model.
archive_array,
archive_array is a list of client data.
text_log = null
text_log is used to list the missing items that cannot be found in the current model.
)
return true if successful, otherwise false.

IsCurrentModelStateInAnySnapshot

#Since v6.0
Called before restoring a snapshot. Warns the user if the current model state is not already saved.
public abstract bool IsCurrentModelStateInAnySnapshot(
doc,
doc is the current document.
doc_object,
doc_object is the current object.
archive,
archive is the current state of the model.
archive_array,
archive_array is a list of client data.
text_log = null
text_log is used to list the missing items that cannot be found in the current model.
)
return true if successful, otherwise false.

LayersCategory

#Since v6.0
Predefined layers category
public static string LayersCategory()

LightsCategory

#Since v6.0
Predefined lights category
public static string LightsCategory()

Name

#Since v6.0
The client's name.
public abstract string Name()
The client's name.

ObjectsCategory

#Since v6.0
Predefined objects category
public static string ObjectsCategory()

ObjectTransformNotification

#Since v6.0
Called for every object that is associated with a snapshot and gets transformed in Rhino. This is getting called for each stored snapshot and gives the client the possibility to update the stored data.
public abstract bool ObjectTransformNotification(
doc,
doc is the current document.
doc_object,
doc_obj is the current object.
transform,
transform is a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed(scale, rotate etc.).
archive
archive is a archive which can be used to update the stored data.
)
true if successful, otherwise false.

PlugInId

#Since v6.0
The plug-in id that registers this client.
public abstract Guid PlugInId()
The plug-in id that registers this client.

PrepareForDocumentAnimation

#Since v6.0
Called once at the start of an animation.
public abstract bool PrepareForDocumentAnimation(
doc,
doc is the current document.
archive_start,
archive_start is a archive to the data of the starting position.
archive_stop
archive_stop is a archive to the data of the ending position.
)
true if successful, otherwise

PrepareForObjectAnimation

#Since v6.0
Called once at the start of an animation.
public abstract bool PrepareForObjectAnimation(
doc,
doc is the current document.
doc_object,
doc_obj is the current object.
transform,
transform is a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed(scale, rotate etc.).
archive_start,
archive_start is a archive to the data of the starting position.
archive_stop
archive_stop is a archive to the data of the ending position.
)
true if successful, otherwise false.

RegisterSnapShotClient

#Since v6.0
Function used to register snapshots client
public static bool RegisterSnapShotClient()

RenderingCategory

#Since v6.0
Predefined rendering category
public static string RenderingCategory()

RestoreDocument

#Since v6.0
Called when the user restores a snapshot and SupportDocument() returns true.
public abstract bool RestoreDocument(
doc,
doc is the current document
archive
archive is the archive to read the data from
)
true if successful, otherwise false

RestoreObject

#Since v6.0
Called when the user restores a snapshot and SupportsObjects() and SupportsObject(Rhino.DocObjects.RhinoObject doc_object) returns true.
public abstract bool RestoreObject(
doc,
doc is the current document.
doc_object,
doc_obj is the current object.
transform,
transform is a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed(scale, rotate etc.).
archive
archive is the archive to read the data from.
)
true if successful, otherwise false.

SaveDocument

#Since v6.0
Called when the user saves a snapshot and SupportDocument() returns true.
public abstract bool SaveDocument(
doc,
doc is the current document
archive
archive is the archive to write the data to
)
true if successful, otherwise false

SaveObject

#Since v6.0
Called when the user saves a snapshot and SupportsObjects() and SupportsObject(Rhino.DocObjects.RhinoObject doc_object) returns true.
public abstract bool SaveObject(
doc,
doc is the current document.
doc_object,
doc_obj is the current object.
transform,
transform is a transformation matrix. The matrix is set to identity the first time an object is associated with a snapshot. After that the matrix is updated when the object is transformed(scale, rotate etc.).
archive
archive is the archive to write the data to.
)
true if successful, otherwise false.

SnapshotRestored

#Since v6.0
Called after all clients restored their data.
public abstract void SnapshotRestored()

SupportsAnimation

#Since v6.0
Returns true if the client allows animation.
public abstract bool SupportsAnimation()
true if the client allows animation.

SupportsDocument

#Since v6.0
Defines if the client supports document user data or not
public abstract bool SupportsDocument()
true if the client saves/restores document user data.

SupportsObject

#Since v6.0
Returns true if the client saves/restores object user data for the given object.
public abstract bool SupportsObject(
doc_object
doc_object is the given object
)
true if the client saves/restores object user data for the given object.

SupportsObjects

#Since v6.0
Returns true if the client saves/restores object user data.
public abstract bool SupportsObjects()
true if the client saves/restores object user data.

ViewsCategory

#Since v6.0
Predefined views category
public static string ViewsCategory()