DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Models
Persistence
Collapse EntitiesEntities
Collapse GeometryGeometry
Geometry
Collapse BSpline BRepBSpline BRep
BSpline BRep Overview
BSpline Geometry
Curves
Faces
Wires
Edges
Collapse MeshMesh
Mesh Geometry
Mesh
Line Strips
Point Sets
Collapse Entity AttributesEntity Attributes
Local Frame
Material
Texture
Clipping Planes
Properties of an Entity
3D Grid
Collapse Model ItemsModel Items
Items
View Points
Collapse MeasurementsMeasurements
Measurements
Persistent Measurements
Grid
Collapse Operations and AlgorithmsOperations and Algorithms
Boolean Operations
Euclidean Shortest Path
Collapse MovementMovement
Movements
Kinematic Sections
Collision Detection
Collapse Import/ExportImport/Export
Import/Export Overview
Data Flow Sample
STL Tree
Collapse DG Kernel ComponentsDG Kernel Components
Components
DG Kernel Control
Collapse Properies, Methods, EventsProperies, Methods, Events
Properies
Methods
Events
Collapse Interactive FunctionalityInteractive Functionality
Context Menu
Measurements
Direct User Access
Modes of DG Kernel
Current Entities
Collapse View of DGK ControlView of DGK Control
Global Axes
Background
3D Background
Collapse Selection OverviewSelection Overview
Selection
Selection Event
Collapse Auxiliary ViewsAuxiliary Views
Model Explorer
Birds Eye View
Full Screen window
Collapse Programmatic FunctionalityProgrammatic Functionality
Programming
Porting V5 Apps to DGK
Queries
Data Types
Object Construction
Generator
Component Context
Model Properties
Initialisation Context
Collapse AdvancedAdvanced
64 Bit Development
Memory Management
Third Party Technologies
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
IPointArray_DG
IPointMatrix_DG
Collapse CurvesCurves
ICurve_DG
ICircle_DG
ILine_DG
IBSplineCurve_DG
IBSplineCurveInterpolator_DG
ICurveFreeForm
ICurveFreeFormEx
IArcSpline3DCurve
Collapse 2D2D
ICurve2d_DG
IBSplineCurve2d_DG
ICircle2d_DG
ILine2D
IArc
IArcEx
IEllipse_KC
IStripArcLine_KC
Collapse Oriented ObjectsOriented Objects
IObjectOriented
IPlane_DG
ISphere_DG
ICylinder_DG
ICone_DG
ITorus_DG
IBox_DG
IPolygon3D_DG
IPrizmInfinite_KC
IUVSurface_DG
IGeometricObject_DG
IPartialSplineProps_DG
IBSplineSurface_DG
ISurface
IRectangleAxisAligned_KC
Collapse GeneralGeneral
IStrip
IStripTopol
IElem
IElement
ILocation
ILocationEx
Collapse ModelModel
IModel_DG
Collapse EntitiesEntities
IEntity_DG
IEntityArray_DG
IStdShape_DG
IStdShapeRef_DG
IDraw_DG
IConstraint
Collapse GeometryGeometry
IGeometry_DG
ISurfacePoint_DG
ISurfaceMetric_KC
Collapse BSpline BRep GeometryBSpline BRep Geometry
Collapse Advanced AlgorithmsAdvanced Algorithms
IBRepChamfer_DG
IBRepDraftAngle_DG
IBRepFillet_DG
IFeaturePrism_DG
IBRepShape_DG
IBRepVertex_DG
IBRepEdge_DG
IBRepWire_DG
IBRepFace_DG
IBRepShell_DG
IBRepSolid_DG
IBRepCompositeSolid_DG
IBRepCompound_DG
IShapeArray_DG
IBRepBuilderEx_DG
IWireArrayToSurfaceBuilder_DG
IBRepGeometry_DG
IBRepBuilder_DG
Collapse Native OCCTNative OCCT
IIKO_Standard_Object
IKO_Model
IKO_TopExp_Explorer
BRep
BRepBuilderAPI
BRepExtrema
BRepOffsetAPI
BRepPrimAPI
Geom2d
GeomAPI
GP
ModModeling Algorithms
TColgp
TColStd
TopoDS
TopTools
Collapse Mesh GeometryMesh Geometry
IMesh
IMeshTopol
ISimplex
IMeshMods
IVertex
IMeshEx
IMeshPointKC
IVertexEx_KC
IEdge_KC
ISimplexEx_KC
IMeshAlgor
IMeshBuilder_KC
IMeshShading_KC
Collapse AppearenceAppearence
IAppearance_DG
IColor
IMaterial
ITexture
ILineStyle_KC
Collapse MovementMovement
Collapse Collision DetectionCollision Detection
IMetrics
IMetrics2
IKCPathCollisionDetector
IKinematicSection_KC
IMove_KC
IKinematicSet_KC
ICutEffect_KC
ISpinEffect_KC
Collapse ItemsItems
IModelItem_DG
IItemArray_DG
Collapse Import / ExportImport / Export
ICADFormat_KC
IDataContext
IFormatVersionDataContext
ISTLDataContext
IDataConvert_KC
Collapse Operations and AgorithmsOperations and Agorithms
IBooleanEntity_DG
IBoolSectionEx
ITransform
IDiffSurface_KC
IEuclideanShortestPath_KC
Collapse User DataUser Data
ILayers
IUserData_DG
IMatrixData
Collapse ViewView
IView_DG
ISelection_DG
IViewPoint
IViewPointArray
IScene_DG
IRectangleColor_KC
I2DView_KC
I2DView2_KC
I2DEditor_KC
IPrint_KC
IVirtualView
ILightSource
I3DGrid
Collapse General ComputingGeneral Computing
IObjectGenerator_DG
IControlInitialisationContext_KC
Collections
IUnknown
IObject_DG
ITypeBasic_KC
IBitmap
IBlob
IKCContext
IKCContext2
IError_KC
IKCStack
IMenu_KC
IMenuItem_KC
IGlobalAPI_KC
IRange
IText
IDIFont
I3DBugger
Collapse Embedded User DBEmbedded User DB
IData
Collapse Samples and TutorialsSamples and Tutorials
Sample List
.NET Samples
Delphi and C++ Samples
Collapse GraphicsGraphics
Concepts
3D View
Viewing Volume
Eye Frame
Perspective View
Collapse Math ObjectsMath Objects
Mathematical Objects
Points and Vectors
Planes
Frames
Transforms
Oriented Objects
Boxes
Collapse CurvesCurves
Curve Technologies
Native Curves
Collapse 2D Elements2D Elements
Geometric Elements
Arcs
Line Strips
Collapse DeprecatedDeprecated
Collapse Deprecated GeometryDeprecated Geometry
Collapse 3DS3DS
3DS Generator
Profiles
Surface Patches
Surfaces and Patch Strips
Input Validation
Collapse Lines and CurvesLines and Curves
Line Section
3DS Curves
Surface Of Revolution
Pipes
Collapse Deprecated API ReferenceDeprecated API Reference
Vector Space
General Geometry
Collapse ModelModel
IModel
IModel2
IModelEx
IModelSearch_KC
Collapse SectionSection
IBoundary
IStdShape
ISurfacePointKC
ISurfacePointArrayKC
IBoolSection
ISection
ISection2
ISectionPointSet
ISectionLineStrip
IPipeSection
ILineSection_KC
IObjectPosition_KC
IModelHealer_KC
IPointCloud_KC
Collapse 3DS3DS
I3DSectionGenerator
IAxiBase
IProfiles
IProfiledElement_KC
Collapse SORSOR
ISORSectionGenerator
Clipping Planes
IDraw
IDrawUtil
IDraw2
View
Collapse General ComputingGeneral Computing
IDIObjGenerator
IObject_KC
Collapse CollectionsCollections
IArray
IArray2
IList
IListUnkn_KC
IRelation
IArrayNum
IArray3D
IRefMap_KC
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


