Class CadApiModelHelper
Inheritance
CadApiModelHelper
Assembly: CADIPC.DotnetHelper.dll
Syntax
public static class CadApiModelHelper
Methods
AddChamfer(ComWrapper<ICadIpcModel>, IListString, double)
Declaration
public static ComWrapper<ICadIpcChamferFeature> AddChamfer(this ComWrapper<ICadIpcModel> modelCom, IListString edgeIds, double size)
Parameters
Returns
AddDraft(ComWrapper<ICadIpcModel>, IListString, double)
Declaration
public static ComWrapper<ICadIpcDraftFeature> AddDraft(this ComWrapper<ICadIpcModel> modelCom, IListString faceIds, double angle)
Parameters
Returns
AddExtrude(ComWrapper<ICadIpcModel>, ComWrapper<ICadIpcSketchFace>, double)
Append an extrude feature on the given sketch face with signed
depth. Body geometry materialises on the next Save.
Declaration
public static ComWrapper<ICadIpcExtrudeFeature> AddExtrude(this ComWrapper<ICadIpcModel> modelCom, ComWrapper<ICadIpcSketchFace> faceCom, double depth)
Parameters
Returns
AddFillet(ComWrapper<ICadIpcModel>, IListString, double)
Declaration
public static ComWrapper<ICadIpcFilletFeature> AddFillet(this ComWrapper<ICadIpcModel> modelCom, IListString edgeIds, double radius)
Parameters
Returns
AddRevolve(ComWrapper<ICadIpcModel>, ComWrapper<ICadIpcSketchFace>, double, double, double, double, double, double, double)
Append a revolve feature: rotate the given sketch face around the
axis that passes through (axisX, axisY, axisZ) with direction
(dirX, dirY, dirZ) by angle degrees. The direction
must not be a zero vector. Body geometry materialises on the next Save.
Declaration
public static ComWrapper<ICadIpcRevolveFeature> AddRevolve(this ComWrapper<ICadIpcModel> modelCom, ComWrapper<ICadIpcSketchFace> faceCom, double axisX, double axisY, double axisZ, double dirX, double dirY, double dirZ, double angle)
Parameters
Returns
AddSketch(ComWrapper<ICadIpcModel>, int, double)
Add a 2D sketch on one of the orthogonal coordinate planes via IPC.
normalAxis: 1 = YZ plane, 2 = XZ plane, 3 = XY plane.
offset shifts the plane along the chosen axis.
Draw with AddLine / AddRectangle on the returned sketch,
then call Save(ComWrapper<ICadIpcModel>) to publish changes as child tree nodes.
Declaration
public static ComWrapper<ICadIpcSketch> AddSketch(this ComWrapper<ICadIpcModel> modelCom, int normalAxis, double offset)
Parameters
Returns
Bodies(ComWrapper<ICadIpcModel>)
Enumerate bodies. Dispose each returned wrapper.
Declaration
public static IEnumerable<ComWrapper<ICadIpcBody>> Bodies(this ComWrapper<ICadIpcModel> modelCom)
Parameters
Returns
Body(ComWrapper<ICadIpcModel>, int)
Return the body at the given zero-based index.
Declaration
public static ComWrapper<ICadIpcBody> Body(this ComWrapper<ICadIpcModel> modelCom, int index)
Parameters
Returns
BodyCount(ComWrapper<ICadIpcModel>)
Number of bodies (parts) in this CAD model.
Declaration
public static int BodyCount(this ComWrapper<ICadIpcModel> modelCom)
Parameters
Returns
Feature(ComWrapper<ICadIpcModel>, int)
Return the feature at the given zero-based index.
Declaration
public static ComWrapper<ICadIpcFeature> Feature(this ComWrapper<ICadIpcModel> modelCom, int index)
Parameters
Returns
FeatureCount(ComWrapper<ICadIpcModel>)
Number of features in this CAD model's construction tree.
Declaration
public static int FeatureCount(this ComWrapper<ICadIpcModel> modelCom)
Parameters
Returns
Features(ComWrapper<ICadIpcModel>)
Enumerate features. Dispose each returned wrapper.
Declaration
public static IEnumerable<ComWrapper<ICadIpcFeature>> Features(this ComWrapper<ICadIpcModel> modelCom)
Parameters
Returns
Save(ComWrapper<ICadIpcModel>)
Publish in-memory CAD changes as child tree nodes of the host CAD group.
Equivalent to "save sketch + exit CAD" in the GUI.
Declaration
public static void Save(this ComWrapper<ICadIpcModel> modelCom)
Parameters
Sketch(ComWrapper<ICadIpcModel>, int)
Return an existing sketch at the given zero-based index.
Declaration
public static ComWrapper<ICadIpcSketch> Sketch(this ComWrapper<ICadIpcModel> modelCom, int index)
Parameters
Returns
SketchCount(ComWrapper<ICadIpcModel>)
Number of sketches in this CAD model.
Declaration
public static int SketchCount(this ComWrapper<ICadIpcModel> modelCom)
Parameters
Returns
Sketches(ComWrapper<ICadIpcModel>)
Enumerate existing sketches in index order. The caller must dispose each returned wrapper.
Keep the model alive and do not change the sketch collection during enumeration.
Declaration
public static IEnumerable<ComWrapper<ICadIpcSketch>> Sketches(this ComWrapper<ICadIpcModel> modelCom)
Parameters
Returns