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_Trsf2d
IKO_gp_Trsf2d

IKO_gp_Trsf2d Interface


Defines a non-persistent transformation in 2D space.
The following transformations are implemented :
. Translation, Rotation, Scale
. Symmetry with respect to a point and a line.
Complex transformations can be obtained by combining the
previous elementary transformations using the method Multiply.
The transformations can be represented as follow :

V1 V2 T XY XY
| a11 a12 a13 | | x | | x'|
| a21 a22 a23 | | y | | y'|
| 0 0 1 | | 1 | | 1 |

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

Methods

Init
Init1
SetMirror
SetMirror1
SetRotation
SetScale
SetTransformation
SetTransformation1
SetTranslation
SetTranslation1
SetTranslationPart
SetScaleFactor
IsNegative
Form
ScaleFactor
TranslationPart
VectorialPart
HVectorialPart
RotationPart
Value
Invert
Inverted
Multiplied
Multiply
PreMultiply
Power
Powered
Transforms
Transforms1
_CSFDB_Getgp_Trsf2dscale
_CSFDB_Setgp_Trsf2dscale
_CSFDB_Getgp_Trsf2dshape
_CSFDB_Setgp_Trsf2dshape
_CSFDB_Getgp_Trsf2dmatrix
_CSFDB_Getgp_Trsf2dloc

HRESULT Init()

Returns identity transformation.


HRESULT Init1(IKO_gp_Trsf* T)

Creates a 2d transformation in the XY plane from a
3d transformation .


HRESULT SetMirror(KC2D* P)

Changes the transformation into a symmetrical transformation.
P is the center of the symmetry.


HRESULT SetMirror1(IKO_gp_Ax2d* A)


HRESULT SetRotation(KC2D* P, double Ang)

Changes the transformation into a rotation.
P is the rotation's center and Ang is the angular value of the
rotation in radian.


HRESULT SetScale(KC2D* P, double S)

Changes the transformation into a scale.
P is the center of the scale and S is the scaling value.


HRESULT SetTransformation(IKO_gp_Ax2d* FromSystem1, IKO_gp_Ax2d* ToSystem2)


HRESULT SetTransformation1(IKO_gp_Ax2d* ToSystem)


HRESULT SetTranslation(KC2D* V)

Changes the transformation into a translation.
V is the vector of the translation.


HRESULT SetTranslation1(KC2D* P1, KC2D* P2)

Makes the transformation into a translation from
the point P1 to the point P2.


HRESULT SetTranslationPart(KC2D* V)


HRESULT SetScaleFactor(double S)


HRESULT IsNegative(VARIANT_BOOL* ret)

Returns true if the determinant of the vectorial part of
this transformation is negative..


HRESULT Form(gp_TrsfFormKO* ret)

Returns the nature of the transformation. It can be an
identity transformation, a rotation, a translation, a mirror
(relative to a point or an axis), a scaling transformation,
or a compound transformation.


HRESULT ScaleFactor(double* ret)

Returns the scale factor.


HRESULT TranslationPart(KC2D* ret)

Returns the translation part of the transformation's matrix


HRESULT VectorialPart(IKO_gp_Mat2d** ret)


HRESULT HVectorialPart(IKO_gp_Mat2d** ret)

Returns the homogeneous vectorial part of the transformation.
It is a 2*2 matrix which doesn't include the scale factor.
The coefficients of this matrix must be multiplied by the
scale factor to obtain the coefficients of the transformation.


HRESULT RotationPart(double* ret)


HRESULT Value(int Row, int Col, double* ret)

Returns the coefficients of the transformation's matrix.
It is a 2 rows * 3 columns matrix.
Raises OutOfRange if Row 1 or Row 2 or Col 1 or Col 3


HRESULT Invert()


HRESULT Inverted(IKO_gp_Trsf2d** ret)

Computes the reverse transformation.
Raises an exception if the matrix of the transformation
is not inversible, it means that the scale factor is lower
or equal to Resolution from package gp.


HRESULT Multiplied(IKO_gp_Trsf2d* T, IKO_gp_Trsf2d** ret)


HRESULT Multiply(IKO_gp_Trsf2d* T)


HRESULT PreMultiply(IKO_gp_Trsf2d* T)


HRESULT Power(int N)


HRESULT Powered(int N, IKO_gp_Trsf2d** ret)

Computes the following composition of transformations
this * this * .......* me, N time.
if N = 0 this = Identity
if N 0 this = me.Inverse() *...........* me.Inverse().


HRESULT Transforms(double* X, double* Y)


HRESULT Transforms1(KC2D* Coord)

Transforms a doublet XY with a Trsf2d


HRESULT _CSFDB_Getgp_Trsf2dscale(double* ret)


HRESULT _CSFDB_Setgp_Trsf2dscale(double p)


HRESULT _CSFDB_Getgp_Trsf2dshape(gp_TrsfFormKO* ret)


HRESULT _CSFDB_Setgp_Trsf2dshape(gp_TrsfFormKO p)


HRESULT _CSFDB_Getgp_Trsf2dmatrix(IKO_gp_Mat2d** ret)


HRESULT _CSFDB_Getgp_Trsf2dloc(KC2D* ret)