IFrame3 Interface

GetOrigin
SetOrigin
GetAxis
Translate
TranslateGlobal
Rotate
RotateGlobal
SetAxes
SetupAxes
Reset
ResetOrientation
Copy
ToLocal
ToGlobal
Push
Pop
ToLocalVector
ToGlobalVector
ToLocalFrame
ToGlobalFrame
Invert

The interface gives access to frames. This interface was added in version 2.3 to give convenient access via single interface to all functionality provided by other frames-related interfaces, namely I3DObject, IFrame, IFrame2 and IFrameEx.

See also Patchwork sampleInterface List


HRESULT GetOrigin(double *x, double *y, double *z)

Parameters

x, y, z- [out] references to variables which will receive coordinates of the origin.

Remarks

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.

Remarks:

Modifies position of the local frame.


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

Parameters

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

x, y, z- [out] references to variables which will receive coordinates of the vector in direction of the nAxis-th axis of the local frame.

Return Values

S_OK in case of success

Remarks
Returns 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

vx, vy, vz- [in] Coordinates of the translation vector. Relative to the frame

Remarks
Call this method to translate origin of the local frame along its x axis by vx, along y axis by vx and  along z axis by vz. Translation coordinates are relative to the current orientation of the frame, not global coordinates

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

Parameters

