Data model of solids and faces
There are mainly three "families" of geometric entities in CADability:
- Curves (line, arc, circle, spline etc.)
- Blocks (block, hatch, dimension)
- BRep (solids, faces, edges, vertices)
- Vertex (e.g. the vertex of a cube)
- Edge (e.g. the edge of a cube)
- Face (e.g. one side of a cube)
- Shell (e.g. all the sides of a cube)
- Solid (a shell with no open edges)
What is the difference between Hatch and Face objects?
The purpose of the Hatch object is to enable the user to fill planar bounded regions with patterns or color. If filled by a color it looks exactely like a Face, and actually contains a face as a child object. The Hatch object is a Block object, which creates its child objects according to the HatchStyle and SimpleShape. The content may be a number of lines or other curves or a Face. A Hatch object is always planar.
The Face object is defined by a geometrical surface (e.g. a plane or a sphere) and the bounds which are the edges of the face. Faces may be planar or bend in space according to their Surface and connected with other Faces to build a shell.
How do I create a cube, sphere, cylinder or other 3D object?
Make3D is a class with many static methods to create solids.
How to combine different solids (fuse, cut, etc.)?
How to make faces or solids from 2D contours?
If you have a bunch of curves (lines, arcs, circles, splines etc.) that are in a plane (not necessary the X/Y-Plane) and describe an outline or border (and maybe some holes inside that border), you can make a Face calling . The curves need not to be oriented or ordered in a certain way. You can use Extrude with that face to make a prism based on the 2D contour.