KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > Programming Samples and Tutorials > Visual Basic Samples > Cross View
Cross View VB6 Sample

Cross View Visual Basic 6 Sample

Overview

Details Of Application Design

The Samples\VB\CrossView folder of the installation directory contains three separate project folders for High, Mid and Low level implementations

Normals calculation is implemented only in the Low level.

The CrossViewForm  uses calls to Activate(), UpdateCrossSectionView() and Setup() methods to delegate the relevant task to the specific implementation class.

Low implementation of the sample provides also a way to display and test mapping of 2D coordinates of Crsosssection view (right hand window) and coordinates the correspondent point in 3D space. Low level transforms coordinates of the crossection line to 2D coordinates in the local frane which defines the plane.

Implementation

The most critical work is done inside UpdateCrossSectionView() of the form which is called on "Update Cross-Section View" button clicks and also on start of the application or when implementation type is changed. The method delegates the call to UpdateCrossSectionView() of the currently active implementation class via virtual call.

In case of Low level implementation LowImplementation.AlignViewPlane() method uses IFrame.SetAxes to align z and x axes of the Eye Frame for two dimensional style of view

Cross section plane is rendered using the first clipping plane of the pipe section. The clipping plane is not enabled because it used only for rendering purpose. Preparation of the plane is done in SetupRenderingPlane() method of the form/dialog

Notice also the way frame of the 2D View is rendered inside of OnClientDraw(). It uses IGraphicItem queried from IView in CreateFrameGraphicItem().