DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Expand ModelsModels
Expand DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Expand General GeometryGeneral Geometry
Collapse ModelModel
Expand ViewView
Expand General ComputingGeneral Computing
Expand ViewsViews
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > API Reference > Model > Entities > Operations and Agorithms > IBooleanEntity_DG Go to DGKC docs Search Documentation


IBooleanEntity_DG Interface

Subtract
Unite
Intersect
SurfaceIntersection

Interface for performing Boolean operations

See also: Bool Op sample


void Subtract(IEntity_DG entity)

Subtracts entity from this. entity remains inchanged. Use IEntity_DG.Clone() prior the operation if this entity has to remain unchanged also.

When both entites have "BRep" geometry type, geometry of this entity becomes a compound shape (Implements IBRepCompound_DG) because the result may not be a linked (single piece) geometry.

Individual shapes can be accessed via:
thisEntity > IEntity_DG.GetGeometry() > IGeometry_DG > GetGeometryType()
IGeometry_DG > IBRepGeometry_DG > GetShape() > IBRepShape_DG > GetShapeType()
IBRepShape_DG > IBRepCompound_DG > GetShapeCount()
IBRepCompound_DG > GetShape(index) > IBRepShape_DG > GetShapeType()

If either entity has other than "BRep" geometry type, they both are cloned to "Mesh" type and the result of the operation, which is also a geometry of "Mesh" type is stored in this entity as its new geometry. Query IMesh_DG from geometry of this: thisEntity > IEntity_DG.GetGeometry() > IGeometry_DG > IMesh_DG to access the mesh.


void Unite(IEntity_DG entity)

This entity changes to union of this and entity. entity remains inchanged. Use IEntity_DG.Clone() prior the operation if this entity has to remain unchanged also.

When both entites have "BRep" geometry type, geometry of this entity becomes a compound shape (Implements IBRepCompound_DG) because the result may not be a linked (single piece) geometry

Individual shapes can be accessed via:
thisEntity > IEntity_DG.GetGeometry() > IGeometry_DG > GetGeometryType()
IGeometry_DG > IBRepGeometry_DG > GetShape() > IBRepShape_DG > GetShapeType()
IBRepShape_DG > IBRepCompound_DG > GetShapeCount()
IBRepCompound_DG > GetShape(index) > IBRepShape_DG > GetShapeType()

If either entity has other than "BRep" geometry type, they both are cloned to "Mesh" type and the result of the operation, which is also a geometry of "Mesh" type is stored in this entity as its new geometry. Query IMesh_DG from geometry of this: thisEntity > IEntity_DG.GetGeometry() > IGeometry_DG > IMesh_DG to access the mesh.


void Intersect(IEntity_DG entity)

Intersects this with entity. entity remains inchanged. Use IEntity_DG.Clone() prior the operation if this entity has to remain unchanged also.

When both entites have "BRep" geometry type, geometry of this entity becomes a compound shape (Implements IBRepCompound_DG) because the result may not be a linked (single piece) geometry. Use IEntity_DG.Clone() prior the operation if this entity has to remain unchanged also.

Individual shapes can be accessed via:
thisEntity > IEntity_DG.GetGeometry() > IGeometry_DG > GetGeometryType()
IGeometry_DG > IBRepGeometry_DG > GetShape() > IBRepShape_DG > GetShapeType()
IBRepShape_DG > IBRepCompound_DG > GetShapeCount()
IBRepCompound_DG > GetShape(index) > IBRepShape_DG > GetShapeType()

If either entity has other than "BRep" geometry type, they both are cloned to "Mesh" type and the result of the operation, which is also a geometry of "Mesh" type is stored in this entity as its new geometry. Query IMesh_DG from geometry of this: thisEntity > IEntity_DG.GetGeometry() > IGeometry_DG > IMesh_DG to access the mesh.


IEntity_DG SurfaceIntersection(IEntity_DG entity)

Returns 1D intersection of surfaces. This and entity remain unchanged.

When both entites have "BRep" geometry type the returned entity also has "BRep" geometry. Its BRep shape is a compound (Implements IBRepCompound_DG), which consists of edges. It is recommended to verify that via:
ReturnedEntity > IEntity_DG.GetGeometry() > IGeometry_DG > GetGeometryType()
IGeometry_DG > IBRepGeometry_DG > GetShape() > IBRepShape_DG > GetShapeType()
IBRepShape_DG > IBRepCompound_DG > GetShapeCount()
IBRepCompound_DG > GetShape(index) > IBRepShape_DG > GetShapeType()
IBRepShape_DG > IBRepEdge_DG > GetCurve() > ....

If either entity has other than "BRep" geometry type, they both are cloned to "Mesh" type for the operation. The returned entity is a group (an empty entity), children of which have geometry of "SegmentStrip" type. A group is retuned as the resulting sampled line often consists of several isolated closed loops.

To access the set of loops: Call IEntity_DG.GetChildCount(). If the returned number is zero, the enties do not intersect. To get the k-th intesection loop use:
ReturnedEntity > GetChildAt(k) > IEntity_DG > GetGeometry() > IGeometry_DG > IPointSetGeometry_DG > GetPoints() > IPointArray_DG.