DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


PlanaPlanar Ops C# Sample

Overview

Implementation

All relevant functionality i simplemented by the PlanarOpsDlg class.

Control of the clipping plane on Show and Enable check boxes is done via the IClipPlane interface stored in the m_plane member variable. The interface is obtained the UpdatePlanePresentation() method.

This method also obtains IAxis interface, which gives access to the location and orientation of the plane. The interface is stored in the m_iAxis member.

The main cutting operation is performed by the OnCut() method on "Cut Permanently" button click. Depending on state of  the "Keep Solid" check box the method uses either IBoolSection.Subtract() or IBoolSectionEx.Execute() methods. Notice that the second object in the operation is an abstract one, i.e. it is not a member of the model, although it is represented by ISection iSectPlane interface. iSectPlane is created in PlanarOpsDlg::CreatePlane() which creates the plane using object generator and positions it using a new IAxis interface.