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


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)