AnyCAD Rapid API 2023
Help you to create a better world!
SketchBuilder Class Reference

Static Public Member Functions

static TopoShape MakeVertex (GPnt pt)
 
static TopoShape MakeLine (GPnt start, GPnt end)
 
static TopoShape MakeLine (GLin line, double p1, double p2)
 
static TopoShape MakeCircle (GPnt center, double radius, GDir zdir)
 
static TopoShape MakeCircle (GAx2 location, double radius)
 
static TopoShape MakeEllipse (GPnt center, double majorRadius, double minorRadius, GDir xdir, GDir zdir)
 
static TopoShape MakeEllipse (GAx2 location, double majorRadius, double minorRadius)
 
static TopoShape MakeArcOfCircle (GCirc circle, GPnt start, GPnt end)
 
static TopoShape MakeArcOfCircle (GCirc circle, double start, double end)
 
static TopoShape MakeArcOfCircle (GPnt start, GPnt end, GPnt middle)
 
static TopoShape MakeArcOfEllipse (GElips elips, double start, double end)
 
static TopoShape MakeHypr (GHypr hypr, double p1, double p2)
 
static TopoShape MakeParab (GParab parab, double p1, double p2)
 
static TopoShape MakeRectangle (GAx2 coord, double len, double width, double radius, boolean bFilled)
 
static TopoShape MakePolygon (GAx2 coord, long number, double radius)
 
static TopoShape MakePolygon (GPntList points, boolean bClosed)
 
static TopoShape MakePolygon (GPntList points, double radius, boolean bFilled)
 
static TopoShape MakeBSpline (GPntList points, boolean periodicFlag)
 
static TopoShape MakeBSpline (GPntList points)
 
static TopoShape MakeBSpline (GPntList poles, DoubleList parameters, boolean periodicFlag)
 
static TopoShape MakeBSpline (GPntList poles, DoubleList parameters)
 
static TopoShape MakeBSpline (GPntList poles, DoubleList weights, DoubleList knots, Uint32List multiplicities, long degree, boolean periodicFlag, boolean checkRational)
 
static TopoShape MakeBSpline (GPntList poles, DoubleList weights, DoubleList knots, Uint32List multiplicities, long degree, boolean periodicFlag)
 
static TopoShape MakeBSpline (GPntList poles, DoubleList weights, DoubleList knots, Uint32List multiplicities, long degree)
 
static TopoShape MakeBezierCurve (GPntList poles)
 
static TopoShape MakeBezierCurve (GPntList poles, DoubleList weights)
 
static TopoShape MakeSpiral (double radius, double interval, double count, GAx3 ax, boolean reversed)
 
static TopoShape MakeSpiral (double radius, double interval, double count, GAx3 ax)
 
static TopoShape ToBSplineCurve (TopoShapeList curves, EnumConvertParameterisationType type)
 
static TopoShape ToBSplineCurve (TopoShapeList curves)
 
static TopoShape ToBSplineCurve (TopoShape curve, EnumConvertParameterisationType type)
 
static TopoShape ToBSplineCurve (TopoShape curve)
 
static TopoShape MakeWire (TopoShape edge)
 
static TopoShape MakeWire (TopoShapeList edges)
 
static TopoShape MakeWire (TopoShape edge1, TopoShape edge2)
 
static TopoShapeList ConnectEdgesToWires (TopoShapeList edges, double tol, boolean sharedVeterx)
 
static TopoShapeList ConnectEdgesToWires (TopoShape shape, boolean sharedVeterx, double theAngTol)
 
static TopoShape MakePolygonFace (GPntList points)
 
static TopoShape MakePlanarFace (TopoShape closedWire)
 
static TopoShape MakePlanarFace (GPln plane, double minU, double maxU, double minV, double maxV)
 
static TopoShape TrimCurve (TopoShape curve, double startP, double endP)
 
static TopoShape MakeCurveOnSurface (TopoShape curve2d, TopoShape surface)
 
static TopoShape MakeCurve (ParametricCurve curve, double startU, double lastU)
 
static TopoShape MakeTangentLine (TopoShape curve, GPnt nearPt, GPnt pt)
 
static TopoShape MakeTangentLine (TopoShape curve, GPnt nearPt, GLin line, double angle, double length)
 
static GDirList ComputePlaneDirection (TopoShape curve)
 

Detailed Description

<>
ShapeBuilder

Method to build basic 3D curve shapes.

Member Function Documentation

◆ ConnectEdgesToWires()

static TopoShapeList SketchBuilder.ConnectEdgesToWires ( TopoShapeList  edges,
double  tol,
boolean  sharedVeterx 
)
static

Connect edges to wires.

Parameters
edgesthe edge list.
tolthe tolerance
sharedVeterxis True connection is performed only when adjacent edges share the same vertex.
Returns
the wire list.

◆ MakeArcOfCircle() [1/3]

static TopoShape SketchBuilder.MakeArcOfCircle ( GCirc  circle,
double  start,
double  end 
)
static

Make arc by angles on circle.

Parameters
circlethe circle.
startthe start angle with radians.
endthe end angle with radians.
Returns
the arc.

◆ MakeArcOfCircle() [2/3]

static TopoShape SketchBuilder.MakeArcOfCircle ( GCirc  circle,
GPnt  start,
GPnt  end 
)
static

Make arc by two points on circle.

Parameters
circlethe circle.
startthe start point.
endthe end point.
Returns
the arc.

◆ MakeArcOfCircle() [3/3]

static TopoShape SketchBuilder.MakeArcOfCircle ( GPnt  start,
GPnt  end,
GPnt  middle 
)
static

Make arc by three points.

Parameters
startthe start point.
endthe end point.
middlethe middle point.
Returns
the arc.

◆ MakeArcOfEllipse()

static TopoShape SketchBuilder.MakeArcOfEllipse ( GElips  elips,
double  start,
double  end 
)
static

Make ellipse arc by angles.

Parameters
elipsthe ellipse object
startthe start angle with radians.
endthe end angle with radians.
Returns
the arc curve.

◆ MakeBezierCurve() [1/2]

static TopoShape SketchBuilder.MakeBezierCurve ( GPntList  poles)
static

Creates a non rational Bezier curve with a set of poles. The weights are defaulted to all being 1.

Parameters
polesthe poles.
Returns
the shape.

◆ MakeBezierCurve() [2/2]

static TopoShape SketchBuilder.MakeBezierCurve ( GPntList  poles,
DoubleList  weights 
)
static

Creates a rational Bezier curve with the set of poles and the set of weights.

Parameters
polesthe poles.
weightsIf all the weights are identical the curve is considered as non rational.
Returns
the shape

◆ MakeBSpline() [1/4]

static TopoShape SketchBuilder.MakeBSpline ( GPntList  points)
static

Make BSpline

Parameters
pointsthe control points.

◆ MakeBSpline() [2/4]

static TopoShape SketchBuilder.MakeBSpline ( GPntList  points,
boolean  periodicFlag 
)
static

Make BSpline

Parameters
pointsthe control points.
periodicFlagif true the constrained BSpline curve will be periodic and closed.
In this case, the junction point is the first point of the table Points.

◆ MakeBSpline() [3/4]

static TopoShape SketchBuilder.MakeBSpline ( GPntList  poles,
DoubleList  parameters 
)
static

Make BSpline
Warning

  • There must be at least 2 points in the table Points.
  • If PeriodicFlag is false, there must be as
    many parameters in the array Parameters as
    there are points in the array Points.
  • If PeriodicFlag is true, there must be one
    more parameter in the table Parameters: this
    is used to give the parameter on the
    resulting BSpline curve of the junction point
    of the curve (which is also the first point of the table Points).

◆ MakeBSpline() [4/4]

