public class File3dmObjectTable : File3dmCommonComponentTable<File3dmObject>, IEnumerable<File3dmObject>
Represents a simple object table for a file that is open externally.
This class mimics Rhino.DocObjects.Tables.ObjectTable while providing external access to the file.
Properties
Returns ModelComponentType.ModelGeometry.
Overrides: CommonComponentTable<T>.ComponentType
Returns the total amount of items in the object table, including lights.
Overrides: CommonComponentTable<T>.Count
Methods
Duplicates the object, then adds a copy of the object to the document.
Parameters:
| item (GeometryBase) | The item to duplicate and add. |
| attributes (ObjectAttributes) | The attributes to link with geometry. |
Duplicates the object, then adds a copy of the object to the document.
Parameters:
| item (File3dmObject) | The item to duplicate and add. |
Overrides: File3dmCommonComponentTable<T>.Add
Adds a angular dimension object to the 3dm file object table.
Parameters:
| dimension (AngularDimension) | Dimension object to add. |
| attributes (ObjectAttributes) | Attributes to apply to dimension. |
Returns: A unique identifier for the object.
Adds a angular dimension object to the 3dm file object table.
Parameters:
| dimension (AngularDimension) | Dimension object to add. |
Returns: A unique identifier for the object.
Adds a curve object to the document representing an arc.
Parameters:
| arc (Arc) | An arc to add. |
| attributes (ObjectAttributes) | attributes to apply to arc. |
Returns: A unique identifier for the object.
Adds a curve object to the document representing an arc.
Parameters:
| arc (Arc) | An arc. |
Returns: A unique identifier for the object.
Adds a brep object to Rhino.
Parameters:
| brep (Brep) | A duplicate of this brep is added to Rhino. |
| attributes (ObjectAttributes) | Attributes to apply to brep. |
Returns: A unique identifier for the object.
Adds a brep object to Rhino.
Parameters:
| brep (Brep) | A duplicate of this brep is added to Rhino. |
Returns: A unique identifier for the object.
Adds a curve object to the document representing a circle.
Parameters:
| circle (Circle) | A circle to add. |
| attributes (ObjectAttributes) | attributes to apply to circle. |
Returns: A unique identifier for the object.
Adds a curve object to the document representing a circle.
Parameters:
| circle (Circle) | A circle to add. |
Returns: A unique identifier for the object.
public Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, Guid clippedViewportId)
Adds a clipping plane object to Rhino.
public Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, IEnumerable<Guid> clippedViewportIds, ObjectAttributes attributes)
Adds a clipping plane object to Rhino.
Parameters:
| plane (Plane) | A plane. |
| uMagnitude (double) | The size in U direction. |
| vMagnitude (double) | The size in V direction. |
| clippedViewportIds (IEnumerable<Guid>) | list of viewport ids that the new clipping plane will clip. |
| attributes (ObjectAttributes) | Attributes to apply to point cloud. |
Returns: A unique identifier for the object.
public Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, IEnumerable<Guid> clippedViewportIds)
Adds a clipping plane object to Rhino.
Parameters:
| plane (Plane) | A plane. |
| uMagnitude (double) | The size in U direction. |
| vMagnitude (double) | The size in V direction. |
| clippedViewportIds (IEnumerable<Guid>) | A list, an array or any enumerable of viewport ids that the new clipping plane will clip. |
Returns: A unique identifier for the object.
Adds a curve object to the table.
Parameters:
| curve (Curve) | A duplicate of this curve is added to Rhino. |
| attributes (ObjectAttributes) | Attributes to apply to curve. |
Returns: A unique identifier for the object.
Adds a curve object to the table.
Parameters:
| curve (Curve) | A curve to add. |
Returns: A unique identifier for the object.
Adds a curve object to the document representing an ellipse.
Parameters:
| ellipse (Ellipse) | An ellipse to add. |
| attributes (ObjectAttributes) | attributes to apply to ellipse. |
Returns: A unique identifier for the object.
Adds a curve object to the document representing an ellipse.
Parameters:
| ellipse (Ellipse) | An ellipse to add. |
Returns: A unique identifier for the object.
Adds an extrusion object to Rhino.
Parameters:
| extrusion (Extrusion) | A duplicate of this extrusion is added to Rhino. |
| attributes (ObjectAttributes) | Attributes to link to the object. |
Returns: A unique identifier for the object.
Adds an extrusion object to Rhino.
Parameters:
| extrusion (Extrusion) | A duplicate of this extrusion is added to Rhino. |
Returns: A unique identifier for the object.
Adds a hatch to the document.
Parameters:
| hatch (Hatch) | A hatch. |
| attributes (ObjectAttributes) | Attributes to apply |
Returns: A unique identifier for the hatch, or Guid.Empty on failure.
Adds a hatch to the document.
Parameters:
| hatch (Hatch) | A hatch. |
Returns: A unique identifier for the hatch, or Guid.Empty on failure.
public Guid AddInstanceObject(InstanceReferenceGeometry instanceReference, ObjectAttributes attributes)
Adds an instance reference geometry object to the table.
Parameters:
| instanceReference (InstanceReferenceGeometry) | The instance reference geometry object. |
| attributes (ObjectAttributes) | The attributes to link with the object. |
Returns: A unique identifier for the object.
Adds an instance reference geometry object to the table.
Parameters:
| instanceReference (InstanceReferenceGeometry) | The instance reference geometry object. |
Returns: A unique identifier for the object.
public Guid AddInstanceObject(int instanceDefinitionIndex, Transform instanceXform, ObjectAttributes attributes)
Adds an instance reference geometry object to the table.
Parameters:
| instanceDefinitionIndex (int) | The index of the instance definition geometry object. |
| instanceXform (Transform) | The transformation. |
| attributes (ObjectAttributes) | The object attributes. |
Returns: A unique identifier for the object.
Adds an instance reference geometry object to the table.
Adds an annotation leader to the document. This overload is only provided in the Rhino SDK.
Parameters:
| points (IEnumerable<Point3d>) | A list, an array or any enumerable set of 2d points. |
Returns: A unique identifier for the object; or Guid.Empty on failure.
Adds an annotation leader to the document.
Parameters:
| plane (Plane) | A plane. |
| points (IEnumerable<Point2d>) | A list, an array or any enumerable set of 2d points. |
| attributes (ObjectAttributes) | Attributes to apply to brep. |
Returns: A unique identifier for the object; or Guid.Empty on failure.
Adds an annotation leader to the document.
Parameters:
| plane (Plane) | A plane. |
| points (IEnumerable<Point2d>) | A list, an array or any enumerable set of 2d points. |
Returns: A unique identifier for the object; or Guid.Empty on failure.
Adds an annotation leader to the document. This overload is only provided in the Rhino SDK.
Parameters:
| text (string) | The text. |
| points (IEnumerable<Point3d>) | A list, an array or any enumerable set of 2d points. |
Returns: A unique identifier for the object; or Guid.Empty on failure.
public Guid AddLeader(string text, Plane plane, IEnumerable<Point2d> points, ObjectAttributes attributes)
Adds an annotation leader to the document.
Parameters:
| text (string) | The text. |
| plane (Plane) | A plane. |
| points (IEnumerable<Point2d>) | A list, an array or any enumerable set of 2d points. |
| attributes (ObjectAttributes) | Attributes to apply to brep. |
Returns: A unique identifier for the object; or Guid.Empty on failure.
Adds an annotation leader to the document.
Parameters:
| text (string) | The text. |
| plane (Plane) | A plane. |
| points (IEnumerable<Point2d>) | A list, an array or any enumerable set of 2d points. |
Returns: A unique identifier for the object; or Guid.Empty on failure.
Adds a line object to Rhino.
Parameters:
| line (Line) | A line. |
| attributes (ObjectAttributes) | Attributes to apply to line. |
Returns: A unique identifier for the object.
Adds a line object to Rhino.
Parameters:
| line (Line) |
Returns: A unique identifier for the object.
Adds a line object to Rhino.
Parameters:
| from (Point3d) | The start point of the line. |
| to (Point3d) | The end point of the line. |
| attributes (ObjectAttributes) | Attributes to apply to line. |
Returns: A unique identifier for the object.
Adds a line object to Rhino.
Adds a linear dimension to the 3dm file object table.
Parameters:
| dimension (LinearDimension) | A dimension. |
| attributes (ObjectAttributes) | Attributes to apply to dimension. |
Returns: A unique identifier for the object.
Adds a linear dimension to the 3dm file object table.
Parameters:
| dimension (LinearDimension) | A dimension. |
Returns: A unique identifier for the object.
Adds a mesh object to Rhino.
Parameters:
| mesh (Mesh) | A duplicate of this mesh is added to Rhino. |
| attributes (ObjectAttributes) | Attributes to link to the object. |
Returns: A unique identifier for the object.
Adds a mesh object to Rhino.
Parameters:
| mesh (Mesh) | A duplicate of this mesh is added to Rhino. |
Returns: A unique identifier for the object.
Adds an ordinate dimension object to the 3dm file object table.
Parameters:
| dimension (OrdinateDimension) | Dimension object to add. |
| attributes (ObjectAttributes) | Attributes to apply to dimension. |
Returns: A unique identifier for the object.
Adds an ordinate dimension object to the 3dm file object table.
Parameters:
| dimension (OrdinateDimension) | Dimension object to add. |
Returns: A unique identifier for the object.
Adds a point object to the table.
Adds a point object to the document.
Parameters:
| point (Point3d) | A location for point. |
| attributes (ObjectAttributes) | attributes to apply to point. |
Returns: A unique identifier for the object.
Adds a point object to the table.
Parameters:
| point (Point3d) | A location for point. |
Returns: Id of new object.
Adds a point object to the document.
Parameters:
| point (Point3f) | location of point. |
| attributes (ObjectAttributes) | attributes to apply to point. |
Returns: A unique identifier for the object.
Adds a point object to the document.
Parameters:
| point (Point3f) | location of point. |
Returns: A unique identifier for the object.
Adds a point cloud object to the document.
Parameters:
| points (IEnumerable<Point3d>) | A list, an array or any enumerable set of Point3d. |
| attributes (ObjectAttributes) | Attributes to apply to point cloud. |
Returns: A unique identifier for the object.
Adds a point cloud object to the document.
Parameters:
| points (IEnumerable<Point3d>) | A list, an array or any enumerable set of Point3d. |
Returns: A unique identifier for the object.
Adds a point cloud object to the document.
Parameters:
| cloud (PointCloud) | PointCloud to add. |
| attributes (ObjectAttributes) | attributes to apply to point cloud. |
Returns: A unique identifier for the object.
Adds a point cloud object to the document.
Parameters:
| cloud (PointCloud) | PointCloud to add. |
Returns: A unique identifier for the object.
Adds multiple points to the document.
Parameters:
| points (IEnumerable<Point3d>) | Points to add. |
| attributes (ObjectAttributes) | Attributes to apply to point objects. |
Returns: An array of object unique identifiers.
Adds multiple points to the document.
Parameters:
| points (IEnumerable<Point3d>) | Points to add. |
Returns: List of object ids.
Adds multiple points to the document.
Parameters:
| points (IEnumerable<Point3f>) | Points to add. |
| attributes (ObjectAttributes) | Attributes to apply to point objects. |
Returns: An array of object unique identifiers.
Adds multiple points to the document.
Parameters:
| points (IEnumerable<Point3f>) | Points to add. |
Returns: An array of object unique identifiers.
Adds a polyline object to Rhino.
Parameters:
| points (IEnumerable<Point3d>) | A list, an array or any enumerable set of Point3d. |
| attributes (ObjectAttributes) | Attributes to apply to line. |
Returns: A unique identifier for the object.
Adds a polyline object to Rhino.
Parameters:
| points (IEnumerable<Point3d>) | A list, an array or any enumerable set of Point3d. |
Returns: A unique identifier for the object.
Adds a radial dimension object to the 3dm file object table.
Parameters:
| dimension (RadialDimension) | Dimension object to add. |
| attributes (ObjectAttributes) | Attributes to apply to dimension. |
Returns: A unique identifier for the object.
Adds a radial dimension object to the 3dm file object table.
Parameters:
| dimension (RadialDimension) | Dimension object to add. |
Returns: A unique identifier for the object.
Adds a surface object to the document representing a sphere.
Parameters:
| sphere (Sphere) | A sphere to add. |
| attributes (ObjectAttributes) | Attributes to link with the sphere. |
Returns: A unique identifier for the object.
Adds a surface object to the document representing a sphere.
Parameters:
| sphere (Sphere) | A sphere to add. |
Returns: A unique identifier for the object.
Adds a SubD to the document
Parameters:
| subd (SubD) | the Subd to add |
| attributes (ObjectAttributes) | Attributes to apply |
Returns: A unique identifier for the SubD, or Guid.Empty on failure
Adds a SubD to the document
Parameters:
| subd (SubD) | the Subd to add |
Returns: A unique identifier for the SubD, or Guid.Empty on failure
Adds a surface object to Rhino.
Parameters:
| surface (Surface) | A duplicate of this surface is added to Rhino. |
| attributes (ObjectAttributes) | Attributes to link to the object. |
Returns: A unique identifier for the object.
Adds a surface object to Rhino.
Parameters:
| surface (Surface) | A duplicate of this surface is added to Rhino. |
Returns: A unique identifier for the object.
public Guid AddText(string text, Plane plane, double height, string fontName, bool bold, bool italic, ObjectAttributes attributes)
Adds an annotation text object to the document.
public Guid AddText(string text, Plane plane, double height, string fontName, bool bold, bool italic, TextJustification justification, ObjectAttributes attributes)
Adds an annotation text object to the document.
Parameters:
| text (string) | Text string. |
| plane (Plane) | Plane of text. |
| height (double) | Height of text. |
| fontName (string) | Name of FontFace. |
| bold (bool) | Bold flag. |
| italic (bool) | Italic flag. |
| justification (TextJustification) | The justification of the text. |
| attributes (ObjectAttributes) | Attributes to link to the object. |
Returns: The Guid of the newly added object or Guid.Empty on failure.
public Guid AddText(string text, Plane plane, double height, string fontName, bool bold, bool italic, TextJustification justification)
Adds an annotation text object to the document.
Parameters:
| text (string) | Text string. |
| plane (Plane) | Plane of text. |
| height (double) | Height of text. |
| fontName (string) | Name of FontFace. |
| bold (bool) | Bold flag. |
| italic (bool) | Italic flag. |
| justification (TextJustification) | The justification of the text. |
Returns: The Guid of the newly added object or Guid.Empty on failure.
public Guid AddText(string text, Plane plane, double height, string fontName, bool bold, bool italic)
Adds an annotation text object to the document.
Adds an annotation text object to the document.
Parameters:
| text3d (Text3d) | The text object to add. |
| attributes (ObjectAttributes) | Attributes to link to the object. |
Returns: The Guid of the newly added object or Guid.Empty on failure.
Adds an annotation text object to the document.
Parameters:
| text3d (Text3d) | The text object to add. |
Returns: The Guid of the newly added object or Guid.Empty on failure.
Adds a text dot object to the table.
Parameters:
| text (string) | The text. |
| location (Point3d) | The location. |
| attributes (ObjectAttributes) | Attributes to link with curve. |
Returns: A unique identifier for the object.
Adds a text dot object to the table.
Adds a text dot object to the table.
Parameters:
| dot (TextDot) | The text dot. |
| attributes (ObjectAttributes) | Attributes to link with text dot. |
Returns: A unique identifier for the object.
Adds a text dot object to the table.
Parameters:
| dot (TextDot) | The text dot. |
Returns: A unique identifier for the object.
Clear
public void Clear()
Marks all items as deleted.
Deletes object from document.
Parameters:
| objectId (Guid) | Id of the object to delete. |
Returns: true on success, false on failure.
Parameters:
| item (T) | The item to flag. |
Returns: True on success.
Overrides: CommonComponentTable<T>.Delete
Deletes a collection of objects from the document.
Parameters:
| objectIds (IEnumerable<Guid>) | Ids of all objects to delete. |
Returns: The number of successfully deleted objects.
Parameters:
| index (int) | The index of the item to flag. |
Returns: True on success.
Returns: A string containing the dump.
Finds all File3dmObject that are in a given group.
Parameters:
| group (Group) | A group instance. |
Returns: Array of objects that belong to the specified group or empty array if no objects could be found.
Exceptions:
| ArgumentNullException | If group is null. |
Finds all File3dmObject that are in a given layer.
Parameters:
| layer (Layer) | A layer instance. |
Returns: Array of objects that belong to the specified layer or empty array if no objects could be found.
Exceptions:
| ArgumentNullException | If layer is null. |
Finds all File3dmObject that are in a given layer.
Parameters:
| layer (string) | Layer to search. |
Returns: Array of objects that belong to the specified layer or empty array if no objects could be found.
FindId
Uses the guid to find a model component. Deleted objects cannot be found by id. The guid is the value that is stored in the .Id property. In a single document, no two active objects have the same guid. If an object is replaced with a new object, then the guid persists. For example, if the _Move command moves an object, then the moved object inherits its guid from the starting object. If the Copy command copies an object, then the copy gets a new guid. This guid persists through file saving/opening operations. This function will not find grip objects.
Gets the bounding box containing every object in this table.
Returns: The computed bounding box.
Returns an enumerator that yields all objects in this document. Like in Rhino, this includes lights. Unlike in Rhino, however, all lights are returned in the end of the list.
Returns: An enumerator that yields all objects in a document.
Overrides: CommonComponentTable<T>.GetEnumerator