Skip to main content

replicad

Finders Classes​

Other Classes​

Sketching Classes​

Other Interfaces​

Sketching Interfaces​

Blueprints Functions​

Drawing Functions​

Import Functions​

Other Functions​

Sketching Functions​

Type aliases​

AnyShape​

Ƭ AnyShape: Vertex | Edge | Wire | Face | Shell | Solid | CompSolid | Compound

Defined in​

shapes.ts:31


CurveType​

Ƭ CurveType: "LINE" | "CIRCLE" | "ELLIPSE" | "HYPERBOLA" | "PARABOLA" | "BEZIER_CURVE" | "BSPLINE_CURVE" | "OFFSET_CURVE" | "OTHER_CURVE"

Defined in​

definitionMaps.ts:3


PlaneName​

Ƭ PlaneName: "XY" | "YZ" | "ZX" | "XZ" | "YX" | "ZY" | "front" | "back" | "left" | "right" | "top" | "bottom"

Defined in​

geom.ts:415


Point​

Ƭ Point: SimplePoint | Vector | [number, number] | { XYZ: () => gp_XYZ ; delete: () => void }

Defined in​

geom.ts:22


Point2D​

Ƭ Point2D: [number, number]

Defined in​

lib2d.ts:88


RadiusConfig​

Ƭ RadiusConfig: (e: Edge) => number | null | number | { filter: EdgeFinder ; keep?: boolean ; radius: number }

A generic way to define radii for fillet or chamfer (the operation)

If the radius is a filter finder object (with an EdgeFinder as filter, and a radius to specify the fillet radius), the operation will only be applied to the edges as selected by the finder. The finder will be deleted unless it is explicitly specified to keep it.

If the radius is a number all the edges will be targetted for the operation.

If the radius is a function edges will be filletted or chamfered according to the value returned by the function (0 or null will not add any fillet).

Defined in​

shapes.ts:88


ScaleMode​

Ƭ ScaleMode: "original" | "bounds" | "native"

Defined in​

curves.ts:169


Shape2D​

Ƭ Shape2D: Blueprint | Blueprints | CompoundBlueprint | null

Defined in​

blueprints/boolean2D.ts:11


Shape3D​

Ƭ Shape3D: Shell | Solid | CompSolid | Compound

Defined in​

shapes.ts:1236


SimplePoint​

Ƭ SimplePoint: [number, number, number]

Defined in​

geom.ts:21


SplineConfig​

Ƭ SplineConfig: SplineTangent | { endFactor?: number ; endTangent?: SplineTangent ; startFactor?: number ; startTangent?: StartSplineTangent }

Defined in​

sketcherlib.ts:7


SurfaceType​

Ƭ SurfaceType: "PLANE" | "CYLINDRE" | "CONE" | "SPHERE" | "TORUS" | "BEZIER_SURFACE" | "BSPLINE_SURFACE" | "REVOLUTION_SURFACE" | "EXTRUSION_SURFACE" | "OFFSET_SURFACE" | "OTHER_SURFACE"

Defined in​

shapes.ts:711

Variables​

DEG2RAD​

• DEG2RAD: number

Defined in​

constants.ts:2


HASH_CODE_MAX​

• HASH_CODE_MAX: 2147483647

Defined in​

constants.ts:1


RAD2DEG​

• RAD2DEG: number

Defined in​

constants.ts:3

Blueprints Functions​

textBlueprints​

▸ textBlueprints(text, __namedParameters?): Blueprints

Creates the Blueprints of a text, in a defined font size and a font familiy (which will be the default).

Parameters​

NameType
textstring
__namedParametersObject
__namedParameters.fontFamilyundefined | string
__namedParameters.fontSizeundefined | number
__namedParameters.startXundefined | number
__namedParameters.startYundefined | number

Returns​

Blueprints

Defined in​

text.ts:87


Drawing Functions​

draw​

▸ draw(): DrawingPen

Creates a drawing pen to programatically draw in 2D.

Returns​

DrawingPen

Defined in​

draw.ts:135


drawCircle​

▸ drawCircle(radius): Drawing

Creates the Drawing of a circle.

The circle is centered on [0, 0]

Parameters​

