Changes the 3D cutting planes.
GSErrCode ACAPI_Environment ( APIEnv_Change3DCuttingPlanesID, API_3DCutPlanesInfo* cutInfo );
Parameters
- cutInfo
- Data of the “3D Cutting Planes…” dialog
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
cutInfo
isnullptr
or contains invalid dataAPIERR_NOPLAN
- No open project
Remarks
This function is used to change the 3D cutting plane parameters.
Example
API_3DCutPlanesInfo cutInfo; BNZeroMemory (&cutInfo, sizeof (API_3DCutPlanesInfo)); GSErrCode err = ACAPI_Environment (APIEnv_Get3DCuttingPlanesID, &cutInfo, nullptr); if (err == NoError) { if (cutInfo.shapes != nullptr) BMKillHandle ((GSHandle *) &(cutInfo.shapes)); cutInfo.isCutPlanes = true; cutInfo.nShapes = 2; cutInfo.shapes = reinterpret_cast<API_3DCutShapeType**> (BMAllocateHandle (cutInfo.nShapes * sizeof (API_3DCutShapeType), ALLOCATE_CLEAR, 0)); if (cutInfo.shapes != nullptr) { (*cutInfo.shapes)[0].cutStatus = 2; (*cutInfo.shapes)[0].cutPen = 3; (*cutInfo.shapes)[0].cutMater = 11; (*cutInfo.shapes)[0].pa = -3.0499805934954503; (*cutInfo.shapes)[0].pb = 0.43107875694662845; (*cutInfo.shapes)[0].pc = 3.5670423669734248; (*cutInfo.shapes)[0].pd = 2.4161856450872907; (*cutInfo.shapes)[1].cutStatus = 3; (*cutInfo.shapes)[1].cutPen = 4; (*cutInfo.shapes)[1].cutMater = 12; (*cutInfo.shapes)[1].pa = -2.9081872443425456; (*cutInfo.shapes)[1].pb = 0.37912781320386035; (*cutInfo.shapes)[1].pc = 3.4016167929617027; (*cutInfo.shapes)[1].pd = -1.1569668026192714; } err = ACAPI_Environment (APIEnv_Change3DCuttingPlanesID, &cutInfo, nullptr); if (err == NoError) { API_WindowInfo windowInfo; BNZeroMemory (&windowInfo, sizeof (API_WindowInfo)); windowInfo.typeID = APIWind_3DModelID; err = ACAPI_Automate (APIDo_ChangeWindowID, &windowInfo, nullptr); } BMKillHandle ((GSHandle *) &(cutInfo.shapes)); }
Requirements
- Version: API 3.1 or later
- Header: APIdefs_Environment.h
See Also
API_3DCutPlanesInfo
APIEnv_Get3DCuttingPlanesID
ACAPI_Environment
API Functions