vx, vy, vz- [in] Coordinates of the translation translation vector in global frame

Remarks:

Translates the frame relative to the global frame.


HRESULT Rotate(double angle, double xAxis, double yAxis, double zAxis, double vxDirAxis, double vyDirAxis, double vzDirAxis)

Parameters

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

xAxis,yAxis,zAxis- [in] point in local coordinates (relative to this frame), where axis or rotation passes through.

vxDirAxis, vxDirAxis, vxDirAxis - [in] vector in local coordinates (relative to this frame) coordinates of direction of the rotation axis

 
Remarks
Rotates the frame around an arbitrary axis.

HRESULT RotateGlobal(double angle, double xAxis, double yAxis, double zAxis, double vxDirAxis, double vyDirAxis, double vzDirAxis)

Parameters

angle - [in] angle in degrees to rotate by. anglecan 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
Rotates the local frame around an arbitrary axis in 3D space. The coordinates are relative to the global axes.

HRESULT SetAxes(int axisInd0, DIVect* axis0, int axisInd1, DIVect* axis1)

Parameters

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

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

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

axis1 - [in] 3D vector which will be set as axisInd1-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.

Returns

S_OK in case of success.
DISP_E_PARAMNOTOPTIONAL in case axis0 or axis1 are zero vectors or have the same direction
 
Remarks
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.

HRESULT SetupAxes(int axis0, DIVect* axis, int axis1)

Parameters

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

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

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

HRESULT Reset()

Remarks:

Resets the frame to its default: After this call the frame will coincide with the global frame .


HRESULT ResetOrientation()

Remarks:

Restores default orientation of the frame: Aligns axes of the frame with the global axes. Location of the frame remains unchanged


HRESULT Copy(IUnknown* frame)

Parameters

frame - [in]  I3DObject, IFrame, IFrame2 or IFrame3 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 IFrame3 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 ToLocal(double *x, double *y, double *z)

Parameters

x, y, z - [in, out] - coordinates of a point to be converted to local frame

Returns

S_OK in case of success.
Remarks:

This method allows conversion of 3D global coordinates to coordinates relative to the local axes of the frame the interface was queried from.


HRESULT ToGlobal(double *x, double *y, double *z)

Parameters

x, y, z - [in, out] - coordinates of a point to be converted to local frame

Remarks:

Converts coordinates relative to the local axes of the frame the interface was queried from to 3D global coordinates.


HRESULT Push()

Stores internally position and orientation of this frame. Noramally called before some modification to be able to restore with a Pop() call


HRESULT Pop()

Restores the last position and orientation stored with Push() call


HRESULT ToLocalVector(DIVect* vect)

Converts a global vector relative to these axes


HRESULT ToGlobalVector(DIVect* vect)

Assuming vect has coordinates relative the these axes converts them to global axes


HRESULT ToLocalFrame(IFrame3* frame)

Makes frame relative to these axes. This means that coordinates of axes and of the origin of frame as returned by I3DObject will be relative the these axes (the frame which implements this interface)


HRESULT ToGlobalFrame(IFrame3* frame)

Assimes that coordinates of frame are relative to this and converts them to global coordinates. This method uses this.ToGlobal() to convert origin of frame and this.ToGlobalVector() to convert all three axes of frame


HRESULT Invert()

Changes this frame in such way that it becomes frame of the inverse transform. See Transforms