ClipToRectangle (class MKI_ENUMDEF_DATA) Changed in Version 2021.2

www.CAD6.com

C++ Syntax

__int32

MKI_ENUMDEF_DATA::ClipToRectangle(

 MKI_CONST_RECT_REF f_rRect,

 bool f_fMaintainFillings );

 

Clips a curve or surface in the given enumeration data against the given rectangle. This changes the enumeration data! If the original data is of type MKI_ENUMDATA_SURFACE and MaintainFillings is false, the data type will be changed to MKI_ENUMDATA_CURVE.

 

__int32

MKI_ENUMDEF_DATA::ClipToRectangle(

 MKI_CONST_RECT_REF f_rRect,

 MKI_POINTDATA_PTR f_pResult,

 __int32 f_nSize,

 bool f_fMaintainFillings );

 

Clips a curve or surface in the given enumeration data against the given rectangle, saving the result in the given MKI_POINTDATA buffer. This does not change the enumeration data except for m_nEnumData: If the original data is of type MKI_ENUMDATA_SURFACE and MaintainFillings is false, the data type will be changed to MKI_ENUMDATA_CURVE.

 

The number of point data entries and outlines may increase due to this clipping. In extreme situations, the resulting enumeration data may contain more than MKI_POLYGON_SUBMAX points in a sub-polygon and/or more than MKI_POLYPOLY_MAX sub-polygons!

 

Parameters

Rect

[MKI_CONST_RECT_REF] Rectangular area against which the enumerated data shall be clipped.

Result

[MKI_POINTDATA_PTR] Buffer to receive the clipped enumeration data.

Size

[__int32] Size of the buffer in point data entries. If the size does not suffice, the method will abort and return a negative value.

MaintainFillings

[bool] If true, an enumeration of type MKI_ENUMDATA_SURFACE will be handled as a filled object, i.e. it will remain closed during clipping. This results in lines running along the clipping edges where the original surface reached outside the clipping rectangle.
If false, enumerations of type MKI_ENUMDATA_SURFACE will be handled identical to MKI_ENUMDATA_CURVE, i.e. outline parts outside the clipping rectangle will be simply cut, causing an "open" object as the result. In this case, the data type will be changed to MKI_ENUMDATA_CURVE – be sure to handle the result correctly, i.e. you must not close the individual outlines by connecting their end-points with their start-points (because the clipping process already did so prior to clipping)!

 

Return Value

Returns the number of point data entries after the clipping or a negative value in case of an error.

 

Comment

Only the enumeration types MKI_ENUMDATA_CURVE and MKI_ENUMDATA_SURFACE are supported!

 

CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH