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


Point

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

Defined in

geom.ts:22


Point2D

Ƭ Point2D: [number, number]

Defined in

lib2d.ts:95


RadiusConfig

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

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


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

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

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(initialPoint?): DrawingPen

Parameters

NameType
initialPoint?Point2D

Returns

DrawingPen

Defined in

draw.ts:158


drawCircle

drawCircle(radius): Drawing

Parameters

NameType
radiusnumber

Returns

Drawing

Defined in

draw.ts:217


drawEllipse

drawEllipse(majorRadius, minorRadius): Drawing

Parameters

NameType
majorRadiusnumber
minorRadiusnumber

Returns

Drawing

Defined in

draw.ts:232


drawParametricFunction

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

Parameters

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

Returns

Drawing

Defined in

draw.ts:296


drawPointsInterpolation

Const drawPointsInterpolation(points, approximationConfig?): Drawing

Parameters

NameType
pointsPoint2D[]
approximationConfigBSplineApproximationConfig

Returns

Drawing

Defined in

draw.ts:279


drawPolysides

drawPolysides(radius, sidesCount, sagitta?): Drawing

Parameters

NameTypeDefault value
radiusnumberundefined
sidesCountnumberundefined
sagittanumber0

Returns

Drawing

Defined in

draw.ts:248


drawRoundedRectangle

drawRoundedRectangle(width, height, r?): Drawing

Parameters

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

Returns

Drawing

Defined in

draw.ts:173


drawSingleCircle

drawSingleCircle(radius): Drawing

Parameters

NameType
radiusnumber

Returns

Drawing

Defined in

draw.ts:189


drawSingleEllipse

drawSingleEllipse(majorRadius, minorRadius): Drawing

Parameters

NameType
majorRadiusnumber
minorRadiusnumber

Returns

Drawing

Defined in

draw.ts:200


drawText

drawText(text, __namedParameters?): Drawing

Parameters

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

Returns

Drawing

Defined in

draw.ts:262


Import Functions

importSTEP

importSTEP(STLBlob): Promise<AnyShape>

Parameters

NameType
STLBlobBlob

Returns

Promise<AnyShape>

Defined in

importers.ts:13


importSTL

importSTL(STLBlob): Promise<AnyShape>

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


asDir

asDir(coords): gp_Dir

Parameters

NameType
coordsPoint

Returns

gp_Dir

Defined in

geom.ts:212


asPnt

asPnt(coords): gp_Pnt

Parameters

NameType
coordsPoint

Returns

gp_Pnt

Defined in

geom.ts:205


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


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


combineFinderFilters

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

Type parameters

NameType
Typeextends FaceOrEdge

Parameters

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

Returns

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

Defined in

finders.ts:469


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

Const compoundShapes(shapeArray): AnyShape

Parameters

NameType
shapeArrayAnyShape[]

Returns

AnyShape

Defined in

shapeHelpers.ts:430


createNamedPlane

Const createNamedPlane(plane, sourceOrigin?): Plane

Parameters

NameType
planePlaneName
sourceOriginnumber | Point

Returns

Plane

Defined in

geom.ts:555


cut2D

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

Parameters

NameType
firstShape2D
secondShape2D

Returns

null | Blueprint | CompoundBlueprint | Blueprints

Defined in

blueprints/boolean2D.ts:263


cutBlueprints

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

Parameters

NameType
firstBlueprint
secondBlueprint

Returns

null | Blueprint | Blueprints

Defined in

blueprints/booleanOperations.ts:488


downcast

downcast(shape): GenericTopo

Parameters

NameType
shapeTopoDS_Shape

Returns

GenericTopo

Defined in

shapes.ts:1258


drawRectangle

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

Parameters

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

Returns

Drawing

Defined in

draw.ts:180


fuse2D

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

Parameters

NameType
firstShape2D
secondShape2D

Returns

null | Blueprint | CompoundBlueprint | Blueprints

Defined in

blueprints/boolean2D.ts:196


fuseBlueprints

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

Parameters

NameType
firstBlueprint
secondBlueprint

Returns

null | Blueprint | Blueprints

Defined in

blueprints/booleanOperations.ts:457


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


intersect2D

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

Parameters

NameType
firstShape2D
secondShape2D

Returns

Blueprint | Blueprints | CompoundBlueprint | null

Defined in

blueprints/boolean2D.ts:315


intersectBlueprints

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

Parameters

NameType
firstBlueprint
secondBlueprint

Returns

null | Blueprint | Blueprints

Defined in

blueprints/booleanOperations.ts:519


isShape3D

isShape3D(shape): shape is Shape3D

Parameters

NameType
shapeAnyShape

Returns

shape is Shape3D

Defined in

shapes.ts:1245


isWire

isWire(shape): shape is Wire

Parameters

NameType
shapeAnyShape

Returns

shape is Wire

Defined in

shapes.ts:1254


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>

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


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


makeCylinder

Const 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:198


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


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


makeNonPlanarFace

Const makeNonPlanarFace(wire): Face

Parameters

NameType
wireWire

Returns

Face

Defined in

shapeHelpers.ts:328


makeOffset

Const 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

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


makeSolid

makeSolid(facesOrShells): Solid

Parameters

NameType
facesOrShells(Face | Shell)[]

Returns

Solid

Defined in

shapeHelpers.ts:447


makeSphere

Const makeSphere(radius): Solid

Parameters

NameType
radiusnumber

Returns

Solid

Defined in

shapeHelpers.ts:382


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


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

Parameters

NameType
blueprintsBlueprint[]

Returns

Blueprints

Defined in

blueprints/lib.ts:123


polysideInnerRadius

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

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


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

Const sketchCircle(radius, planeConfig?): Sketch

Parameters

NameType
radiusnumber
planeConfigPlaneConfig

Returns

Sketch

Defined in

sketches/cannedSketches.ts:27


sketchEllipse

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

Parameters

NameTypeDefault value
xRadiusnumber1
yRadiusnumber2
planeConfigPlaneConfig{}

Returns

Sketch

Defined in

sketches/cannedSketches.ts:50


sketchFaceOffset

Const sketchFaceOffset(face, offset): Sketch

Parameters

NameType
faceFace
offsetnumber

Returns

Sketch

Defined in

sketches/cannedSketches.ts:182


sketchParametricFunction

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

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

Parameters

NameTypeDefault value
radiusnumberundefined
sidesCountnumberundefined
sagittanumber0
planeConfigPlaneConfig{}

Returns

Sketch

Defined in

sketches/cannedSketches.ts:129


sketchRectangle

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

Parameters

NameType
xLengthnumber
yLengthnumber
planeConfigPlaneConfig

Returns

Sketch

Defined in

sketches/cannedSketches.ts:88


sketchRoundedRectangle

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

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

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