CSGBuilder
Creates Constructive Solid Geometry (CSG) from pairs of solid geometry features which are input through the A and B ports.
CSG is useful for representing complex solids by specifying the Boolean operations between simpler solids. For example, a wall with a window can be represented by taking the difference of the solid wall against the window. The CSGBuilder can be used to create a CSG solid that is comprised of relationships (order of Boolean operations or a hierarchy of Boolean operations) between the simpler solids.
Input Ports
- A and B: Pairs of solid geometry features.
Output Ports
Each Boolean operator is output via its corresponding port:
Merges two objects into one.
Subtracts one object from another.
The portion common to both objects.
Any features that do not have solid geometry, or extra features that come after the first feature with solid geometry in each group, are output through the <Rejected> port.
Parameters
If any Group By attributes are given, then each group will be treated independently. This allows a single transformer to operate on multiple pairs of input features.
Process At End (Blocking): This is the default behavior. Processing will only occur in this transformer once all input is present.
Process When Group Changes (Advanced): This transformer will process input groups in order. Changes of the value of the Group By parameter on the input stream will trigger processing on the currently accumulating group. This may improve overall speed (particularly with multiple, equally-sized groups), but could cause undesired behavior if input groups are not truly ordered.
There are two typical reasons for using Process When Group Changes (Advanced) . The first is incoming data that is intended to be processed in groups (and is already so ordered). In this case, the structure dictates Group By usage - not performance considerations.
The second possible reason is potential performance gains.
Performance gains are most likely when the data is already sorted (or read using a SQL ORDER BY statement) since less work is required of FME. If the data needs ordering, it can be sorted in the workspace (though the added processing overhead may negate any gains).
Sorting becomes more difficult according to the number of data streams. Multiple streams of data could be almost impossible to sort into the correct order, since all features matching a Group By value need to arrive before any features (of any feature type or dataset) belonging to the next group. In this case, using Group By with Process At End (Blocking) may be the equivalent and simpler approach.
Note: Multiple feature types and features from multiple datasets will not generally naturally occur in the correct order.
As with many scenarios, testing different approaches in your workspace with your data is the only definitive way to identify performance gains.
Related Transformers
CSG is the unevaluated model. The CSGEvaluator can be used to compute the equivalent boundary representation of the CSG solid.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Transformer Categories
FME Licensing Level
FME Professional edition and above
Resources
See the definition of CSG at http://en.wikipedia.org/wiki/Constructive_solid_geometry.
Search FME Community
Search for samples and information about this transformer on the FME Community.