NameType
radiusnumber

Returns​

Drawing

Defined in​

draw.ts:190


drawEllipse​

▸ drawEllipse(majorRadius, minorRadius): Drawing

Creates the Drawing of an ellipse.

The ellipse is centered on [0, 0], with axes aligned with the coordinates.

Parameters​

NameType
majorRadiusnumber
minorRadiusnumber

Returns​

Drawing

Defined in​

draw.ts:205


drawParametricFunction​

▸ Const drawParametricFunction(func, __namedParameters?, approximationConfig?): Drawing

Creates the Drawing of parametric function

The drawing will be a spline approximating the function. Note that the degree should be at maximum 3 if you need to export the drawing as an SVG.

Parameters​

NameType
func(t: number) => Point2D
__namedParametersObject
__namedParameters.pointsCountundefined | number
__namedParameters.startundefined | number
__namedParameters.stopundefined | number
approximationConfigBSplineApproximationConfig

Returns​

Drawing

Defined in​

draw.ts:252


drawPolysides​

▸ drawPolysides(radius, sidesCount, sagitta?): Drawing

Creates the Drawing of an polygon in a defined plane

The sides of the polygon can be arcs of circle with a defined sagitta. The radius defines the out radius of the polygon without sagitta

Parameters​

NameTypeDefault value
radiusnumberundefined
sidesCountnumberundefined
sagittanumber0

Returns​

Drawing

Defined in​

draw.ts:221


drawRoundedRectangle​

▸ drawRoundedRectangle(width, height, r?): Drawing

Creates the Drawing of a rectangle with (optional) rounded corners.

The rectangle is centered on [0, 0]

Parameters​

NameTypeDefault value
widthnumberundefined
heightnumberundefined
rnumber | { rx?: number ; ry?: number }0

Returns​

Drawing

Defined in​

draw.ts:146


drawSingleCircle​

▸ drawSingleCircle(radius): Drawing

Creates the Drawing of a circle as one single curve.

The circle is centered on [0, 0]

Parameters​

NameType
radiusnumber

Returns​

Drawing

Defined in​

draw.ts:162


drawSingleEllipse​

▸ drawSingleEllipse(majorRadius, minorRadius): Drawing

Creates the Drawing of an ellipse as one single curve.

The ellipse is centered on [0, 0], with axes aligned with the coordinates.

Parameters​

NameType
majorRadiusnumber
minorRadiusnumber

Returns​

Drawing

Defined in​

draw.ts:173


drawText​

▸ drawText(text, __namedParameters?): Drawing

Creates the Drawing of a text, in a defined font size and a font familiy (which will be the default).

Parameters​

NameType
textstring
__namedParametersObject
__namedParameters.fontFamilyundefined | string
__namedParameters.fontSizeundefined | number
__namedParameters.startXundefined | number
__namedParameters.startYundefined | number

Returns​

Drawing

Defined in​

draw.ts:235


Import Functions​

importSTEP​

▸ importSTEP(STLBlob): Promise<AnyShape>

Creates a new shapes from a STEP file (as a Blob or a File).

Parameters​

NameType
STLBlobBlob

Returns​

Promise<AnyShape>

Defined in​

importers.ts:13


importSTL​

▸ importSTL(STLBlob): Promise<AnyShape>

Creates a new shapes from a STL file (as a Blob or a File).

This process can be relatively long depending on how much tesselation has been done to your STL.

This function tries to clean a bit the triangulation of faces, but can fail in bad ways.

Parameters​

NameType
STLBlobBlob

Returns​

Promise<AnyShape>

Defined in​

importers.ts:47


Other Functions​

GCWithObject​

▸ Const GCWithObject(obj): <Type>(value: Type) => Type

Parameters​

NameType
objany

Returns​

fn

▸ <Type>(value): Type

Type parameters​
NameType
Typeextends Deletable
Parameters​
NameType
valueType
Returns​

Type

Defined in​

register.ts:70


GCWithScope​

▸ Const GCWithScope(): <Type>(value: Type) => Type

Returns​

fn

▸ <Type>(value): Type

Type parameters​
NameType
Typeextends Deletable
Parameters​
NameType
valueType
Returns​

