Class BodyHelper
Assembly: CADAPI.DotnetHelper.dll
Syntax
public static class BodyHelper
Methods
Caption(ComWrapper<ICadApiBody>)
Human-readable caption shown in the feature tree (e.g. "#Part_1").
Declaration
public static string Caption(this ComWrapper<ICadApiBody> bodyCom)
Parameters
Returns
EdgeCount(ComWrapper<ICadApiBody>)
Number of topology edges in the body.
Declaration
public static int EdgeCount(this ComWrapper<ICadApiBody> bodyCom)
Parameters
Returns
EdgeId(ComWrapper<ICadApiBody>, int)
Stable topology ID for the edge at the zero-based index. Use it in
edge-based operations such as fillet creation.
Declaration
public static string EdgeId(this ComWrapper<ICadApiBody> bodyCom, int index)
Parameters
Returns
FaceCount(ComWrapper<ICadApiBody>)
Number of topology faces in the body.
Declaration
public static int FaceCount(this ComWrapper<ICadApiBody> bodyCom)
Parameters
Returns
FaceId(ComWrapper<ICadApiBody>, int)
Stable topology ID for the face at the zero-based index. Use it in
face-based operations such as draft creation.
Declaration
public static string FaceId(this ComWrapper<ICadApiBody> bodyCom, int index)
Parameters
Returns
GetBoxMax(ComWrapper<ICadApiBody>)
Maximum corner of the axis-aligned bounding box of the body,
in the model coordinate system. Throws if the body's box is
empty (no geometry).
Declaration
public static (double X, double Y, double Z) GetBoxMax(this ComWrapper<ICadApiBody> bodyCom)
Parameters
Returns
GetBoxMin(ComWrapper<ICadApiBody>)
Minimum corner of the axis-aligned bounding box of the body,
in the model coordinate system. Throws if the body's box is
empty (no geometry).
Declaration
public static (double X, double Y, double Z) GetBoxMin(this ComWrapper<ICadApiBody> bodyCom)
Parameters
Returns
Id(ComWrapper<ICadApiBody>)
Stable string handle of this body inside the model (e.g.
"#Body(Imp1:0)"). Survives caption rename — use this
when later operations need to refer back to a specific body.
Declaration
public static string Id(this ComWrapper<ICadApiBody> bodyCom)
Parameters
Returns
IsSolid(ComWrapper<ICadApiBody>)
True if this body is a closed solid; false for an open shell.
Declaration
public static bool IsSolid(this ComWrapper<ICadApiBody> bodyCom)
Parameters
Returns