exampleSolids demonstrates the solid kernel API.
This example provides the following tools
-
Boolean Tool: This tool shows how to use ElementGraphicsTool to write a tool for doing boolean operations between elements using the solids kernel api. The base class provides a mechanism for caching geometry collected from elements. Extracting or converting element geometry is potentially an expensive operation; this is particularily true for breps. The geometry cache allows for efficient query operations to be done in the tool's _OnPostLocate method. This tool populates an ElementAgenda of elements that can be represented as surface or solid breps from a pick or selection set. When picking, the tool completes when a minimum of 2 elements have been selected, control can be held to pick additional elements. The tool also supports post-selection using drag select. The _OnElementModify method is used to delete the original elements after a successful boolean result and creation of a new smart solid or surface element.
-
Modify Face Tool: This tool shows how to use LocateSubEntityTool to write a tool for applying local operations to faces using the solids kernel api.
-
Modify Edge Tool: This tool shows how to use LocateSubEntityTool to write a tool for applying blends and chamfers to edges using the solids kernel api.
-
Sub-Entity Tool: This tool shows how to use LocateSubEntityTool to write a tool to identify faces, edges, or vertices of a solid or surface. This tool doesn't modify the element and allows both locked elements and reference elements to be selected. Accepting locked/reference elements would be appropriate for a query tool like measure distance, area, volume.
This example provides the following key-ins to demonstrate the above mentioned tools
-
EXAMPLE BOOLEAN UNION
-
EXAMPLE BOOLEAN DIFFERENCE
-
EXAMPLE BOOLEAN INTERSECTION
-
EXAMPLE BOOLEAN SEW
-
EXAMPLE SUBENTITY LOCATE
-
EXAMPLE FACE OFFSET
-
EXAMPLE FACE TRANSLATE
-
EXAMPLE FACE ROTATE
-
EXAMPLE FACE DELETE
-
EXAMPLE FACE HOLLOW
-
EXAMPLE EDGE ROUND
-
EXAMPLE EDGE CHAMFER