Type

Defined in​

register.ts:61


addHolesInFace​

▸ Const addHolesInFace(face, holes): Face

Parameters​

NameType
faceFace
holesWire[]

Returns​

Face

Defined in​

shapeHelpers.ts:463


asDir​

▸ asDir(coords): gp_Dir

Parameters​

NameType
coordsPoint

Returns​

gp_Dir

Defined in​

geom.ts:197


asPnt​

▸ asPnt(coords): gp_Pnt

Parameters​

NameType
coordsPoint

Returns​

gp_Pnt

Defined in​

geom.ts:190


assembleWire​

▸ Const assembleWire(listOfEdges): Wire

Parameters​

NameType
listOfEdges(Edge | Wire)[]

Returns​

Wire

Defined in​

shapeHelpers.ts:264


axis2d​

▸ Const axis2d(point, direction): gp_Ax2d

Parameters​

NameType
pointPoint2D
directionPoint2D

Returns​

gp_Ax2d

Defined in​

lib2d.ts:105


basicFaceExtrusion​

▸ Const basicFaceExtrusion(face, extrusionVec): Solid

Parameters​

NameType
faceFace
extrusionVecVector

Returns​

Solid

Defined in​

addThickness.ts:24


cast​

▸ cast(shape): AnyShape

Parameters​

NameType
shapeTopoDS_Shape

Returns​

AnyShape

Defined in​

shapes.ts:1270


combineFinderFilters​

▸ Const combineFinderFilters<Type>(filters): [(v: Type) => number, () => void]

Combine a set of finder filters (defined with radius) to pass as a filter function.

It returns the filter, as well as a cleanup function.

Type parameters​

NameType
Typeextends FaceOrEdge

Parameters​

NameType
filters{ filter: Finder<Type> ; radius: number }[]

Returns​

[(v: Type) => number, () => void]

Defined in​

finders.ts:465


complexExtrude​

▸ complexExtrude(wire, center, normal, profileShape, shellMode): [Shape3D, Wire, Wire]

Parameters​

NameType
wireWire
centerPoint
normalPoint
profileShapeundefined | ExtrusionProfile
shellModetrue

Returns​

[Shape3D, Wire, Wire]

Defined in​

addThickness.ts:192

▸ complexExtrude(wire, center, normal, profileShape?, shellMode?): Shape3D

Parameters​

NameType
wireWire
centerPoint
normalPoint
profileShape?ExtrusionProfile
shellMode?false

Returns​

Shape3D

Defined in​

addThickness.ts:199


compoundShapes​

▸ Const compoundShapes(shapeArray): AnyShape

Parameters​

NameType
shapeArrayAnyShape[]

Returns​

AnyShape

Defined in​

shapeHelpers.ts:423


createNamedPlane​

▸ Const createNamedPlane(plane, sourceOrigin?): Plane

Parameters​

NameType
planePlaneName
sourceOriginnumber | Point

Returns​

Plane

Defined in​

geom.ts:486


cut2D​

▸ Const cut2D(first, second): null | Blueprint | CompoundBlueprint | Blueprints

Parameters​

NameType
firstShape2D
secondShape2D

Returns​

null | Blueprint | CompoundBlueprint | Blueprints

Defined in​

blueprints/boolean2D.ts:225


cutBlueprints​

▸ Const cutBlueprints(first, second): null | Blueprint | Blueprints

Parameters​

NameType
firstBlueprint
secondBlueprint

Returns​

null | Blueprint | Blueprints

Defined in​

blueprints/booleanOperations.ts:381


downcast​

▸ downcast(shape): GenericTopo

Parameters​

NameType
shapeTopoDS_Shape

Returns​

GenericTopo

Defined in​

shapes.ts:1250


drawRectangle​

▸ Const drawRectangle(width, height, r?): Drawing

Parameters​

NameTypeDefault value
widthnumberundefined
heightnumberundefined
rnumber | { rx?: number ; ry?: number }0

Returns​

Drawing

Defined in​

draw.ts:153


fuse2D​

▸ Const fuse2D(first, second): null | Blueprint | CompoundBlueprint | Blueprints

Parameters​

NameType
firstShape2D
secondShape2D

Returns​

null | Blueprint | CompoundBlueprint | Blueprints

Defined in​

blueprints/boolean2D.ts:158


fuseBlueprints​

▸ Const fuseBlueprints(first, second): null | Blueprint | Blueprints

Parameters​

NameType
firstBlueprint
secondBlueprint

Returns​

null | Blueprint | Blueprints

Defined in​

blueprints/booleanOperations.ts:350


genericSweep​

▸ genericSweep(wire, spine, sweepConfig, shellMode): [Shape3D, Wire, Wire]

Parameters​

NameType
wireWire
spineWire
sweepConfigGenericSweepConfig
shellModetrue

Returns​

[Shape3D, Wire, Wire]

Defined in​

addThickness.ts:71

▸ genericSweep(wire, spine, sweepConfig, shellMode?): Shape3D

Parameters​

NameType
wireWire
spineWire
sweepConfigGenericSweepConfig
shellMode?false

Returns​

Shape3D

Defined in​

addThickness.ts:77


getFont​

▸ Const getFont(fontFamily?): Font

Parameters​

NameTypeDefault value
fontFamilystring"default"

Returns​

Font

Defined in​

text.ts:26


getOC​

▸ Const getOC(): OpenCascadeInstance

Returns​

OpenCascadeInstance

Defined in​

oclib.ts:11


intersectBlueprints​

▸ Const intersectBlueprints(first, second): null | Blueprint | Blueprints

Parameters​

NameType
firstBlueprint
secondBlueprint

Returns​

null | Blueprint | Blueprints

Defined in​

blueprints/booleanOperations.ts:412


isShape3D​

▸ isShape3D(shape): shape is Shape3D

Parameters​

NameType
shapeAnyShape

Returns​

shape is Shape3D

Defined in​

shapes.ts:1237


isWire​

▸ isWire(shape): shape is Wire

Parameters​

NameType
shapeAnyShape

Returns​

shape is Wire

Defined in​

shapes.ts:1246


iterTopo​

▸ Const iterTopo(shape, topo): IterableIterator<TopoDS_Shape>

Parameters​

NameType
shapeTopoDS_Shape
topoTopoEntity

Returns​

IterableIterator<TopoDS_Shape>

Defined in​

shapes.ts:109


loadFont​

▸ Const loadFont(fontPath, fontFamily?): Promise<Font>

Import a font in the text system. If the font family is not defined it will set its name as "default"

The font should be in TTF

Parameters​

NameTypeDefault value
fontPathstringundefined
fontFamilystring"default"

Returns​

Promise<Font>

Defined in​

text.ts:17


localGC​

▸ Const localGC(debug?): [<T>(v: T) => T, () => void, undefined | Set<Deletable>]

Parameters​

NameType
debug?boolean

Returns​

[<T>(v: T) => T, () => void, undefined | Set<Deletable>]

Defined in​

register.ts:79


loft​

▸ Const loft(wires, __namedParameters?, returnShell?): Shape3D

Parameters​

NameTypeDefault value
wiresWire[]undefined
__namedParametersLoftConfig{}
returnShellbooleanfalse

Returns​

Shape3D

Defined in​

addThickness.ts:293


makeAx1​

▸ Const makeAx1(center, dir): gp_Ax1

Parameters​

NameType
centerPoint
dirPoint

Returns​

gp_Ax1

Defined in​

geom.ts:64


makeAx2​

▸ Const makeAx2(center, dir, xDir?): gp_Ax2

Parameters​

NameType
centerPoint
dirPoint
xDir?Point

Returns​

gp_Ax2

Defined in​

geom.ts:46


makeAx3​

▸ Const makeAx3(center, dir, xDir?): gp_Ax3

Parameters​

NameType
centerPoint
dirPoint
xDir?Point

Returns​

gp_Ax3

Defined in​

geom.ts:28


makeBSplineApproximation​

▸ Const makeBSplineApproximation(points, __namedParameters?): Edge

Parameters​

NameType
pointsPoint[]
__namedParametersBSplineApproximationConfig

Returns​

Edge

Defined in​

shapeHelpers.ts:166


makeBaseBox​

