Archicad 28 C++ API
Loading...
Searching...
No Matches
Cutaway and Cutting Planes

Functions related to the Cutting Planes (Cutaway) management. More...

Functions

GSErrCode ACAPI_CuttingPlane_GetCutPolygonInfo (Int32 bodyIndex, const API_Plane3D &cutPlane, GS::Array< Geometry::MultiPolygon2D > *resPolygons=nullptr, double *area=nullptr)
 Cuts a body with a plane and returns the cutting surface and area.
 
GSErrCode ACAPI_CuttingPlane_GetCutPolygonInfo_New (Int32 elemIdx, Int32 bodyIdx, const API_Plane3D &cutPlane, GS::Array< Geometry::MultiPolygon2D > *resPolygons=nullptr, double *area=nullptr)
 Cuts a body with a plane and returns the cutting surface and area.
 

Detailed Description

Functions related to the Cutting Planes (Cutaway) management.

Function Documentation

◆ ACAPI_CuttingPlane_GetCutPolygonInfo()

GSErrCode ACAPI_CuttingPlane_GetCutPolygonInfo ( Int32  bodyIndex,
const API_Plane3D cutPlane,
GS::Array< Geometry::MultiPolygon2D > *  resPolygons = nullptr,
double *  area = nullptr 
)

Cuts a body with a plane and returns the cutting surface and area.

Parameters
bodyIndex[in] The index of the body to cut.
cutPlane[in] Cutting plane.
resPolygons[out] Polygons of the cutting surface. (optional parameter)
area[out] Area of the cutting surface. (optional parameter)
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The passed output parameter are both nullptr (resPolygons and area)
  • APIERR_REFUSEDCMD - The 3D model is not available in the current context, or The body cannot be queried directly; not active body
  • APIERR_BADINDEX - The bodyIndex is out of range
Remarks
This function is used to cut a given body with a cutting plane and get the cutting surface. To get the polygons of the cutting surface, pass the resPolygons parameter. To get only the area of the cutting surface, set the area parameter. One of the output parameters (resPolygons and area) must be not nullptr.
Example

◆ ACAPI_CuttingPlane_GetCutPolygonInfo_New()

GSErrCode ACAPI_CuttingPlane_GetCutPolygonInfo_New ( Int32  elemIdx,
Int32  bodyIdx,
const API_Plane3D cutPlane,
GS::Array< Geometry::MultiPolygon2D > *  resPolygons = nullptr,
double *  area = nullptr 
)

Cuts a body with a plane and returns the cutting surface and area.

Parameters
elemIdx[in] The index of the element to cut.
bodyIdx[in] The index of the body to cut.
cutPlane[in] Cutting plane.
resPolygons[out] Polygons of the cutting surface. (optional parameter)
area[out] Area of the cutting surface. (optional parameter)
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The passed output parameter are both nullptr (resPolygons and area)
  • APIERR_REFUSEDCMD - The 3D model is not available in the current context, or The body cannot be queried directly; not active body
    • APIERR_BADINDEX - The bodyIndex is out of range
Remarks
This function is used to cut a given body with a cutting plane and get the cutting surface. To get the polygons of the cutting surface, pass the resPolygons parameter. To get only the area of the cutting surface, set the area parameter. One of the output parameters (resPolygons and area) must be not nullptr.
Example