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 > 2D Geometry > IArcEx
IArcEx Interface

IArcEx Interface

GetPoint
GetRadius
SetRadius
IsValid
GetCenter
GetAngleRange
PassThroughPoint

The interface is implemented by Arcs. It allows calculation of additional properties associated with an arc. Basic properties of an arc can be accessed via IArc and ILine2D.

Before calling GetPoint, GetCenter or GetAngleRange methods of this interface the arc must be initialized.

See also Patchwork sampleInterface List


HRESULT GetPoint(double t, double* x, double* y)

Parameters

t - [in] Normalized Natural Parameter along the arc. t must be in range [0, 1]

x, y - [out] returned coordinates of the point

Remarks:

The method returns point at position t on the arc.


HRESULT GetRadius(double* r)

Parameters

r - [out, retval] Returned radius

Remarks:

The method is provided for convenience. It returns 1.0 / Curvature. When curvature is zero a large positive number ( 1.7E+308 ) is returned.


HRESULT SetRadius(double r)

Parameters

r - [in] New radius for the arc. See remarks below

Return Values

S_OK in case of success.

DISP_E_PARAMNOTOPTIONAL if r is 0

Remarks:

The method changes curvature Curvature to 1 / r. r must not be 0.  The method does no check validity of the resulting arc, assuming that further modifications may follow before usage of the arc object. If arc has been modified with this method the Init method below must be called prior calling any other methods of IArcEx.


HRESULT IsValid(VARIANT_BOOL *valid)

Parameters

valid - [out, retval] returned validity of the arc

Remarks:

The method returns true if the arc is valid.


HRESULT GetCenter(double* x, double* y)

Parameters

x, y - [out] The returned center of the arc

Remarks:

Calculates center of the arc. The arc must be valid and initialized


HRESULT GetAngleRange(double* a, double* b)

Parameters

a - [out] Polar angle of the first end.

b - [out] Polar angle of the second end.

Remarks:

TThe method returns polar angle (angle between radius towards a point and radius in positive direction ox x axis) of the first and the second end.


HRESULT PassThroughPoint(double x, double y, int* result)

Parameters

x,y - [in] Coordinates of point to lie on this arc

result - [out,retval] - result code. See remurks

Remarks:

TThe method modifies curvature of this arc so that the arc passes thourg the specified point. Returns: -1 the modification is impossible geometrically, but the curvature was been modified to the nearest valid value, 0 - the arc already contains the point and there were no changes, 1 - the arc was successfully modified