▸ Const makeBaseBox(xLength, yLength, zLength): Shape3D

Parameters​

NameType
xLengthnumber
yLengthnumber
zLengthnumber

Returns​

Shape3D

Defined in​

shortcuts.ts:4


makeBezierCurve​

▸ Const makeBezierCurve(points): Edge

Parameters​

NameType
pointsPoint[]

Returns​

Edge

Defined in​

shapeHelpers.ts:223


makeCircle​

▸ Const makeCircle(radius, center?, normal?): Edge

Parameters​

NameType
radiusnumber
centerPoint
normalPoint

Returns​

Edge

Defined in​

shapeHelpers.ts:27


makeCompound​

▸ Const makeCompound(shapeArray): AnyShape

Parameters​

NameType
shapeArrayAnyShape[]

Returns​

AnyShape

Defined in​

shapeHelpers.ts:438


makeCylinder​

▸ Const makeCylinder(radius, height, location?, direction?): Solid

Parameters​

NameType
radiusnumber
heightnumber
locationPoint
directionPoint

Returns​

Solid

Defined in​

shapeHelpers.ts:363


makeEllipse​

▸ Const makeEllipse(majorRadius, minorRadius, center?, normal?, xDir?): Edge

Parameters​

NameType
majorRadiusnumber
minorRadiusnumber
centerPoint
normalPoint
xDir?Point

Returns​

Edge

Defined in​

shapeHelpers.ts:45


makeEllipseArc​

▸ Const makeEllipseArc(majorRadius, minorRadius, startAngle, endAngle, center?, normal?, xDir?): Edge

Parameters​

NameType
majorRadiusnumber
minorRadiusnumber
startAnglenumber
endAnglenumber
centerPoint
normalPoint
xDir?Point

Returns​

Edge

Defined in​

shapeHelpers.ts:132


makeFace​

▸ Const makeFace(wire): Face

Parameters​

NameType
wireWire

Returns​

Face

Defined in​

shapeHelpers.ts:300


makeHelix​

▸ Const makeHelix(pitch, height, radius, center?, dir?, lefthand?): Edge

Parameters​

NameTypeDefault value
pitchnumberundefined
heightnumberundefined
radiusnumberundefined
centerPointundefined
dirPointundefined
lefthandbooleanfalse

Returns​

Edge

Defined in​

shapeHelpers.ts:68


makeLine​

▸ Const makeLine(v1, v2): Edge

Parameters​

NameType
v1Point
v2Point

Returns​

Edge

Defined in​

shapeHelpers.ts:20


makeNewFaceWithinFace​

▸ Const makeNewFaceWithinFace(originFace, wire): Face

Parameters​

NameType
originFaceFace
wireWire

Returns​

Face

Defined in​

shapeHelpers.ts:313


makeNonPlanarFace​

▸ Const makeNonPlanarFace(wire): Face

Parameters​

NameType
wireWire

Returns​

Face

Defined in​

shapeHelpers.ts:326


makeOffset​

▸ Const makeOffset(face, offset, tolerance?): Shape3D

Parameters​

NameTypeDefault value
faceFaceundefined
offsetnumberundefined
tolerancenumber1e-6

Returns​

Shape3D

Defined in​

shapeHelpers.ts:399


makePlane​

▸ makePlane(plane): Plane

Parameters​

NameType
planePlane

Returns​

Plane

Defined in​

geomHelpers.ts:30

▸ makePlane(plane?, origin?): Plane

Parameters​

NameType
plane?PlaneName
origin?number | Point

Returns​

Plane

Defined in​

geomHelpers.ts:31


makePlaneFromFace​

▸ Const makePlaneFromFace(face, originOnSurface?): Plane

Parameters​

NameType
faceFace
originOnSurfacePoint2D

Returns​

Plane

Defined in​

geomHelpers.ts:13


makePolygon​

▸ Const makePolygon(points): Face

Parameters​

NameType
pointsPoint[]

Returns​

Face

Defined in​

shapeHelpers.ts:482


makeSolid​

▸ makeSolid(facesOrShells): Solid

Parameters​

NameType
facesOrShells(Face | Shell)[]

Returns​

Solid

Defined in​

