Inserts a whole subpolygon (hole) into a polygon.
GSErrCode ACAPI_Goodies ( APIAny_InsertSubPolyID, API_ElementMemo* memo, API_ElementMemo* insMemo );
Parameters
- memo
- [in/out] The polygon data.
- insMemo
- [in] Data of the new subpolygon.
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
- any of the parameters are
nullptr
ormemo
orinsMemo
is not initialized APIERR_MEMFULL
- low memory condition
APIERR_IRREGULARPOLY
- Input polygon is irregular.
For other common API errors see the API Errors document.
Remarks
This function is used to insert a new subpolygon (hole) into a polygon passed in an API_ElementMemo structure. The shape of the new hole should be passed in the insMemo parameter.
Refer to the API_Polygon structure to have more details on the polygon data structure. The coords
, pends
, parcs
and vertexIDs
handles in the API_ElementMemo structure must be initialized in the case of the memo
parameter. The vertexID
and pends
handles are ignored in the insMemo
parameter.
The function places the new hole to the and of the contour list.
Note that other memo handles are not touched. In the case the polygon belongs to a roof with side angles initialized, it must be aligned manually.
Requirements
- Version: API 4.1 or later
- Header: APIdefs_Goodies.h
See Also
API_Polygon, API_ElementMemo,
APIAny_InsertPolyNodeID, APIAny_DeletePolyNodeID, APIAny_DeleteSubPolyID,
ACAPI_Goodies, API Functions