Object Model Diagrams

The scripting API is object oriented and reflects the structure of the application object model. Understanding the application object model can help you understand the API. This is particularly true for the introspection methods which become much more intuitive to use when you understand the hierarchical object model. The object model consists of hundreds of objects and it is not feasible to present them in a single diagram. Instead, a series of diagrams is presented that collectively defines the object model. The diagrams are presented with the higher level views first, followed by additional diagrams that present additional levels of detail.

Product Structure object model

Figure 1 below shows the highest level view of the object model – the Product Structure view. Within an application session there is always a single Model. (Future releases will support a Project level above the Model and multiple Models per Project).

The Model composes Assemblies and Parts.

Assemblies can also compose other Assemblies (sub-assemblies), Parts as well as Connections, MeshDependentTies and MeshIndependentTies

Parts compose Geometry and Mesh Bodies as well as Connections, MeshDependentTies and MeshIndependentTies

 Figure 1 - Application Product Structure Object Model:

This view is critical since virtually every script you write will reference the top level “Model” object as the entry point to the functionality of the script. For example,

model = apex.currentModel()

part_1 = model.getCurrentPart()

surfaces = part_1.surfaces

for surface in surfaces:

            print(surface.name)

Geometry and Mesh Bodies

The application supports geometry and mesh “bodies” and Figure 2 below shows the object model for these types.

Geometry supports Solid, Surface, Curve and Point Bodies and each of these is a specialization of the base GeometryBody.

Meshing supports SolidMesh, HexMesh, SurfaceMesh, CurveMesh and PointMesh bodies, each of which is a specialization of the base MeshBody.

All geometry and mesh bodies are composed by Parts

Figure 2 - Application Geometry and Mesh Bodies Object Model:

Geometry Topology

Apex geometry bodies are composed from geometry topology.

Four different types of topology are support – Cells, Faces, Edges and Vertices, each of which is a specialization of the base GeometryTopology as shown in Figure 3 below.

Figure 3 - Application Geometry Topology Object Model:

Solids (geometry body) are composed of Cells (volumes), which are defined by a closed collection of Faces which in turn are composed by a closed loop of Edges, each of which has Vertices at its end. An Edge most often has two vertices, but can sometimes have just one Vertex (a closed edge where the start and end point are the same) or zero Vertices (like a circle or other closed loop).

Surfaces (geometry body) are composed of Faces which in turn are composed by a closed loop of Edges, each of which has Vertices at its end. (Edges may have 2, 1 or 0 Vertices as stated above)

Curves (geometry body) are composed of Edges, each of which has Vertices at its end. (Edges may have 2, 1 or 0 Vertices as stated above)

Points (geometry body) are composed of Vertices. A Point Body may compose multiple Vertices although most people are more familiar with the single Vertex Point Body, which is often referred to as a “Point” – although strictly it is a Vertex within a Point Body.

The topology object models for Solids, Surfaces, Curves and Points are shown in  Figure 4, Figure 5, Figure 6 and Figure 7 respectively below.

Figure 4 - Application Solid Topology:

Figure 5 - Application Surface Topology:

Figure 6 - Application Curve Topology:

Figure 7 - Application Point Topology: