Class SketchHelper
Assembly: CADAPI.DotnetHelper.dll
Syntax
public static class SketchHelper
Methods
AddArc(ComWrapper<ICadApiSketch>, double, double, double, double, double, double, double, string)
Declaration
public static ComWrapper<ICadApiArc> AddArc(this ComWrapper<ICadApiSketch> sketchCom, double x1, double y1, double x2, double y2, double cx, double cy, double r, string id = "")
Parameters
Returns
AddArcFromCenter(ComWrapper<ICadApiSketch>, double, double, double, double, double, string)
Arc from centre (cx, cy) with radius r, from startAngle to endAngle (degrees, CCW).
Declaration
public static ComWrapper<ICadApiArc> AddArcFromCenter(this ComWrapper<ICadApiSketch> sketchCom, double cx, double cy, double r, double startAngle, double endAngle, string id = "")
Parameters
Returns
AddArcSlot(ComWrapper<ICadApiSketch>, double, double, double, double, double, double, double, double)
Circular (arc) slot. Guiding arc: (x1,y1)→(x2,y2), centre (cx,cy), radius arcR.
Cap radius slotR = half slot width. Requires arcR > slotR.
Declaration
public static void AddArcSlot(this ComWrapper<ICadApiSketch> sketchCom, double x1, double y1, double x2, double y2, double cx, double cy, double arcR, double slotR)
Parameters
AddCircle(ComWrapper<ICadApiSketch>, double, double, double, string)
Declaration
public static ComWrapper<ICadApiArc> AddCircle(this ComWrapper<ICadApiSketch> sketchCom, double cx, double cy, double r, string id = "")
Parameters
Returns
AddLine(ComWrapper<ICadApiSketch>, double, double, double, double, string)
Declaration
public static ComWrapper<ICadApiLine> AddLine(this ComWrapper<ICadApiSketch> sketchCom, double x1, double y1, double x2, double y2, string id = "")
Parameters
Returns
AddPoint(ComWrapper<ICadApiSketch>, double, double, string)
Declaration
public static ComWrapper<ICadApiPoint> AddPoint(this ComWrapper<ICadApiSketch> sketchCom, double x, double y, string id = "")
Parameters
Returns
AddPolygon(ComWrapper<ICadApiSketch>, double, double, double, int)
Declaration
public static void AddPolygon(this ComWrapper<ICadApiSketch> sketchCom, double cx, double cy, double r, int sides)
Parameters
AddRectangle(ComWrapper<ICadApiSketch>, double, double, double, double)
Axis-aligned rectangle with bottom-left corner at (x, y).
Declaration
public static void AddRectangle(this ComWrapper<ICadApiSketch> sketchCom, double x, double y, double width, double height)
Parameters
AddRectangleFromCenter(ComWrapper<ICadApiSketch>, double, double, double, double)
Axis-aligned rectangle centred at (cx, cy).
Declaration
public static void AddRectangleFromCenter(this ComWrapper<ICadApiSketch> sketchCom, double cx, double cy, double width, double height)
Parameters
AddSlot(ComWrapper<ICadApiSketch>, double, double, double, double, double)
Declaration
public static void AddSlot(this ComWrapper<ICadApiSketch> sketchCom, double x1, double y1, double x2, double y2, double r)
Parameters
Area(ComWrapper<ICadApiSketchFace>)
Signed planar area of the face in the sketch coordinate system.
Declaration
public static double Area(this ComWrapper<ICadApiSketchFace> faceCom)
Parameters
Returns
BaseZ(ComWrapper<ICadApiSketchFace>)
Z coordinate of the face within the sketch's local coordinate
system. Zero for a face flat on the sketch plane; the sketch's
world-space offset lives separately on the owning sketch.
Declaration
public static double BaseZ(this ComWrapper<ICadApiSketchFace> faceCom)
Parameters
Returns
Contour(ComWrapper<ICadApiSketch>, int)
Declaration
public static ComWrapper<ICadApiSketchContour> Contour(this ComWrapper<ICadApiSketch> sketchCom, int index)
Parameters
Returns
ContourCount(ComWrapper<ICadApiSketch>)
Declaration
public static int ContourCount(this ComWrapper<ICadApiSketch> sketchCom)
Parameters
Returns
Contours(ComWrapper<ICadApiSketch>)
Declaration
public static IEnumerable<ComWrapper<ICadApiSketchContour>> Contours(this ComWrapper<ICadApiSketch> sketchCom)
Parameters
Returns
EnumerateSegments(ComWrapper<ICadApiSketchContour>)
Declaration
public static IEnumerable<ComWrapper<ICadApiSegment>> EnumerateSegments(this ComWrapper<ICadApiSketchContour> contourCom)
Parameters
Returns
EnumerateSegments(ComWrapper<ICadApiSketchFace>)
Declaration
public static IEnumerable<ComWrapper<ICadApiSegment>> EnumerateSegments(this ComWrapper<ICadApiSketchFace> faceCom)
Parameters
Returns
EnumerateSegments(ComWrapper<ICadApiSketch>)
Declaration
public static IEnumerable<ComWrapper<ICadApiSegment>> EnumerateSegments(this ComWrapper<ICadApiSketch> sketchCom)
Parameters
Returns
Face(ComWrapper<ICadApiSketch>, int)
Declaration
public static ComWrapper<ICadApiSketchFace> Face(this ComWrapper<ICadApiSketch> sketchCom, int index)
Parameters
Returns
FaceCount(ComWrapper<ICadApiSketch>)
Declaration
public static int FaceCount(this ComWrapper<ICadApiSketch> sketchCom)
Parameters
Returns
Faces(ComWrapper<ICadApiSketch>)
Declaration
public static IEnumerable<ComWrapper<ICadApiSketchFace>> Faces(this ComWrapper<ICadApiSketch> sketchCom)
Parameters
Returns
Segment(ComWrapper<ICadApiSketchContour>, int)
Declaration
public static ComWrapper<ICadApiSegment> Segment(this ComWrapper<ICadApiSketchContour> contourCom, int index)
Parameters
Returns
Segment(ComWrapper<ICadApiSketchFace>, int)
Declaration
public static ComWrapper<ICadApiSegment> Segment(this ComWrapper<ICadApiSketchFace> faceCom, int index)
Parameters
Returns
Segment(ComWrapper<ICadApiSketch>, int)
Declaration
public static ComWrapper<ICadApiSegment> Segment(this ComWrapper<ICadApiSketch> sketchCom, int index)
Parameters
Returns
SegmentCount(ComWrapper<ICadApiSketch>)
Declaration
public static int SegmentCount(this ComWrapper<ICadApiSketch> sketchCom)
Parameters
Returns