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 > IFrame2
IFrame2 Interface

IFrame2 Interface

Translate
Rotate
RotateEx
Copy
SetupAxes

The IFrame2 interface allows modification of position and orientation of a frame, which implements it. As opposed to  I3DObject: or IFrame interface, IFrame2 takes local coordinates in its methods.

IFrame2 can be obtained by query/cast/coercion from ISection interface of an object of the model, or from relevant I3DObject: or IFrame interface.

See also MiniCAD Sample, Interface List


HRESULT Translate(double vx, double vy, double vz)

Parameters

vx, vy, vz - [in] - Coordinates of the translation vector relative to local axes of the frame

Returns

S_OK in case of success.
Remarks:

TTranslates origin of the local frame along its own (local) x axis by vx, along y axis by vx and  along z axis by vz. Use I3DObject.Translate to perform the operation in global coordinates 


HRESULT Rotate(double dAng, double vxDirAxis, double vyDirAxis, double vzDirAxis)

Parameters

dAng - [in] angle in degrees to rotate by. dAng can be negative.

vxDirAxis, vyDirAxis, vzDirAxis - [in] vector in local coordinates of direction of the rotation axis

Return Values

S_OK in case of success.
Remarks:

Rotates the frame around axis passing through the origin of the frame. Coordinates vxDirAxis, vxDirAxis, vxDirAxis of the axis are expressed in local axes of the frame. 


HRESULT RotateEx(double dAng, double xAxis, double yAxis, double zAxis, double vxDirAxis, double vyDirAxis, double vzDirAxis)

Parameters

dAng - [in] angle in degrees to rotate by. dAng can be negative.

xAxis, yAxis,zAxis- [in] point in local coordinates, where axis or rotation passes through.

vxDirAxis, vyDirAxis, vzDirAxis - [in] vector in local coordinates of direction of the rotation axis

Return Values

S_OK in case of success.
Remarks:
Call this method to rotate the local frame around an arbitrary axis in 3D space. All coordinates are expressed in local axes of the frame. Use I3DObject.Rotate to perform the operation in global coordinates 

HRESULT Copy(IFrame** frame)

Parameters

frame - [in] IFrame interface implemented by the frame object to be copied.

Remarks:
This method will copy position and orientation of frame into the frame, which implements this interface. For example, when this IFrame2 and frame are queried from two different object. the first object will be located at the same point and oriented in the same way as the second object.

HRESULT SetupAxes(int nAxis0, DIVect* axis, int nAxis1)

Parameters

nAxis0 - [in] 0-based index of the axis, which will be directed along axis

nAxis1 - [in] 0-based index of the axis, which will be calculated second

Remarks:
Use this method to make sure that nAxis0 is directed along axis. Direction of others will be modified by making the current nAxis1 axis perpendicular to axis nAxis0 and the last axis will be perpendicular to the others.