Focus on Elements
Updated : 21 November 2024
About the Elements
The Elements correspond to general objects in TopSolid, categorized into two main parts:
The Entities represent all items found in the entity tree, including:
- Shapes
- Planes
- Parameters
- Axes
and more...
The Operations type includes all types of operations in the system:
Working with Elements (ElementId)
Access to TopSolid elements is provided through the methods of the IElements
interface, which can be accessed via the TopSolidHost.Elements
property.
Each element is identified by an ElementId
, which may be empty. In such cases, the IsEmpty
property of the identifier will return true.
Every element is associated with a specific document, and the document identifier can be retrieved via the DocumentId
property of the element.
Additionally, elements can have a unique name within the document. Some elements also have a system-generated name.
To find an element by its name, you can use the TopSolidHost.Elements.SearchByName
method.
Note
Some entities have dedicated interfaces, which are described in the table below:
Entity type | Interfaces |
---|---|
Parameters | IParameters |
Shapes | IShapes |
2D Sketches | ISketches2D |
3D Sketches | ISketches3D |
Points, Axes, Planes & Frames | IGeometries2D ,IGeometries3D |
Geometry of Elements (ElementId)
In TopSolid, geometry is divided into two categories:
- 2D Geometry
- 3D Geometry
Access to these geometries is provided through the methods of the IGeometries2D
and IGeometries3D
interfaces.
These interfaces are accessed via the TopSolidHost.Geometries2D
and TopSolidHost.Geometries3D
properties, respectively.
Those interfaces includes vectors, points, axis, frames and transformations management.
SmartObjects for Geometry
SmartObjects
are advanced, intelligent versions of conventional geometry objects, containing additional data.
Each geometric object has a corresponding intelligent version. For example, a Point3D
has a Smart version called SmartPoint3D
,
an Axis3D
has SmartAxis3D
, and so on.