Shapes of the constructive geometries¶
A csg geometry is a tree of shapes: primitives combined by booleans, moved by transforms and copied by arrays. The flat domain of a surface and the profile of an extrusion or a revolution are 2D trees of the same kind. The sides (2D) and faces (3D) are the names used by the edges and faces selections.
rectangle (2D)¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
Lower corner |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Upper corner |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Sides: xmin, xmax, ymin, ymax.
ball (2D): disk¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
Center |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Radius |
|
number or expression of parameters |
Sides: circle.
ellipse¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
Center |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Semi-axes |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Angle (degrees) |
|
number or expression of parameters. Angle of the first semi-axis with the x axis |
Sides: ellipse.
polygon¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
Vertices |
|
table of the vertices: x, y. Vertices in order (either direction); values or expressions. In the view, drag a vertex, the middle of a side (adds a vertex) or the center. |
Sides: side1, side2, ....
Constraints of a polygon¶
The constraints of a polygon (sides and vertices numbered from 1; the values may be expressions of parameters):
Type |
Constraint |
Keys |
|---|---|---|
|
horizontal side |
|
|
vertical side |
|
|
length of a side |
|
|
angle at a vertex |
|
|
parallel sides |
|
|
perpendicular sides |
|
|
sides of equal length |
|
|
fixed vertex |
|
|
vertex on a vertex of another polygon |
|
rectangle (3D): box¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
Lower corner |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Upper corner |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Faces: xmin, xmax, ymin, ymax, zmin, zmax.
ball (3D)¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
Center |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Radius |
|
number or expression of parameters |
Faces: sphere.
ellipsoid¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
Center |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Semi-axes |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter. along x, y and z (to turn it: Transform) |
Faces: surface.
cylinder¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
Origin |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Axis |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Length |
|
number or expression of parameters |
Radius |
|
number or expression of parameters |
Faces: side, start, end.
extrusion¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
From z to z |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Work plane |
|
one of |
The profile (2D shape below) is extruded along the normal of its plane.
Faces: bottom, top, and the faces swept by the sides of the profile (side with the reference of the side of the profile).
revolution¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
Work plane |
|
one of |
The profile (2D shape below) turns about the z axis of its plane (the profile is in the (r, z) plane).
Faces: the faces swept by the sides of the profile (side with the reference of the side of the profile).
union¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
The first shape is combined with the following ones.
intersection¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
The first shape is combined with the following ones.
difference¶
Field |
Key |
Value |
|---|---|---|
Type |
|
one of |
The first shape is combined with the following ones.
transform (2D)¶
Field |
Key |
Value |
|---|---|---|
Translation |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Rotation (degrees) |
|
number or expression of parameters. Counterclockwise |
Center of rotation |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
The shape below, turned about the center, then translated. Its sides and faces keep their selections.
transform (3D)¶
Field |
Key |
Value |
|---|---|---|
Translation |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Rotation (degrees) |
|
number or expression of parameters. Counterclockwise about the axis (right-hand rule) |
Center of rotation |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Axis of rotation |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter. The rotation is about the line through the center along this axis |
The shape below, turned about the center, then translated. Its sides and faces keep their selections.
array: linear (2D)¶
Field |
Key |
Value |
|---|---|---|
Kind |
|
one of |
Number of copies |
|
number or expression of parameters. The shape itself included |
Step |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter. From a copy to the next one |
The union of copies of the shape below; a selection of a side or a face of the shape holds it on every copy.
array: circular (3D)¶
Field |
Key |
Value |
|---|---|---|
Kind |
|
one of |
Number of copies |
|
number or expression of parameters. The shape itself included |
Center |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter |
Angle between copies (degrees) |
|
number or expression of parameters. 360 / number of copies for a full turn |
Axis of rotation |
|
numbers or expressions of parameters, one per coordinate, or a vector parameter. The rotation is about the line through the center along this axis |
The union of copies of the shape below; a selection of a side or a face of the shape holds it on every copy.
