Functions related to the Cutting Planes (Cutaway) management.
More...
Functions related to the Cutting Planes (Cutaway) management.
◆ ACAPI_CuttingPlane_GetCutPolygonInfo()
GSErrCode __ACENV_CALL 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
- Example
Int32 nBody, i, j;
double area;
GS::Array<Geometry::MultiPolygon2D> resPolygons;
for (i = 1; i <= nBody && err == NoError; i++) {
if (err == NoError) {
for (j = 0; j <= resPolygons.GetSize (); j++) {
double areaOfThisPolygon = resPolygons[j].CalcArea ();
}
}
}
GSErrCode __ACENV_CALL 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 __ACENV_CALL ACAPI_ModelAccess_GetNum(API_3DTypeID typeID, Int32 *count)
Returns the number of existing 3D components.
double x
The x factor.
Definition: APIdefs_Base.h:104
double z
The z factor.
Definition: APIdefs_Base.h:114
double y
The y factor.
Definition: APIdefs_Base.h:109
Desribes a 3D plane.
Definition: APIdefs_Base.h:680
API_Vector3D axisZ
The Z axis.
Definition: APIdefs_Base.h:700
API_Vector3D axisX
The X axis.
Definition: APIdefs_Base.h:690
API_Vector3D axisY
The Y axis.
Definition: APIdefs_Base.h:695
API_Coord3D basePoint
Base point of the plane.
Definition: APIdefs_Base.h:685
◆ ACAPI_CuttingPlane_Is3DCutawayEnabled()
GSErrCode __ACENV_CALL ACAPI_CuttingPlane_Is3DCutawayEnabled |
( |
bool * |
param | ) |
|
Returns whether the 3DCutaway is enabled.
- Parameters
-
param | [out] returns the current state. |
- Returns
- NoError - The function has completed with success.
◆ ACAPI_CuttingPlane_IsCuttingPlanesVisible()
GSErrCode __ACENV_CALL ACAPI_CuttingPlane_IsCuttingPlanesVisible |
( |
bool * |
param | ) |
|
Returns whether the Cutting Planes are visible.
- Parameters
-
param | [out] returns the current state. |
- Returns
- NoError - The function has completed with success.
◆ ACAPI_CuttingPlane_Set3DCutawayStatus()
GSErrCode __ACENV_CALL ACAPI_CuttingPlane_Set3DCutawayStatus |
( |
bool * |
param | ) |
|
Turns the 3DCutaway on/off.
- Parameters
-
param | [in] sets the current state. |
- Returns
- NoError - The function has completed with success.
◆ ACAPI_CuttingPlane_SetCuttingPlanesVisibility()
GSErrCode __ACENV_CALL ACAPI_CuttingPlane_SetCuttingPlanesVisibility |
( |
bool * |
param | ) |
|
Shows or hides the Cutting Planes.
- Parameters
-
param | [in] sets the current state. |
- Returns
- NoError - The function has completed with success.