shapeHelpers.ts:440


makeSphere​

▸ Const makeSphere(radius): Solid

Parameters​

NameType
radiusnumber

Returns​

Solid

Defined in​

shapeHelpers.ts:379


makeTangentArc​

▸ Const makeTangentArc(startPoint, startTgt, endPoint): Edge

Parameters​

NameType
startPointPoint
startTgtPoint
endPointPoint

Returns​

Edge

Defined in​

shapeHelpers.ts:235


makeThreePointArc​

▸ Const makeThreePointArc(v1, v2, v3): Edge

Parameters​

NameType
v1Point
v2Point
v3Point

Returns​

Edge

Defined in​

shapeHelpers.ts:120


makeVertex​

▸ Const makeVertex(point): Vertex

Parameters​

NameType
pointPoint

Returns​

Vertex

Defined in​

shapeHelpers.ts:388


mirror​

▸ mirror(shape, inputPlane, origin): TopoDS_Shape

Parameters​

NameType
shapeTopoDS_Shape
inputPlanePlane | PlaneName | Point
originPoint

Returns​

TopoDS_Shape

Defined in​

geomHelpers.ts:66


organiseBlueprints​

▸ Const organiseBlueprints(blueprints): Blueprints

Groups an array of blueprints such that blueprints that correspond to holes in other blueprints are set in a CompoundBlueprint.

The current algorithm does not handle cases where blueprints cross each other

Parameters​

NameType
blueprintsBlueprint[]

Returns​

Blueprints

Defined in​

blueprints/lib.ts:121


polysideInnerRadius​

▸ Const polysideInnerRadius(outerRadius, sidesCount, sagitta?): number

Helper function to compute the inner radius of a polyside (even if a sagitta is defined

Parameters​

NameTypeDefault value
outerRadiusnumberundefined
sidesCountnumberundefined
sagittanumber0

Returns​

number

Defined in​

sketches/cannedSketches.ts:163


polysidesBlueprint​

▸ Const polysidesBlueprint(radius, sidesCount, sagitta?): Blueprint

Parameters​

NameTypeDefault value
radiusnumberundefined
sidesCountnumberundefined
sagittanumber0

Returns​

Blueprint

Defined in​

blueprints/cannedBlueprints.ts:4


revolution​

▸ Const revolution(face, center?, direction?, angle?): Shape3D

Parameters​

NameTypeDefault value
faceFaceundefined
centerPointundefined
directionPointundefined
anglenumber360

Returns​

Shape3D

Defined in​

addThickness.ts:37


rotate​

▸ rotate(shape, angle, position?, direction?): TopoDS_Shape

Parameters​

NameType
shapeTopoDS_Shape
anglenumber
positionPoint
directionPoint

Returns​

TopoDS_Shape

Defined in​

geomHelpers.ts:45


roundedRectangleBlueprint​

▸ Const roundedRectangleBlueprint(width, height, r?): Blueprint

Parameters​

NameTypeDefault value
widthnumberundefined
heightnumberundefined
rnumber | { rx?: number ; ry?: number }0

Returns​

Blueprint

Defined in​

blueprints/cannedBlueprints.ts:29


scale​

▸ scale(shape, center, scale): TopoDS_Shape

Parameters​

NameType
shapeTopoDS_Shape
centerPoint
scalenumber

Returns​

TopoDS_Shape

Defined in​

geomHelpers.ts:78


setOC​

▸ Const setOC(oc): void

Parameters​

NameType
ocOpenCascadeInstance

Returns​

void

Defined in​

oclib.ts:7


shapeType​

▸ Const shapeType(shape): TopAbs_ShapeEnum

Parameters​

NameType
shapeTopoDS_Shape

Returns​

TopAbs_ShapeEnum

Defined in​

shapes.ts:145


supportExtrude​

▸ Const supportExtrude(wire, center, normal, support): Shape3D

Parameters​

NameType
wireWire
centerPoint
normalPoint
supportTopoDS_Shape

Returns​

Shape3D

Defined in​

addThickness.ts:177


translate​

▸ translate(shape, vector): TopoDS_Shape

Parameters​

NameType
shapeTopoDS_Shape
vectorPoint

Returns​

TopoDS_Shape

Defined in​

geomHelpers.ts:58


twistExtrude​

▸ twistExtrude(wire, angleDegrees, center, normal, profileShape?, shellMode?): Shape3D

Parameters​

NameType
wireWire
angleDegreesnumber
centerPoint
normalPoint
profileShape?ExtrusionProfile
shellMode?false

Returns​

Shape3D

Defined in​

addThickness.ts:233

▸ twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMode): [Shape3D, Wire, Wire]

