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

I3DObject Interface

GetOrigin
SetOrigin
GetAxis
Translate
Rotate

I3DObject interface allows modification of position and orientation of the local frame and hence position and orientation of the whole object, which implements it.

I3DObject can be obtained by query/cast/coercion from ISection interface of the correspondent object of the model.

Methods of this interface use coordinates relative to the global axes. Very often it is more convenient to express rotations or translations of the frame revative to its current orientation and position. Query IFrame2 from I3DObject to achieve that.


See also MiniCAD Sample, IInterface List

HRESULT GetOrigin(double *px, double *py, double *pz)

Parameters

px, py, pz- [out] pointers to variables which will receive coordinates of the origin.

Returns

S_OK in case of success.

Remarks

Call this method to retrieve coordinates of the origin of the local frame.


HRESULT SetOrigin(double x, double y, double z)

Parameters:

x, y, z - [in] coordinates of new position of the origin.

Returns

S_OK in case of success.
Remarks
Call this method to change position of the local frame.

HRESULT GetAxis(int nAxis, double *x, double *y, double *z)

Parameters

int nAxis  - [in] 0-based index of the axis.

px, py, pz- [out] pointers to variables which will receive coordinates of the vector which points in direction of the nAxis-th axis of the local frame.

Return Values

S_OK in case of success
Remarks
RReturns coordinates of vector which points in direction of the nAxis-th axis of the local frame.

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

Parameters

px, py, pz- [in] step size in x,y and z direction respectively

Return Values

S_OK in case of success

Remarks
Call this method to translate origin of the local frame along global x axis by vx, along global y axis by vx and  along global z axis by vz.

HRESULT Rotate(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 global coordinates, where axis or rotation passes through.

vxDirAxis, vxDirAxis, vxDirAxis - [in] vector in global 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. RotateStd method of IFrame offers a simplified version of this operation.