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 > Open Cascade Technology > GP > IKO_gp_Ax22d
IKO_gp_Ax22d

IKO_gp_Ax22d Interface


Describes a coordinate system in a plane (2D space).
A coordinate system is defined by:
- its origin (also referred to as its "Location point"), and
- two orthogonal unit vectors, respectively, called the "X
Direction" and the "Y Direction".
A gp_Ax22d may be right-handed ("direct sense") or
left-handed ("inverse" or "indirect sense").
You use a gp_Ax22d to:
- describe 2D geometric entities, in particular to position
them. The local coordinate system of a geometric
entity serves for the same purpose as the STEP
function "axis placement two axes", or
- define geometric transformations.
Note: we refer to the "X Axis" and "Y Axis" as the axes having:
- the origin of the coordinate system as their origin, and
- the unit vectors "X Direction" and "Y Direction",
respectively, as their unit vectors.

Query IKO_Standard_Object from this interface to create a copy or obtain the type name

Methods

Init
Init1
Init2
Init3
SetAxis
SetXAxis
SetYAxis
SetLocation
SetXDirection
SetYDirection
XAxis
YAxis
Location
XDirection
YDirection
Mirror
Mirrored
Mirror1
Mirrored1
Rotate
Rotated
Scale
Scaled
Transform
Transformed
Translate
Translated
Translate1
Translated1
_CSFDB_Getgp_Ax22dpoint
_CSFDB_Getgp_Ax22dvydir
_CSFDB_Getgp_Ax22dvxdir

HRESULT Init()

Creates an object representing the reference
co-ordinate system (OXY).


HRESULT Init1(KC2D* P, KC2D* Vx, KC2D* Vy)

Creates a coordinate system with origin P and where:
- Vx is the "X Direction", and
- the "Y Direction" is orthogonal to Vx and
oriented so that the cross products Vx^"Y
Direction" and Vx^Vy have the same sign.
Raises ConstructionError if Vx and Vy are parallel (same or opposite orientation).


HRESULT Init2(KC2D* P, KC2D* V, VARIANT_BOOL Sense)

Creates a coordinate system with origin P and where:
- Vx is the "X Direction", and
- the "Y Direction" is orthogonal to Vx and
oriented so that the cross products Vx^"Y
Direction" and Vx^Vy have the same sign.
Raises ConstructionError if Vx and Vy are parallel (same or opposite orientation).


HRESULT Init3(IKO_gp_Ax2d* A, VARIANT_BOOL Sense)

Creates - a coordinate system where its origin is the origin of
A and its "X Direction" is the unit vector of A, which is:
- right-handed if Sense is true (default value), or
- left-handed if Sense is false.


HRESULT SetAxis(IKO_gp_Ax22d* A1)

Assigns the origin and the two unit vectors of the
coordinate system A1 to this coordinate system.


HRESULT SetXAxis(IKO_gp_Ax2d* A1)

Changes the XAxis and YAxis ("Location" point and "Direction")
of me.
The "YDirection" is recomputed in the same sense as before.


HRESULT SetYAxis(IKO_gp_Ax2d* A1)

Changes the XAxis and YAxis ("Location" point and "Direction") of me.
The "XDirection" is recomputed in the same sense as before.


HRESULT SetLocation(KC2D* P)

Changes the "Location" point (origin) of me.


HRESULT SetXDirection(KC2D* Vx)

Assigns Vx to the "X Direction" of
this coordinate system. The other unit vector of this
coordinate system is recomputed, normal to Vx ,
without modifying the orientation (right-handed or
left-handed) of this coordinate system.


HRESULT SetYDirection(KC2D* Vy)

Assignsr Vy to the "Y Direction" of
this coordinate system. The other unit vector of this
coordinate system is recomputed, normal to Vy,
without modifying the orientation (right-handed or
left-handed) of this coordinate system.


HRESULT XAxis(IKO_gp_Ax2d** ret)

Returns an axis, for which
- the origin is that of this coordinate system, and
- the unit vector is either the "X Direction" of this coordinate system.
Note: the result is the "X Axis" of this coordinate system.


HRESULT YAxis(IKO_gp_Ax2d** ret)

Returns an axis, for which
- the origin is that of this coordinate system, and
- the unit vector is either the "Y Direction" of this coordinate system.
Note: the result is the "Y Axis" of this coordinate system.


HRESULT Location(KC2D* ret)

Returns the "Location" point (origin) of me.


HRESULT XDirection(KC2D* ret)

Returns the "XDirection" of me.


HRESULT YDirection(KC2D* ret)

Returns the "YDirection" of me.


HRESULT Mirror(KC2D* P)


HRESULT Mirrored(KC2D* P, IKO_gp_Ax22d** ret)


HRESULT Mirror1(IKO_gp_Ax2d* A)


HRESULT Mirrored1(IKO_gp_Ax2d* A, IKO_gp_Ax22d** ret)


HRESULT Rotate(KC2D* P, double Ang)


HRESULT Rotated(KC2D* P, double Ang, IKO_gp_Ax22d** ret)

Rotates an axis placement. A1 is the axis of the
rotation . Ang is the angular value of the rotation
in radians.


HRESULT Scale(KC2D* P, double S)


HRESULT Scaled(KC2D* P, double S, IKO_gp_Ax22d** ret)

Applies a scaling transformation on the axis placement.
The "Location" point of the axisplacement is modified.
Warnings :
If the scale S is negative :
. the main direction of the axis placement is not changed.
. The "XDirection" and the "YDirection" are reversed.
So the axis placement stay right handed.


HRESULT Transform(IKO_gp_Trsf2d* T)


HRESULT Transformed(IKO_gp_Trsf2d* T, IKO_gp_Ax22d** ret)

Transforms an axis placement with a Trsf.
The "Location" point, the "XDirection" and the
"YDirection" are transformed with T. The resulting
main "Direction" of this is the cross product between
the "XDirection" and the "YDirection" after transformation.


HRESULT Translate(KC2D* V)


HRESULT Translated(KC2D* V, IKO_gp_Ax22d** ret)

Translates an axis plaxement in the direction of the vector
V. The magnitude of the translation is the vector's magnitude.


HRESULT Translate1(KC2D* P1, KC2D* P2)


HRESULT Translated1(KC2D* P1, KC2D* P2, IKO_gp_Ax22d** ret)

Translates an axis placement from the point P1 to the
point P2.


HRESULT _CSFDB_Getgp_Ax22dpoint(KC2D* ret)


HRESULT _CSFDB_Getgp_Ax22dvydir(KC2D* ret)


HRESULT _CSFDB_Getgp_Ax22dvxdir(KC2D* ret)