Skip to main content

replicad

Finders Classes

Other Classes

Sketching Classes

Other Interfaces

Sketching Interfaces

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


Corner

Ƭ Corner: Object

Type declaration

NameType
firstCurveCurve2D
pointPoint2D
secondCurveCurve2D

Defined in

finders/cornerFinder.ts:6


CubeFace

Ƭ CubeFace: "front" | "back" | "top" | "bottom" | "left" | "right"

Defined in

projection/ProjectionCamera.ts:5


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:491


Point

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

Defined in

geom.ts:22


Point2D

Ƭ Point2D: [number, number]

Defined in

lib2d/definitions.ts:1


ProjectionPlane

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

Defined in

projection/ProjectionCamera.ts:6


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:12


Shape3D

Ƭ Shape3D: Shell | Solid | CompSolid | Compound

Defined in

shapes.ts:1253


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:726

Variables

DEG2RAD

Const DEG2RAD: number

Defined in

constants.ts:2


HASH_CODE_MAX

Const HASH_CODE_MAX: 2147483647

Defined in

constants.ts:1


RAD2DEG

Const RAD2DEG: number

Defined in

constants.ts:3

Drawing Functions

draw

draw(initialPoint?): DrawingPen

Creates a drawing pen to programatically draw in 2D.

Parameters

NameType
initialPoint?Point2D

Returns

DrawingPen

Defined in

draw.ts:233


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:292


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:307


drawParametricFunction

