DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Expand DG Kernel ComponentsDG Kernel Components
Expand API ReferenceAPI Reference
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > Models > Entities > Operations and Algorithms > Boolean Operations Search Documentation


Boolean Operations on Entities

Boolean operations are enumerated in EBooleanOperation enumeration: In addition to classic Subtraction, Intersection and Union we include Surface Intersection and Clip operations. Surface Intersection returns intersection curve(s) of surfaces of two entities. Clip operation cuts off the surface of the first objects parts inside of the second. The result for a solid is normally and open surface.

Type of the resulting geometry depends on types of the two geometries involved. When both objects are BSpline Brep geometries, the result is also BSpline Brep. When either object has any other type the result will have mesh type. This is true for all operations other than Surface Intersection. Surface Intersection on such geometries will result in a set of curves of "SegmentStrip" geometry type.

To perform Boolean subtract in Model Explorer of the component, make the first object current using Set Current button, Select the second object and in action menu of the explorer select Subtract. If the control key was held just before the command the operation will include children of both objects as if they were solids.

As objects can be easily grouped using Join command of Model Explorer the above allows execution of Boolean operations on groups of objects. Use IBooolEntityEx.Execute3() to do this in a program.

Query IBooolEntityEx interface form the relevant IEntity_DG to carry out Boolean operations programmatically.

Planar Clip operation

IBoolSection interface allows performing clipping entities by an infinite plane. To perform the operation:

1. Create Plane object with the help of  IDIObjectGenerator.Create ( EObjectType.eObjTypePlane ). Actual interface type returned by the Create call is IAxis, which represents normal of the plane, so the returned IUnknown can be safely cast to IAxis or IAxis can be queried from the returned IUnknown. The IAxis interface represents normal of the plane. To modify or retrieve coordinates of the normal call IAxis.SetDirection/IAxis.GetDirection. To modify/retrieve location of the plane call IAxis.SetLocation/IAxis.GetLocation, which are members of the base class ILocation.. All coordinates are assumed to be global.

2. Query ISection from the IAxis obtained in the step 1.

3. Use ISection obtained in the step 2 as  parameter in IBoolSection.Subtract to perform the operation.

See also BoolOp Sample