MKI_CalcTangent (Calculation) Changed in Version 2015.0

www.CAD6.com

C++ Syntax

__int32

MKI_CalcTangent(

 MKI_CONST_GEO_OBJECT_REF f_rGeoObj1,

 MKI_CONST_GEO_OBJECT_REF f_rGeoObj2,

 MKI_POINT_PTR f_pResults );

 

Calculates all tangent lines between two standard objects.

 

Parameters

GeoObj1

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

 

MKI_OBJ_MARK

MKI_OBJ_CIRCLE

MKI_OBJ_ARC

MKI_OBJ_ELLIPSE

MKI_OBJ_EARC

MKI_OBJ_GEOCIRCLE

MKI_OBJ_GEOARC

MKI_OBJ_GEOELLIPSE

MKI_OBJ_GEOEARC

GeoObj2

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

 

MKI_OBJ_MARK

MKI_OBJ_CIRCLE

MKI_OBJ_ARC

MKI_OBJ_ELLIPSE

MKI_OBJ_EARC

MKI_OBJ_GEOCIRCLE

MKI_OBJ_GEOARC

MKI_OBJ_GEOELLIPSE

MKI_OBJ_GEOEARC

Results

[MKI_POINT_PTR] Address of point buffer to receive the calculated tangent's end-points. Allow at least 16 points.

 

Return Value

Number of tangent points found. This value is always a multiple of 2, as for each found tangent a pair of two points is returned. The first point of each pair lies at GeoObj1, the second point at GeoObj2.

 

 

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 2025.0 - Copyright 2025 Malz++Kassner® GmbH