MKI_CalcDistance (Calculation) Changed in Version 2019.1

www.CAD6.com

C++ Syntax

bool

MKI_CalcDistance(

 MKI_CONST_GEO_OBJECT_REF f_pGeoObj,

 MKI_CONST_POINT_REF f_rPoint,

 double& f_rResult );

 

Calculates the distance (in internal [mm]) between a standard object and the given point.

 

Parameters

GeoObj

[MKI_CONST_GEO_OBJECT_REF] Standard object to which the distance is to be calculated. Following standard object types are supported (see MKI_OBJ_*):

MKI_OBJ_LINE

MKI_OBJ_CURVE

MKI_OBJ_CIRCLE

MKI_OBJ_ARC

MKI_OBJ_SECTOR

MKI_OBJ_SEGMENT

MKI_OBJ_ELLIPSE

MKI_OBJ_EARC

MKI_OBJ_ESECTOR

MKI_OBJ_ESEGMENT

MKI_OBJ_MARK

MKI_OBJ_GEOENDLESS

MKI_OBJ_GEOBEAM New in Version 2019.1

MKI_OBJ_GEOLINE

MKI_OBJ_GEOCURVE

MKI_OBJ_GEOCIRCLE

MKI_OBJ_GEOARC

MKI_OBJ_GEOSECTOR

MKI_OBJ_GEOSEGMENT

MKI_OBJ_GEOELLIPSE

MKI_OBJ_GEOEARC

MKI_OBJ_GEOESECTOR

MKI_OBJ_GEOESEGMENT

Point

[MKI_CONST_POINT_REF] Coordinates of the reference point in internal [mm] (relative to the internal origin, scale-independent).

Result

[double&] Reference to a double buffer to receive the calculated distance.

 

Return Value

Returns true if successful. If false is returned, Results is invalid.

 

Comment

When initializing the members of the structure MKI_GEO_OBJECT, you need to set only those members that are actually required to describe the object geometrically, i.e., you only have to initialize the following members of MKI_GEO_OBJECT: Type (to indicate which type of object is stored in the structure), p1..p5 (depending on the object type), and Orient (not for the line object types).

 

CAD6interface 2026.0 - Copyright 2026 Malz++Kassner® GmbH