Points (e.g. vertices) are created thanks to an object called
PointSet of the
Geometry using the member function
define(). Once created, they are stored in the
Points are the geometrical entities of the lowest level. They are used to define later Curves.
pt = pointset.define(number, x, y [, z])
| ||user number (unique among Points and $\ge 1$)|
| ||coordinates of this point ($z=0$ by default)|
Definition of the 4 vertices of a square of length $L=5$. The python variable $L$ is used here to parametrize the positions of the points.
L=5 pointset = geometry.getPointset() p1 = pointset.define(1, 0, 0) p2 = pointset.define(2, L, 0) p3 = pointset.define(3, L, L) p4 = pointset.define(4, 0, L)
The following command prints the created points as a list:
which produces the following output:
PointSet of size 4 (hash=off) Point #1 nDB= (pos in DB) p=[0 0 0] Point #2 nDB= (pos in DB) p=[5 0 0] Point #3 nDB= (pos in DB) p=[5 5 0] Point #4 nDB= (pos in DB) p=[0 5 0]