drawParametricFunction(func, «destructured»?, 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
«destructured»Object
› pointsCountundefined | number
› startundefined | number
› stopundefined | number
approximationConfigBSplineApproximationConfig

Returns

Drawing

Defined in

draw.ts:371


drawPointsInterpolation

drawPointsInterpolation(points, approximationConfig?): Drawing

Creates the Drawing by interpolating points as a curve

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

Parameters

NameType
pointsPoint2D[]
approximationConfigBSplineApproximationConfig

Returns

Drawing

Defined in

draw.ts:354


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:323


drawRectangle

drawRectangle(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:248


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:248


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:264


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:275


drawText

drawText(text, «destructured»?): Drawing

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

Parameters

NameType
textstring
«destructured»Object
› fontFamilyundefined | string
› fontSizeundefined | number
› startXundefined | number
› startYundefined | number

Returns

Drawing

Defined in

draw.ts:337


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

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

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

addHolesInFace(face, holes): Face

Parameters

NameType
faceFace
holesWire[]

Returns

Face

Defined in

shapeHelpers.ts:470


asDir

asDir(coords): gp_Dir

Parameters

NameType
coordsPoint

Returns

gp_Dir

Defined in

geom.ts:219


asPnt

asPnt(coords): gp_Pnt

Parameters

NameType
coordsPoint

Returns

gp_Pnt

Defined in

geom.ts:212


assembleWire

assembleWire(listOfEdges): Wire

Parameters

NameType
listOfEdges(Edge | Wire)[]

Returns

Wire

Defined in

shapeHelpers.ts:264


axis2d

axis2d(point, direction): gp_Ax2d

Parameters

NameType
pointPoint2D
directionPoint2D

Returns

gp_Ax2d

Defined in

lib2d/ocWrapper.ts:21


basicFaceExtrusion

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:1287


combineFinderFilters

combineFinderFilters<Type, T>(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

Name
Type
T

Parameters

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

Returns

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

Defined in

finders/index.ts:9


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:194

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

Parameters

NameType
wireWire
centerPoint
normalPoint
profileShape?ExtrusionProfile
shellMode?false

Returns

Shape3D

Defined in

addThickness.ts:201


compoundShapes

compoundShapes(shapeArray): AnyShape

Parameters

NameType
shapeArrayAnyShape[]

Returns

AnyShape

Defined in

shapeHelpers.ts:430


createNamedPlane

createNamedPlane(plane, sourceOrigin?): Plane

Parameters

NameType
planePlaneName
sourceOriginnumber | Point

Returns

Plane

Defined in

geom.ts:562


cut2D

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

Parameters

NameType
firstShape2D
secondShape2D

Returns

null | CompoundBlueprint | Blueprint | Blueprints

Defined in

blueprints/boolean2D.ts:291


cutBlueprints

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

Parameters

NameType
firstBlueprint
secondBlueprint

Returns

null | Blueprint | Blueprints

Defined in

blueprints/booleanOperations.ts:503


downcast

downcast(shape): GenericTopo

Parameters

NameType
shapeTopoDS_Shape

Returns

GenericTopo

Defined in

shapes.ts:1267


drawFaceOutline

drawFaceOutline(face): Drawing

Parameters

NameType
faceFace

Returns

Drawing

Defined in

draw.ts:384


drawProjection

drawProjection(shape, projectionCamera?): Object

Parameters

NameTypeDefault value
shapeAnyShapeundefined
projectionCameraProjectionPlane | ProjectionCamera"front"

Returns

Object

NameType
hiddenDrawing
visibleDrawing

Defined in

draw.ts:408


fuse2D

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

Parameters

NameType
firstShape2D
secondShape2D

Returns

null | CompoundBlueprint | Blueprint | Blueprints

Defined in

blueprints/boolean2D.ts:224


fuseBlueprints

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

Parameters

NameType
firstBlueprint
secondBlueprint

Returns

null | Blueprint | Blueprints

Defined in

blueprints/booleanOperations.ts:472


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

getFont(fontFamily?): Font

Parameters

NameTypeDefault value
fontFamilystring"default"

Returns

Font

Defined in

text.ts:28


getOC

getOC(): OpenCascadeInstance

Returns

OpenCascadeInstance

Defined in

oclib.ts:11


intersect2D

intersect2D(first, second): Blueprint | Blueprints | CompoundBlueprint | null

Parameters

NameType
firstShape2D
secondShape2D

Returns

Blueprint | Blueprints | CompoundBlueprint | null

Defined in

blueprints/boolean2D.ts:343


intersectBlueprints

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

Parameters

NameType
firstBlueprint
secondBlueprint

Returns

null | Blueprint | Blueprints

Defined in

blueprints/booleanOperations.ts:534


isPoint

isPoint(p): p is Point

Parameters

NameType
punknown

Returns

p is Point

Defined in

geom.ts:28


isProjectionPlane

isProjectionPlane(plane): plane is ProjectionPlane

Parameters

NameType
planeunknown

Returns

plane is ProjectionPlane

Defined in

projection/ProjectionCamera.ts:37


isShape3D

isShape3D(shape): shape is Shape3D

Parameters

NameType
shapeAnyShape

Returns

shape is Shape3D

Defined in

shapes.ts:1254


isWire

isWire(shape): shape is Wire

Parameters

NameType
shapeAnyShape

Returns

shape is Wire

Defined in

shapes.ts:1263


iterTopo

iterTopo(shape, topo): IterableIterator<TopoDS_Shape>

Parameters

NameType
shapeTopoDS_Shape
topoTopoEntity

Returns

IterableIterator<TopoDS_Shape>

Defined in

shapes.ts:109


loadFont

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

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

loft(wires, «destructured»?, returnShell?): Shape3D

Parameters

NameTypeDefault value
wiresWire[]undefined
«destructured»LoftConfig{}
returnShellbooleanfalse

Returns

Shape3D

Defined in

addThickness.ts:295


lookFromPlane

lookFromPlane(projectionPlane): ProjectionCamera

Parameters

NameType
projectionPlaneProjectionPlane

Returns

ProjectionCamera

Defined in

projection/ProjectionCamera.ts:41


makeAx1

makeAx1(center, dir): gp_Ax1

Parameters

NameType
centerPoint
dirPoint

Returns

gp_Ax1

Defined in

geom.ts:71


makeAx2

makeAx2(center, dir, xDir?): gp_Ax2

Parameters

NameType
centerPoint
dirPoint
xDir?Point

Returns

gp_Ax2

Defined in

geom.ts:53


makeAx3

makeAx3(center, dir, xDir?): gp_Ax3

Parameters

NameType
centerPoint
dirPoint
xDir?Point

Returns

gp_Ax3

Defined in

geom.ts:35


makeBSplineApproximation

makeBSplineApproximation(points, «destructured»?): Edge

Parameters

NameType
pointsPoint[]
«destructured»BSplineApproximationConfig

Returns

Edge

Defined in

shapeHelpers.ts:166


makeBaseBox

makeBaseBox(xLength, yLength, zLength): Shape3D

Parameters

NameType
xLengthnumber
yLengthnumber
zLengthnumber

Returns

Shape3D

Defined in

shortcuts.ts:4


makeBezierCurve

makeBezierCurve(points): Edge

Parameters

NameType
pointsPoint[]

Returns

Edge

Defined in

shapeHelpers.ts:223


makeCircle

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

Parameters

NameType
radiusnumber
centerPoint
normalPoint

Returns

Edge

Defined in

shapeHelpers.ts:27


makeCompound

makeCompound(shapeArray): AnyShape

Parameters

NameType
shapeArrayAnyShape[]

Returns

AnyShape

Defined in

shapeHelpers.ts:430


makeCylinder

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

Parameters

NameType
radiusnumber
heightnumber
locationPoint
directionPoint

Returns

Solid

Defined in

shapeHelpers.ts:366


makeDirection

makeDirection(p): Point

Parameters

NameType
pDirection

Returns

Point

Defined in

geom.ts:205


makeEllipse

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

Parameters

NameType
majorRadiusnumber
minorRadiusnumber
centerPoint
normalPoint
xDir?Point

Returns

Edge

Defined in

shapeHelpers.ts:45


makeEllipseArc

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

makeFace(wire): Face

Parameters

NameType
wireWire

Returns

Face

Defined in

shapeHelpers.ts:302


makeHelix

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

makeLine(v1, v2): Edge

Parameters

NameType
v1Point
v2Point

Returns

Edge

Defined in

shapeHelpers.ts:20


makeNewFaceWithinFace

makeNewFaceWithinFace(originFace, wire): Face

Parameters

NameType
originFaceFace
wireWire

Returns

Face

Defined in

shapeHelpers.ts:315


makeNonPlanarFace

makeNonPlanarFace(wire): Face

Parameters

NameType
wireWire

Returns

Face

Defined in

shapeHelpers.ts:328


makeOffset

makeOffset(face, offset, tolerance?): Shape3D

Parameters

NameTypeDefault value
faceFaceundefined
offsetnumberundefined
tolerancenumber1e-6

Returns

Shape3D

Defined in

shapeHelpers.ts:402


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

makePlaneFromFace(face, originOnSurface?): Plane

Parameters

NameType
faceFace
originOnSurfacePoint2D

Returns

Plane

Defined in

geomHelpers.ts:13


makePolygon

makePolygon(points): Face

Parameters

NameType
pointsPoint[]

Returns

Face

Defined in

shapeHelpers.ts:489


makeProjectedEdges

makeProjectedEdges(shape, camera, withHiddenLines?): Object

Parameters

NameTypeDefault value
shapeAnyShapeundefined
cameraProjectionCameraundefined
withHiddenLinesbooleantrue

Returns

Object

NameType
hiddenEdge[]
visibleEdge[]

Defined in

projection/makeProjectedEdges.ts:14


makeSolid

makeSolid(facesOrShells): Solid

Parameters

NameType
facesOrShells(Face | Shell)[]

Returns

Solid

Defined in

shapeHelpers.ts:447


makeSphere

makeSphere(radius): Solid

Parameters

NameType
radiusnumber

Returns

Solid

Defined in

shapeHelpers.ts:382


makeTangentArc

makeTangentArc(startPoint, startTgt, endPoint): Edge

Parameters

NameType
startPointPoint
startTgtPoint
endPointPoint

Returns

Edge

Defined in

shapeHelpers.ts:235


makeThreePointArc

makeThreePointArc(v1, v2, v3): Edge

Parameters

NameType
v1Point
v2Point
v3Point

Returns

Edge

Defined in

shapeHelpers.ts:120


makeVertex

makeVertex(point): Vertex

Parameters

NameType
pointPoint

Returns

Vertex

Defined in

shapeHelpers.ts:391


mirror

mirror(shape, inputPlane, origin): TopoDS_Shape

Parameters

NameType
shapeTopoDS_Shape
inputPlanePoint | Plane | PlaneName
originPoint

Returns

TopoDS_Shape

Defined in

geomHelpers.ts:66


organiseBlueprints

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:123


polysideInnerRadius

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

polysidesBlueprint(radius, sidesCount, sagitta?): Blueprint

Parameters

NameTypeDefault value
radiusnumberundefined
sidesCountnumberundefined
sagittanumber0

Returns

Blueprint

Defined in

blueprints/cannedBlueprints.ts:4


revolution

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

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

setOC(oc): void

Parameters

NameType
ocOpenCascadeInstance

Returns

void

Defined in

oclib.ts:7


shapeType

shapeType(shape): TopAbs_ShapeEnum

Parameters

NameType
shapeTopoDS_Shape

Returns

TopAbs_ShapeEnum

Defined in

shapes.ts:145


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:101


supportExtrude

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

Parameters

NameType
wireWire
centerPoint
normalPoint
supportTopoDS_Shape

Returns

Shape3D

Defined in

addThickness.ts:179


textBlueprints

textBlueprints(text, «destructured»?): Blueprints

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

Parameters

NameType
textstring
«destructured»Object
› fontFamilyundefined | string
› fontSizeundefined | number
› startXundefined | number
› startYundefined | number

Returns

Blueprints

Defined in

text.ts:87


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:235

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:243


Sketching Functions

sketchCircle

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

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

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

sketchParametricFunction(func, planeConfig?, «destructured»?, 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
«destructured»Object
› pointsCountundefined | number
› startundefined | number
› stopundefined | number
approximationConfigBSplineApproximationConfig

Returns

Sketch

Defined in

sketches/cannedSketches.ts:201


sketchPolysides

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

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

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