DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse ViewsViews
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


IStripArcLine_KC Interface

AddPoint
CloseStrip
Clear
DeletePoint
DeleteLine
GetLength
GetDistPoint
GetOrientation
GetPointLocation
Reverse
Sample

The interface is implemented by 2D Arc and straight line splines.

A standalone strip can be created via IObjectGenerator_DG.Create("StripArcLine_KC") > IStripArcLine_KC query.

See also Interface List


HRESULT AddPoint(double x, double y, VARIANT_BOOL arc, VARIANT_BOOL head, IElement** point)

Parameters
x, y -[in] coordinates of the point
arc -[in] type of link to add
head -[in] End of this strip to extend
point -[out,retval] The added point
Remarks
Extends this strip by adding a line or arc from an end to the point (x,y).

HRESULT CloseStrip(VARIANT_BOOL arc, ILine2D** link)

Parameters
arc -[in] type of link to add
link -[out,retval] The added line or arc segment
Remarks

Connects ends of an open strip. Does nothing if the strip was already closed


HRESULT Clear()

Deletes all elements from the strip.


HRESULT DeletePoint(IElement* point)

Deletes the point. If the point was an end, the adjacent line element is deleted also. If the point was internal, the two adjacent line elements are replaced with a shortcut to keep the strip linked


HRESULT DeleteLine(ILine2D* line)

The method modifies ends of the line. If the stip was closed it becomes open. If the stip was open and the line was not an end no action is taken


HRESULT GetLength(double* length)

Returns the total length of the strip.


HRESULT GetDistPoint(double x, double y, KC2D* pointThis, double* dist)

Parameters

x, y - [in] coordinates of the point
pointThis - [out] The nearest point on the strip
dist - [out,retval] The returned distance

Remarks

Calculates distance of a point to the strip. If pointThis is not null it will contain coordinates of the nearest point on the strip. pointThis can lie anywhere on any linear element (often is not a point of the strip). When there are more than one nearest point, pointThis is selected randomly


HRESULT GetOrientation(KC3State* ccw)

Returns kcTrue is this strip has Counter Clock Wise winding. Returns kcUnknown if strip is open


HRESULT GetPointLocation(double x, double y, EPointLocation2D* location)

Identifies location of the point with respect to this strip.


HRESULT Reverse()

Swaps ends of each linear element and the order in which all elements are listed.


HRESULT Sample(double deviation, IArrayNum** points)

Parameters

deviation- [in] Maximal deflection of the strip from the resulting approximation with segments
points - [out,retval] The returned array of sampling points as pairs

Remarks

Returns array of sampling points on this strip as pairs.