CSGBuilder

From Fmepedia

CSGBuilder is a Workbench Transformer.

Table of contents


Description

This transformer takes the first feature with a solid geometry from input A and input B and performs boolean operation between the two solids. If the two solids intersect, or if one of the solids is a CSG or composite solid, then the result is always a CSG. Otherwise, UNION returns a multi-solid that contains both solids, DIFFERENCE returns only the solid from input A, and INTERSECTION returns a NULL geometry.

Any features that do not have solid geometry or extra features that come after the first feature with solid geometry are output through the UNUSED port.

If any Group By attributes are given, then each group will be treated independently, as though each group were in a different dataset and were processed by a separate CSGBuilder.


Note that this transformer is unusual in having multiple output ports where each port produces a different output, the selection of output port thus determines the type of operation to be carried out. The usual behaviour would be to have a transformer setting to determine operation type. However, this new configuration has the advantage of allowing multiple operations to be carried out (by making multiple connections), but at no extra cost (the operations are only performed when the port is connected).



Example

The attached workspace shows an example use of the CSGBuilder transformer.

This example creates a set of 3D objects using the Creator transformer, then manipulates them with the CSGBuilder in the same way as is depicted on the Constructive Solid Geometry (http://en.wikipedia.org/wiki/Constructive_solid_geometry) page on wikipedia.


The Workspace


Above: The CSGBuilder workspace

Notice how the outputs from each CSGBuilder are combined to create the final output.


Each CSGBuilder (A,B,C,D) corresponds with a transformation as defined by the wikipedia CSG tree (below) - in fact rotate the workspace 90 degrees anti-clockwise and you can even see the same tree structure:

  • A: An Intersection process
  • B and C: Union processes
  • D: A Difference process



Output

The output from the workspace is a PDF file which can be rendered in 3D by the standard Abode Reader (v8 or above).


Above: The output shown in the same configuration as the wikipedia example



Above: The output with one cylinder, to show how the circular areas were cut away



Above: CSGBuilder - the movie

Attached Files
filesizedate
CSGBuilderExample.zip375.1 kB11/13/08
csg1.jpg133.0 kB11/13/08
csg2.jpg54.6 kB11/13/08
csg3.jpg22.4 kB11/13/08
csg4.jpg20.7 kB11/13/08
csg4.wmv588.0 kB11/13/08
User Comments Add a new comment