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 > KernelCAD Components > Interfaces > Frames > IFrame
IFrame Interface

IFrame Interface

RotateStd
SetAxes
Reset

Methods inherited from I3DObject:

GetOrigin
SetOrigin
GetAxis
Translate
Rotate

IFrame interface is used only to control orientation and position of different frames in the DInsight software. A frame is actually a local system of coordinates. It is uniquely determined by 3D point of its origin in global coordinates and 3D vectors of its axes. To be valid, vectors of the axes must have length 1.0 and be orthogonal to each other.  IFrame interface is inherited from and hence has all methods of I3DObject interface. Additional methods allow more flexibility in manipulation of the frame.

Currently IFrame is can be queried only either from IView or ISection interface. In case of IView IFrame represents current position of the global frame with respect to the point of view. More precisely IFrame controls coordinates of the global frame relative to the Eye Frame. When IFrame is queried from ISection it acts as an extension of I3DObject and exposes position and orientation of the object in 3D space.

To create a new (standalone) frame to for some calculations call IDIObjGenerator.Create or IDIObjGenerator.Create2 with eType parameter set to eObjTypeFrame member of EObjectType enumeration. The returned IUnknown reference has actual type IFrame and can be safely cast to or queried from to convert to IFrame type.

See also Modal View Sample, Interface List


HRESULT RotateStd(double dAng, int nAxis)

Parameters

dAng - [in] Angle of rotation in degrees .

nAxis - [in] 0-based index of the axis around which the rotation will be performed 

Returns

S_OK in case of success.

Remarks

Changes orientation of the frame by rotating it around its specified axis


HRESULT SetAxes(int nAxis0, DIVect* axis0, int nAxis1, DIVect* axis1, bool bOrientation)

Parameters:

nAxis0 - [in] 0-based index of axis, which will be changed to axis0. 

axis0 - [in] 3D vector which will be set as nAxis0-th axis of the frame. DIVect type is described in Basic Types

nAxis1 - [in] 0-based index of axis, which will be changed to axis1. 

axis1 - [in] 3D vector which will be set as nAxis1-th axis of the frame. DIVect type is described in Basic Types. Supplying zero vector for this parameter means the axis is not specified. The method will select an arbitrary orthogonal axis.

bOrientation - [in] normally is true. If bOrientation is true the resulting axes will have normal positive orientation like standard Cartesian system of coordinates. Otherwise direction of the remaining axis will be changed to opposite in the end of the method call (See remarks).

Returns

S_OK in case of success.
DISP_E_PARAMNOTOPTIONAL in case axis0 or axis1 are zero vectors or have the same direction
 
Remarks
This methods is provided for the case when simpler RotateStd method is not satisfactory. Call this method to set directions of axes of the frame. DIVect type is described in Basic Types. Normally axis0 and axis1 are orthogonal vectors. They must not have the same direction otherwise the method will fail with DISP_E_PARAMNOTOPTIONAL return code. If axis0 and axis1 are not orthogonal orthogonalization is applied to axis1. Supplying zero vector for axis1 parameter means the axis is not specified. The method will select an arbitrary orthogonal axis. In addition to that, both vectors are normalized to make their lengths equal to 1.0. The third remaining axis is calculated using the supplied ones and condition that it must be orthogonal to both of them and have its length equal to 1.0.
 
bOrientation is normally is true. In this case the resulting axes will have normal positive orientation like standard Cartesian system of coordinates. Otherwise direction of the remaining axis will be changed to opposite in the end of the method call.


HRESULT Reset()

Return Values

S_OK in case of success
Remarks
Resets the frame to its default: After this call the frame will coincide with the global frame .