Parameters​

NameType
wireWire
angleDegreesnumber
centerPoint
normalPoint
profileShapeundefined | ExtrusionProfile
shellModetrue

Returns​

[Shape3D, Wire, Wire]

Defined in​

addThickness.ts:241


Sketching Functions​

sketchCircle​

▸ Const sketchCircle(radius, planeConfig?): Sketch

Creates the Sketch of a circle in a defined plane

Parameters​

NameType
radiusnumber
planeConfigPlaneConfig

Returns​

Sketch

Defined in​

sketches/cannedSketches.ts:27


sketchEllipse​

▸ Const sketchEllipse(xRadius?, yRadius?, planeConfig?): Sketch

Creates the Sketch of an ellispe in a defined plane

Parameters​

NameTypeDefault value
xRadiusnumber1
yRadiusnumber2
planeConfigPlaneConfig{}

Returns​

Sketch

Defined in​

sketches/cannedSketches.ts:50


sketchFaceOffset​

▸ Const sketchFaceOffset(face, offset): Sketch

Creates the Sketch of an offset of a certain face. A negative offset will be within the face, a positive one outside.

Parameters​

NameType
faceFace
offsetnumber

Returns​

Sketch

Defined in​

sketches/cannedSketches.ts:182


sketchParametricFunction​

▸ Const sketchParametricFunction(func, planeConfig?, __namedParameters?, approximationConfig?): Sketch

Creates the Sketch of parametric function in a specified plane

The sketch will be a spline approximating the function

Parameters​

NameType
func(t: number) => Point2D
planeConfigPlaneConfig
__namedParametersObject
__namedParameters.pointsCountundefined | number
__namedParameters.startundefined | number
__namedParameters.stopundefined | number
approximationConfigBSplineApproximationConfig

Returns​

Sketch

Defined in​

sketches/cannedSketches.ts:201


sketchPolysides​

▸ Const sketchPolysides(radius, sidesCount, sagitta?, planeConfig?): Sketch

Creates the Sketch of an polygon in a defined plane

The sides of the polygon can be arcs of circle with a defined sagitta. The radius defines the out radius of the polygon without sagitta

Parameters​

NameTypeDefault value
radiusnumberundefined
sidesCountnumberundefined
sagittanumber0
planeConfigPlaneConfig{}

Returns​

Sketch

Defined in​

sketches/cannedSketches.ts:129


sketchRectangle​

▸ Const sketchRectangle(xLength, yLength, planeConfig?): Sketch

Creates the Sketch of a rectangle in a defined plane

Parameters​

NameType
xLengthnumber
yLengthnumber
planeConfigPlaneConfig

Returns​

Sketch

Defined in​

sketches/cannedSketches.ts:88


sketchRoundedRectangle​

▸ Const sketchRoundedRectangle(width, height, r?, planeConfig?): Sketch

Creates the Sketch of a rounded rectangle in a defined plane

Parameters​

NameTypeDefault value
widthnumberundefined
heightnumberundefined
rnumber | { rx?: number ; ry?: number }0
planeConfigPlaneConfig{}

Returns​

Sketch

Defined in​

sketches/cannedSketches.ts:111


sketchText​

▸ sketchText(text, textConfig?, planeConfig?): Sketches

Creates the Sketches of a text, in a defined font size and a font familiy (which will be the default).

Parameters​

NameType
textstring
textConfig?Object
textConfig.fontFamily?"string"
textConfig.fontSize?number
textConfig.startX?number
textConfig.startY?number
planeConfigObject
planeConfig.origin?number | Point
planeConfig.plane?Plane | PlaneName

Returns​

Sketches

Defined in​

text.ts:103