File3dmObjectTable

File3dmObjectTable

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.

Members

count :int

Returns the total amount of items in the object table, including lights.
Type:
  • int

Methods

add(item)

Duplicates the object, then adds a copy of the object to the document.
Parameters:
Name Type Description
item File3dmObject The item to duplicate and add.

addArc(arc, attributes) → {Guid}

Adds a curve object to the document representing an arc.
Parameters:
Name Type Description
arc Arc An arc to add.
attributes DocObjects.ObjectAttributes attributes to apply to arc.
Returns:
A unique identifier for the object.
Type
Guid

addBrep(brep, attributes) → {Guid}

Adds a brep object to Rhino.
Parameters:
Name Type Description
brep Geometry.Brep A duplicate of this brep is added to Rhino.
attributes DocObjects.ObjectAttributes Attributes to apply to brep.
Returns:
A unique identifier for the object.
Type
Guid

addCircle(circle, attributes) → {Guid}

Adds a curve object to the document representing a circle.
Parameters:
Name Type Description
circle Circle A circle to add.
attributes DocObjects.ObjectAttributes attributes to apply to circle.
Returns:
A unique identifier for the object.
Type
Guid

addCurve(curve, attributes) → {Guid}

Adds a curve object to the table.
Parameters:
Name Type Description
curve Geometry.Curve A duplicate of this curve is added to Rhino.
attributes DocObjects.ObjectAttributes Attributes to apply to curve.
Returns:
A unique identifier for the object.
Type
Guid

addEllipse(ellipse, attributes) → {Guid}

Adds a curve object to the document representing an ellipse.
Parameters:
Name Type Description
ellipse Ellipse An ellipse to add.
attributes DocObjects.ObjectAttributes attributes to apply to ellipse.
Returns:
A unique identifier for the object.
Type
Guid

addExtrusion(extrusion, attributes) → {Guid}

Adds an extrusion object to Rhino.
Parameters:
Name Type Description
extrusion Geometry.Extrusion A duplicate of this extrusion is added to Rhino.
attributes DocObjects.ObjectAttributes Attributes to link to the object.
Returns:
A unique identifier for the object.
Type
Guid

addLine(from, to) → {Guid}

Adds a line object to Rhino.
Parameters:
Name Type Description
from Array.<x, y, z> A line start point.
to Array.<x, y, z> A line end point.
Returns:
A unique identifier of new rhino object.
Type
Guid

addMesh(mesh, attributes) → {Guid}

Adds a mesh object to Rhino.
Parameters:
Name Type Description
mesh Geometry.Mesh A duplicate of this mesh is added to Rhino.
attributes DocObjects.ObjectAttributes Attributes to link to the object.
Returns:
A unique identifier for the object.
Type
Guid

addPoint(x, y, z) → {Guid}

Adds a point object to the table.
Parameters:
Name Type Description
x double X component of point coordinate.
y double Y component of point coordinate.
z double Z component of point coordinate.
Returns:
id of new object.
Type
Guid

addPoint(point) → {Guid}

Adds a point object to the table.
Parameters:
Name Type Description
point Array.<x, y, z> A location for point.
Returns:
Id of new object.
Type
Guid

addPointCloud(cloud, attributes) → {Guid}

Adds a point cloud object to the document.
Parameters:
Name Type Description
cloud PointCloud PointCloud to add.
attributes DocObjects.ObjectAttributes attributes to apply to point cloud.
Returns:
A unique identifier for the object.
Type
Guid

addSphere(sphere, attributes) → {Guid}

Adds a surface object to the document representing a sphere.
Parameters:
Name Type Description
sphere Sphere A sphere to add.
attributes DocObjects.ObjectAttributes Attributes to link with the sphere.
Returns:
A unique identifier for the object.
Type
Guid

addSurface(surface, attributes) → {Guid}

Adds a surface object to Rhino.
Parameters:
Name Type Description
surface Geometry.Surface A duplicate of this surface is added to Rhino.
attributes DocObjects.ObjectAttributes Attributes to link to the object.
Returns:
A unique identifier for the object.
Type
Guid

addTextDot(text, location, attributes) → {Guid}

Adds a text dot object to the table.
Parameters:
Name Type Description
text string The text.
location Array.<x, y, z> The location.
attributes DocObjects.ObjectAttributes Attributes to link with curve.
Returns:
A unique identifier for the object.
Type
Guid

deleteItem()

...

findId()

...

get()

...

getBoundingBox() → {Rhino.Geometry.BoundingBox}

Gets the bounding box containing every object in this table.
Returns:
The computed bounding box.
Type
Rhino.Geometry.BoundingBox