MKI_EnumerateHatchLine (Enumeration) Changed in Version 2022.1

www.CAD6.com

C++ Syntax

MKI_RESULTVALUE

MKI_EnumerateHatchLine(

 MKI_CONST_BUFFER_REF f_rData,

 MKI_CONST_HATCHLINELIST_REF f_rHatchLines,

 double f_dHatchTotalRotate,

 double f_dHatchOffset1,

 double f_dHatchOffset2,

 MKI_CONST_POINT_PTR f_pHatchOrigin,

 MKI_CONST_XPROPERTY_PTR f_rXProperty,

 MKI_HATCHOPENPATH_PROC f_fnOpenPathCallBack,

 MKI_HATCHADDOBJECT_PROC f_fnAddObjectCallBack,

 MKI_HATCHCLOSEPATH_PROC f_fnClosePathCallBack,

 void* f_pUserData );

 

Enumerates the results of a line sequence based hatching of the data stored in the buffer pointed to by Data.

 

Parameters

Data

[MKI_CONST_BUFFER_REF] Address of a structure containing information about the data that is to be hatched. On how to create such a buffer, see MKI_BufferAlloc.

HatchLines

[MKI_CONST_HATCHLINELIST_REF] Address of a structure that contains a line sequence definition. This line sequence will be used to hatch the given data.

HatchRotate

[double] This value determines the orientation of the hatching. It states the rotation of the hatching lines relative to horizontal in [rad].

HatchOffset1

HatchOffset2

[double] These two values determine the offset of the hatching relative to the hatch origin placed by the user. The total offset is calculated as HatchOffset1 * TotalHatchWidth + HatchOffset2, so HatchOffset1 is a factor and HatchOffset2 an absolute value. Usually, this offset should be zero, i.e. both values should be zero.

HatchOrigin

[MKI_CONST_POINT_PTR] Address of a point containing the hatch origin, i.e. the point to which the hatching shall be aligned, in internal [mm] relative to the page's center. If HatchOrigin is nullptr, the current hatch origin of the active drawing will be used.

XProperty New in Version 6.51

[MKI_CONST_XPROPERTY_PTR] Address of optional extended properties to be transmitted to the hatching. If nullptr, no properties will be transmitted.

OpenPathCallBack

[MKI_HATCHOPENPATH_PROC] Callback procedure for an identification enumeration. This procedure will be called for every enumeration step. For a detailed description of identification enumeration, see also the description of the MKI_HatchOpenPathProc procedure.

AddObjectCallBack

[MKI_HATCHADDOBJECT_PROC] Callback procedure for an identification enumeration. For a detailed description of identification enumeration, see also the description of the MKI_HatchAddObjectProc procedure.

ClosePathCallBack

[MKI_HATCHCLOSEPATH_PROC] Callback procedure for an identification enumeration. This procedure will be called for every enumeration step. For a detailed description of identification enumeration, see also the description of the MKI_HatchClosePathProc procedure.

UserData New in Version 2014.0

[void*] This pointer will be passed to all callback procedures that are called during the enumeration. You can use this parameter to pass "local" data to the enumeration, preferably by passing a pointer to a local data structure containing all information the callback procedure requires.

 

Return Value Changed in Version 2022.1

Enumeration result as a bitwise-or combination of flags (see MKI_RESULT_*). Some results indicate minor problems and do NOT mean that the enumeration was stopped or unsuccessful!

 

Comment

Use MKI_BufferAlloc to create the buffer and MKI_BufferAddEnumerate or MKI_BufferAddEntity to add objects to it. Before calling this function you must also call MKI_BufferPrepare which prepares the data stored in the buffer for further calculations after all objects have been added to it.

 

For a detailed description of hatching enumeration, see the descriptions of the corresponding callback procedures MKI_HatchOpenPathProc, MKI_HatchAddObjectProc and MKI_HatchClosePathProc.

 

CAD6interface 2025.0 - Copyright 2025 Malz++Kassner® GmbH