DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


IKO_gp_Lin2d Interface


Describes a line in 2D space.
A line is positioned in the plane with an axis (a gp_Ax2d
object) which gives the line its origin and unit vector. A
line and an axis are similar objects, thus, we can convert
one into the other.
A line provides direct access to the majority of the edit
and query functions available on its positioning axis. In
addition, however, a line has specific functions for
computing distances and positions.
See Also
GccAna and Geom2dGcc packages which provide
functions for constructing lines defined by geometric
constraints
gce_MakeLin2d which provides functions for more
complex line constructions
Geom2d_Line which provides additional functions for
constructing lines and works, in particular, with the
parametric equations of lines

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

Methods

Init
Init1
Init2
Init3
Reverse
Reversed
SetDirection
SetLocation
SetPosition
Coefficients
Direction
Location
Position
Angle
Contains
Distance
Distance1
SquareDistance
SquareDistance1
Normal
Mirror
Mirrored
Mirror1
Mirrored1
Rotate
Rotated
Scale
Scaled
Transform
Transformed
Translate
Translated
Translate1
Translated1
_CSFDB_Getgp_Lin2dpos

HRESULT Init()

Creates a Line corresponding to X axis of the
reference coordinate system.


HRESULT Init1(IKO_gp_Ax2d* A)

Creates a line located with A.


HRESULT Init2(KC2D* P, KC2D* V)

P is the location point (origin) of the line and
V is the direction of the line.


HRESULT Init3(double A, double B, double C)


HRESULT Reverse()


HRESULT Reversed(IKO_gp_Lin2d** ret)

Reverses the positioning axis of this line.
Note:
- Reverse assigns the result to this line, while
- Reversed creates a new one.


HRESULT SetDirection(KC2D* V)

Changes the direction of the line.


HRESULT SetLocation(KC2D* P)

Changes the origin of the line.


HRESULT SetPosition(IKO_gp_Ax2d* A)

Complete redefinition of the line.
The "Location" point of A is the origin of the line.
The "Direction" of A is the direction of the line.


HRESULT Coefficients(double* A, double* B, double* C)

Returns the normalized coefficients of the line :
A * X + B * Y + C = 0.


HRESULT Direction(KC2D* ret)

Returns the direction of the line.


HRESULT Location(KC2D* ret)

Returns the location point (origin) of the line.


HRESULT Position(IKO_gp_Ax2d** ret)

Returns the axis placement one axis whith the same
location and direction as me.


HRESULT Angle(IKO_gp_Lin2d* Other, double* ret)

Computes the angle between two lines in radians.


HRESULT Contains(KC2D* P, double LinearTolerance, VARIANT_BOOL* ret)

Returns true if this line contains the point P, that is, if the
distance between point P and this line is less than or
equal to LinearTolerance.


HRESULT Distance(KC2D* P, double* ret)

Computes the distance between this and the point P.


HRESULT Distance1(IKO_gp_Lin2d* Other, double* ret)

Computes the distance between this and the point P.


HRESULT SquareDistance(KC2D* P, double* ret)

Computes the square distance between this and the point
P.


HRESULT SquareDistance1(IKO_gp_Lin2d* Other, double* ret)

Computes the square distance between this and the point
P.


HRESULT Normal(KC2D* P, IKO_gp_Lin2d** ret)

Computes the line normal to the direction of me,
passing through the point P.


HRESULT Mirror(KC2D* P)


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


HRESULT Mirror1(IKO_gp_Ax2d* A)


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


HRESULT Rotate(KC2D* P, double Ang)


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

Rotates a line. P is the center 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_Lin2d** ret)

Scales a line. S is the scaling value. Only the
origin of the line is modified.


HRESULT Transform(IKO_gp_Trsf2d* T)


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

Transforms a line with the transformation T from class Trsf2d.


HRESULT Translate(KC2D* V)


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

Translates a line 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_Lin2d** ret)

Translates a line from the point P1 to the point P2.


HRESULT _CSFDB_Getgp_Lin2dpos(IKO_gp_Ax2d** ret)