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


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.