Class CadApiSketchHelper
Inheritance
CadApiSketchHelper
Assembly: CADIPC.DotnetHelper.dll
Syntax
public static class CadApiSketchHelper
Methods
AddArc(ComWrapper<ICadIpcSketch>, double, double, double, double, double, double, double, bool, string)
Add an arc and return its property snapshot. Supply id to identify it; dispose the returned wrapper.
Declaration
public static ComWrapper<ICadIpcArc> AddArc(this ComWrapper<ICadIpcSketch> sketch, double x1, double y1, double x2, double y2, double cx, double cy, double r, bool clockwise, string id = "")
Parameters
Returns
AddArc(ComWrapper<ICadIpcSketch>, double, double, double, double, double, double, double, string)
Add a counter-clockwise arc. Dispose the returned wrapper.
Declaration
public static ComWrapper<ICadIpcArc> AddArc(this ComWrapper<ICadIpcSketch> sketch, double x1, double y1, double x2, double y2, double cx, double cy, double r, string id = "")
Parameters
Returns
AddArcFromCenter(ComWrapper<ICadIpcSketch>, double, double, double, double, double, bool, string)
Add an arc by center and angles in degrees; clockwise selects CW instead of CCW.
Supply id to identify the returned property snapshot; dispose its wrapper.
Declaration
public static ComWrapper<ICadIpcArc> AddArcFromCenter(this ComWrapper<ICadIpcSketch> sketch, double cx, double cy, double r, double startAngle, double endAngle, bool clockwise, string id = "")
Parameters
Returns
AddArcFromCenter(ComWrapper<ICadIpcSketch>, double, double, double, double, double, string)
Add a counter-clockwise arc by center and angles in degrees. Dispose the returned property snapshot.
Declaration
public static ComWrapper<ICadIpcArc> AddArcFromCenter(this ComWrapper<ICadIpcSketch> sketch, double cx, double cy, double r, double startAngle, double endAngle, string id = "")
Parameters
Returns
AddArcSlot(ComWrapper<ICadIpcSketch>, double, double, double, double, double, double, double, double)
Add a circular slot along the guiding arc from (x1, y1) to (x2, y2),
centered at (cx, cy) with radius arcR. slotR is half the slot width; arcR must exceed slotR.
Declaration
public static void AddArcSlot(this ComWrapper<ICadIpcSketch> sketch, double x1, double y1, double x2, double y2, double cx, double cy, double arcR, double slotR)
Parameters
AddCircle(ComWrapper<ICadIpcSketch>, double, double, double, string)
Add a circle and return its property snapshot. Supply id to identify it; dispose the returned wrapper.
Declaration
public static ComWrapper<ICadIpcArc> AddCircle(this ComWrapper<ICadIpcSketch> sketch, double cx, double cy, double r, string id = "")
Parameters
Returns
AddLine(ComWrapper<ICadIpcSketch>, double, double, double, double, string)
Add a line and return its property snapshot. Supply id to identify it; dispose the returned wrapper.
Declaration
public static ComWrapper<ICadIpcLine> AddLine(this ComWrapper<ICadIpcSketch> sketch, double x1, double y1, double x2, double y2, string id = "")
Parameters
Returns
AddPoint(ComWrapper<ICadIpcSketch>, double, double, string)
Add a point and return its property snapshot. Supply id to identify it; dispose the returned wrapper.
Declaration
public static ComWrapper<ICadIpcPoint> AddPoint(this ComWrapper<ICadIpcSketch> sketch, double x, double y, string id = "")
Parameters
Returns
AddPolygon(ComWrapper<ICadIpcSketch>, double, double, double, int)
Declaration
public static void AddPolygon(this ComWrapper<ICadIpcSketch> sketchCom, double cx, double cy, double r, int sides)
Parameters
AddRectangle(ComWrapper<ICadIpcSketch>, double, double, double, double)
Add an axis-aligned rectangle with bottom-left corner at (x, y)
and the given width and height (sketch-local 2D coordinates) via IPC.
Declaration
public static void AddRectangle(this ComWrapper<ICadIpcSketch> sketchCom, double x, double y, double width, double height)
Parameters
AddRectangleFromCenter(ComWrapper<ICadIpcSketch>, double, double, double, double)
Add an axis-aligned rectangle centered at (cx, cy) in sketch-local coordinates.
Declaration
public static void AddRectangleFromCenter(this ComWrapper<ICadIpcSketch> sketch, double cx, double cy, double width, double height)
Parameters
AddSlot(ComWrapper<ICadIpcSketch>, double, double, double, double, double)
Declaration
public static void AddSlot(this ComWrapper<ICadIpcSketch> sketchCom, double x1, double y1, double x2, double y2, double r)
Parameters
Contour(ComWrapper<ICadIpcSketch>, int)
Return the contour at the given zero-based index.
Declaration
public static ComWrapper<ICadIpcSketchContour> Contour(this ComWrapper<ICadIpcSketch> sketchCom, int index)
Parameters
Returns
ContourCount(ComWrapper<ICadIpcSketch>)
Number of closed contours recognised by the constraint solver.
Declaration
public static int ContourCount(this ComWrapper<ICadIpcSketch> sketchCom)
Parameters
Returns
Contours(ComWrapper<ICadIpcSketch>)
Enumerate contours. Dispose each returned wrapper.
Declaration
public static IEnumerable<ComWrapper<ICadIpcSketchContour>> Contours(this ComWrapper<ICadIpcSketch> sketchCom)
Parameters
Returns
EnumerateSegments(ComWrapper<ICadIpcSketch>)
Enumerate segments. Dispose each returned wrapper and keep the geometry unchanged while enumerating.
Declaration
public static IEnumerable<ComWrapper<ICadIpcSegment>> EnumerateSegments(this ComWrapper<ICadIpcSketch> owner)
Parameters
Returns
Face(ComWrapper<ICadIpcSketch>, int)
Return the face at the given zero-based index.
Declaration
public static ComWrapper<ICadIpcSketchFace> Face(this ComWrapper<ICadIpcSketch> sketchCom, int index)
Parameters
Returns
FaceCount(ComWrapper<ICadIpcSketch>)
Number of closed faces materialised on this sketch.
Declaration
public static int FaceCount(this ComWrapper<ICadIpcSketch> sketchCom)
Parameters
Returns
Faces(ComWrapper<ICadIpcSketch>)
Enumerate faces. Dispose each returned wrapper.
Declaration
public static IEnumerable<ComWrapper<ICadIpcSketchFace>> Faces(this ComWrapper<ICadIpcSketch> sketchCom)
Parameters
Returns
Segment(ComWrapper<ICadIpcSketch>, int)
Return the segment at the given zero-based index.
Declaration
public static ComWrapper<ICadIpcSegment> Segment(this ComWrapper<ICadIpcSketch> owner, int index)
Parameters
Returns
SegmentCount(ComWrapper<ICadIpcSketch>)
Number of segments exposed by CADAPI; construction points are excluded.
Declaration
public static int SegmentCount(this ComWrapper<ICadIpcSketch> owner)
Parameters
Returns