static TopoShape SketchBuilder.MakeBSpline ( GPntList  poles,
DoubleList  parameters,
boolean  periodicFlag 
)
static

Make BSpline
Warning

  • There must be at least 2 points in the table Points.
  • If PeriodicFlag is false, there must be as
    many parameters in the array Parameters as
    there are points in the array Points.
  • If PeriodicFlag is true, there must be one
    more parameter in the table Parameters: this
    is used to give the parameter on the
    resulting BSpline curve of the junction point
    of the curve (which is also the first point of the table Points).

◆ MakeCircle()

static TopoShape SketchBuilder.MakeCircle ( GPnt  center,
double  radius,
GDir  zdir 
)
static

Make circle.

Parameters
centerthe center.
radiusthe radius.
zdirthe direction.
Returns
the circle.

◆ MakeCurveOnSurface()

static TopoShape SketchBuilder.MakeCurveOnSurface ( TopoShape  curve2d,
TopoShape  surface 
)
static

Extract the curve from surface

Parameters
curve2dthe trimmed 2d curve defining the ranges of the uv paramters;
surfacethe base surface.
Returns
the new curve.

◆ MakeEllipse()

static TopoShape SketchBuilder.MakeEllipse ( GPnt  center,
double  majorRadius,
double  minorRadius,
GDir  xdir,
GDir  zdir 
)
static

Make ellipse curve.

Parameters
centerthe center.
majorRadiusthe major radius.
minorRadiusthe minor radius.
xdirthe x direction.
zdirthe y direction.
Returns
the ellipse.

◆ MakeHypr()

static TopoShape SketchBuilder.MakeHypr ( GHypr  hypr,
double  p1,
double  p2 
)
static

Make rectangle with radius angles.





Returns


Make hyperbola curve.
Parameters
hyprthe hyperbola object.
p1the first parameter.
p2the second parameter.
Returns
the hyperbola curve.

◆ MakeLine() [1/2]

static TopoShape SketchBuilder.MakeLine ( GLin  line,
double  p1,
double  p2 
)
static

Make line.

Parameters
linethe line object.
p1the start parameter.
p2the end parameter.
Returns
the line shape.

◆ MakeLine() [2/2]

static TopoShape SketchBuilder.MakeLine ( GPnt  start,
GPnt  end 
)
static

Make line.

Parameters
startthe start point.
endthe end point.
Returns
the line shape.

◆ MakeParab()

static TopoShape SketchBuilder.MakeParab ( GParab  parab,
double  p1,
double  p2 
)
static

Make parabola curve.

Parameters
parabthe parabola object.
p1the first parameter.
p2the second parameter.
Returns
the parabola curve.

◆ MakePolygon() [1/3]

static TopoShape SketchBuilder.MakePolygon ( GAx2  coord,
long  number,
double  radius 
)
static

Make polygon.

Parameters
coordthe position and direction.
numberedge count.
radiusradius.
Returns
the wire.

◆ MakePolygon() [2/3]

static TopoShape SketchBuilder.MakePolygon ( GPntList  points,
boolean  bClosed 
)
static

Make polygon with points.

Parameters
pointsthe point list.
bClosedclosed if true.
Returns
the shape.

◆ MakePolygon() [3/3]

static TopoShape SketchBuilder.MakePolygon ( GPntList  points,
double  radius,
boolean  bFilled 
)
static

Make polygon with radius angles.

Parameters
pointsthe point list.
radiusthe radius.
bFilledto face if true.
Returns

◆ MakeTangentLine()

static TopoShape SketchBuilder.MakeTangentLine ( TopoShape  curve,
GPnt  nearPt,
GPnt  pt 
)
static

Create line pass thrgouth pt and tangential to curve.

Parameters
curvethe curve
nearPtthe initial gusss point.
ptthe point on line to be passed.
Returns
the line

◆ MakeVertex()

static TopoShape SketchBuilder.MakeVertex ( GPnt  pt)
static

Make vertex.

Parameters
ptthe point.
Returns
the vertex shape.