Collection containing all geometrical entities in the model.
The Shapes collection contains all the geometric entities in the Model. QuickField operates with three types of entities: Vertex, Edge and Block. All these inherit their properties and methods from the base class Shape, so Shapes is a collection of the Shape objects.
The Shapes collection provides methods for creating new vertices and edges, selecting them and creating various sub-collections of ShapeRange type.
To create a new vertex in the model you can use the AddVertex or the AddVertexXY method. The first of them has a parameter as Point object, and the second received Cartesian coordinates of the new vertex as a pair of Double values.
If AutoSnap property is True, the new vertex will be adjusted to the nearest node of the Model's Grid. If it is situated very close to an existing vertex (more precisely in a distance less then a grid cell size) then a new vertex is not created and the old one will be returned instead.
The AddEdge method creates a new edge. If the starting or ending vertices do not exist they are created as well. The result of creating a new edge could be different depending on whether the created edge intersects with other edges or vertices in the model. For the latter the case, a group of adjacent edges on the same line or arc are created. So, the result returned by the AddEdge method is always a ShapeRange collection that can be empty or contain one or more edges.
In the following example, we start with an empty model and create a circle in the model with the center at (0, 0) and radius 5. We compose it from two semicircular arcs.
Then we are going to create a new edge AB. As result we get a collection of three new edges: AC, CD and DB. We assign the label "Cut" to all these edges at once.
Const PI As Double = 3.1415926
Dim prb as QuickField.Problem
Dim mdl As QuickField.Model
Set mdl = prb.Model
' Create the circle
.AddEdge QF.PointXY(0, 5), QF.PointXY(0, -5), PI
.AddEdge QF.PointXY(0, -5), QF.PointXY(0, 5), PI
' Create the edge AB
Dim AB As QuickField.ShapeRange
Set AB = .AddEdge(QF.PointXY(-8, 0), QF.PointXY(8, -2))
' Assign the label to all edges in AB collection
AB.Label = "Cut"
There are several properties of the Shapes and ShapeRange collections that create a new ShapeRange collection containing the entities selected by a rule. A brief description can be found in the How To: Work with Model topic.
The BuildMesh method creates a finite element mesh in the blocks that are members of the collection to which the method is applied. You can generate the mesh in the whole model at once or do it for separate blocks or a group of blocks. The density of generated mesh depends upon the Spacing values defined on vertices in the model.
The RemoveMesh method eliminates the generated finite-element mesh.