DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Models
Persistence
Model Properties
Collapse EntitiesEntities
Collapse GeometryGeometry
Geometry
Collapse BRepBRep
BRep Overview
BRep Geometry
Shapes
Curves
Surfaces
Faces
Wires
Edges
Compounds
Collapse MeshMesh
Mesh Geometry
Mesh
BRep to Mesh Conversion
Curve Geometry
Line Strips
Point Sets
Overlays
Collapse AttributesAttributes
Local Frame
Appearance
Texture
Properties of an Entity
Collapse Model ItemsModel Items
Items
3D Text
Smart Labels
View Points
Collapse MeasurementsMeasurements
Measurements
Persistent Measurements
Grid
Collapse Operations and AlgorithmsOperations and Algorithms
Boolean Operations
Euclidean Shortest Path
Collapse MovementMovement
Movements
Kinematic Entities
Collision Detection
Collapse Import/ExportImport/Export
Import/Export Overview
Data Flow Sample
STL Tree
Collapse DG Kernel ControlsDG Kernel Controls
Components
DG Kernel Control
Collapse Properies, Methods, EventsProperies, Methods, Events
Properies
Methods
Events
Collapse Interactive FunctionalityInteractive Functionality
View
Context Menu
Measurements
Direct User Access
Modes of DG Kernel
Current Entities
Collapse Selection OverviewSelection Overview
Selection
Selection Event
Collapse Auxiliary ViewsAuxiliary Views
Model Explorer
Birds Eye View
Full Screen window
Collapse Programmatic FunctionalityProgrammatic Functionality
Programming
Queries
Data Types
Object Construction
Generator
Component Context
Initialisation Context
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
IPointArray_DG
IPointMatrix_DG
IPointCloud_DG
Collapse CurvesCurves
ICurve_DG
ILine_DG
ICircle_DG
IEllipse_DG
IBSplineCurve_DG
IBSplineCurveInterpolator_DG
ICurveFreeForm_DG
IArcSpline3DCurve_DG
Collapse 2D2D
ICurve2d_DG
IBSplineCurve2d_DG
ICircle2d_DG
ILine2d_DG
IArc_DG
Collapse SurfacesSurfaces
IUVSurface_DG
IPartialSplineProps_DG
IBSplineSurface_DG
IBezierSurface_DG
IPartialBezierProps_DG
IRectangularTrimmedSurface_DG
ISurfaceOfRevolution_DG
Collapse Oriented ObjectsOriented Objects
IObjectOriented_DG
IPlane_DG
ISphere_DG
ICylinder_DG
ICone_DG
ITorus_DG
IBox_DG
IPolygon3D_DG
IGeometricObject_DG
Collapse GeneralGeneral
IElement_DG
IStrip_DG
Collapse ModelModel
IModel_DG
Collapse EntitiesEntities
IEntity_DG
IEntityArray_DG
IStdShape_DG
IStdShapeRef_DG
IDraw_DG
IEntity2d_DG
IModel2d_DG
Collapse GeometryGeometry
IGeometry_DG
IPointSetGeometry_DG
ISegmentStripGeometry_DG
ICurveGeometry_DG
ISurfacePoint_DG
ISurfacePointArray_DG
ILabel_DG
ILabelGeometry_DG
ISticky_DG
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 Mesh GeometryMesh Geometry
IMesh_DG
IMeshGeometry_DG
IVertex_DG
IVertexSegment_DG
ISimplex_DG
IMeshPoint_DG
IMeshAlgor_DG
IDiffSurface_DG
Collapse AppearenceAppearence
IAppearance_DG
IColor
IMaterial_DG
ITexture_DG
ILineStyle_DG
Collapse MovementMovement
Collapse Collision DetectionCollision Detection
IMetrics_DG
IPathCollisionDetector_DG
IKinematicEntity_DG
IMove_DG
IKinematicSet_DG
ICutEffect_DG
ISpinEffect_DG
IConstraint_DG
Collapse ItemsItems
IModelItem_DG
IItemArray_DG
IDynamicScreenItem_DG
IDynamicScreenItemManager_DG
ISmartLabelManager_DG
Collapse Import / ExportImport / Export
IDataContext_DG
ISTLDataContext_DG
Collapse Operations and AgorithmsOperations and Agorithms
IBooleanEntity_DG
IEuclideanShortestPath_DG
Collapse User DataUser Data
IUserData_DG
Collapse ViewView
IView_DG
ISelection_DG
IScene_DG
ILighting_DG
ILightSource_DG
IViewPoint_DG
IViewPointArray_DG
IMeasurement_DG
IRectangleColor_DG
I2DEditor_DG
IVirtualView_DG
Collapse General ComputingGeneral Computing
IObjectGenerator_DG
IControlInitialisationContext_DG
IGlobalAPI_DG
Collections
IUnknown
IObject_DG
IBitmap_DG
IBlob_DG
IContext_DG
IError_DG
IKCStack
IMenu_KC
IMenuItem_KC
IText
IFont_DG
Collapse ViewsViews
View
Scene
Global Axes
Background
3D Background
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
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
Profiles
Surface Patches
Surfaces and Patch Strips
Input Validation
Collapse Lines and CurvesLines and Curves
3DS Curves
Surface Of Revolution
Collapse Deprecated API ReferenceDeprecated API Reference
Collapse ModelModel
Collapse SectionSection
IBoundary
Collapse 3DS3DS
IProfiles
IProfiledElement_KC
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs 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