Basics

This section provides a bottom-up description of the basic concepts behind queddy. It's a journey from simple triangles to an HTTP API accessible through the internet.

Triangles – queddy's basic graphics primitives

Triangles are simple, efficient to render onto the screen, and easy to post process for further needs (e.g. to control 3D printers). queddy uses the boundary representation (B-rep) method with triangles as basic graphics primitives to represent the shapes of three-dimensional objects.

Polygonal and subdivision surfaces – queddy's containers for triangles

Although queddyprovides the possibility to define each triangle explicitly, in most cases triangles are better automatically derived from a higher level of abstraction – in queddy's case from polygonal surfaces (Fig. 1) or subdivision surfaces (Fig. 2).

Fig. 1: polygonal surface

Fig. 2: subdivision surface

Polygonal surfaces are flat and can have rings (i.e. inner face boundaries, e.g. for holes). The surface and ring boundaries are defined by vertices and their connecting sharp edges. queddy computes a set of triangles which fulfills these constraints.

Subdivison surfaces are free form surfaces which are defined by a control mesh. The control mesh consists of vertices and their connecting sharp or smooth edges. queddy computes the corresponding set of triangles by processing several subdivision steps on the control mesh.

B-rep mesh – queddy's basic data structure

queddy's B-rep mesh integrates the control data for polygonal surfaces and subdivision surfaces in one common data structure. It contains vertices, edges, and faces in addition to information about the relationship among themselves.

The following properties of vertices, edges, and faces can be defined by the user directly:

Additionally, some topological relationship information is automatically generated and stored to navigate through the mesh:

Finally, the orientation of faces is defined by convention and follows the right-hand rule: faces are surrounded by their bounding edges in counter-clockwise direction.

Here is an example illustrating how different combinations of sharp (red) and smooth (green) edges in queddy's B-rep mesh result in different face shapes:

Fig. 3: face shapes as result of sharp and smooth edges

In particular, these are:

Excursus: halfedges – queddy's unique positions in the B-rep mesh

queddy implements the concept of halfedges. A typical edge connects two vertices and belongs to two faces. queddy splits every edge in two halfedges, each assigned to one of the two vertices and one of the two faces. These combinations of one vertex and one face are unique and therefore represent unique positions in the B-rep mesh.

Fig. 4: one halfedge (e16: right vertex, blue face) ...

Fig. 5: ... the other halfedge (e17: left vertex, yellow face)

The relationship between two associated halfedges is defined by convention: each even integer id and its successor belong to the two halfedges of one edge (e.g.: e0/e1, e2/e3, e16/e17, e42/e43, ...).

Notes:

Euler operators – queddy's small set of B-rep mesh manipulators

Euler operators are a closed and complete set of operators for mesh manipulation which – at any time – leave a topologically correct B-rep mesh. More details about queddy's actual implementation of Euler operators can be found here.

Python – queddy's scripting language

queddy's Euler operators and some further supporting functions are provided through a Python API (see here for details). This makes queddy a generative modeling tool where the shapes of three-dimensional objects are rather programmed than drawn.

HTTP API – queddy's access point in the internet

queddy is designed to be accessed via the internet. The Python model code is sent to the URL of queddy's modeling kernel which returns a 3D model in the requested format (e.g. X3D, STL, OBJ, glTF).