replicad
Finders Classes
Other Classes
- BaseSketcher2d
- Blueprint
- BlueprintSketcher
- Blueprints
- BoundingBox
- BoundingBox2d
- CompSolid
- Compound
- CompoundBlueprint
- CompoundSketch
- Curve
- Curve2D
- Drawing
- DrawingPen
- Edge
- Face
- Plane
- Shape
- Shell
- Sketches
- Solid
- Surface
- Transformation
- Vector
- Vertex
- Wire
- WrappingObj
- _1DShape
- _3DShape
Sketching Classes
Other Interfaces
- BSplineApproximationConfig
- CurveLike
- DrawingInterface
- ExtrusionProfile
- FaceTriangulation
- GenericSweepConfig
- LoftConfig
- ShapeMesh
- SketchInterface
Sketching Interfaces
Blueprints Functions
Drawing Functions
- draw
- drawCircle
- drawEllipse
- drawParametricFunction
- drawPolysides
- drawRoundedRectangle
- drawSingleCircle
- drawSingleEllipse
- drawText
Import Functions
Other Functions
- GCWithObject
- GCWithScope
- addHolesInFace
- asDir
- asPnt
- assembleWire
- axis2d
- basicFaceExtrusion
- cast
- combineFinderFilters
- complexExtrude
- compoundShapes
- createNamedPlane
- cut2D
- cutBlueprints
- downcast
- drawRectangle
- fuse2D
- fuseBlueprints
- genericSweep
- getFont
- getOC
- intersectBlueprints
- isShape3D
- isWire
- iterTopo
- loadFont
- localGC
- loft
- makeAx1
- makeAx2
- makeAx3
- makeBSplineApproximation
- makeBaseBox
- makeBezierCurve
- makeCircle
- makeCompound
- makeCylinder
- makeEllipse
- makeEllipseArc
- makeFace
- makeHelix
- makeLine
- makeNewFaceWithinFace
- makeNonPlanarFace
- makeOffset
- makePlane
- makePlaneFromFace
- makePolygon
- makeSolid
- makeSphere
- makeTangentArc
- makeThreePointArc
- makeVertex
- mirror
- organiseBlueprints
- polysideInnerRadius
- polysidesBlueprint
- revolution
- rotate
- roundedRectangleBlueprint
- scale
- setOC
- shapeType
- supportExtrude
- translate
- twistExtrude
Sketching Functions
- sketchCircle
- sketchEllipse
- sketchFaceOffset
- sketchParametricFunction
- sketchPolysides
- sketchRectangle
- sketchRoundedRectangle
- sketchText
Type aliases
AnyShape
Ƭ AnyShape: Vertex | Edge | Wire | Face | Shell | Solid | CompSolid | Compound
Defined in
CurveType
Ƭ CurveType: "LINE" | "CIRCLE" | "ELLIPSE" | "HYPERBOLA" | "PARABOLA" | "BEZIER_CURVE" | "BSPLINE_CURVE" | "OFFSET_CURVE" | "OTHER_CURVE"
Defined in
PlaneName
Ƭ PlaneName: "XY" | "YZ" | "ZX" | "XZ" | "YX" | "ZY" | "front" | "back" | "left" | "right" | "top" | "bottom"
Defined in
Point
Ƭ Point: SimplePoint | Vector | [number, number] | { XYZ: () => gp_XYZ ; delete: () => void  }
Defined in
Point2D
Ƭ Point2D: [number, number]
Defined in
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
ScaleMode
Ƭ ScaleMode: "original" | "bounds" | "native"
Defined in
Shape2D
Ƭ Shape2D: Blueprint | Blueprints | CompoundBlueprint | null
Defined in
Shape3D
Ƭ Shape3D: Shell | Solid | CompSolid | Compound
Defined in
SimplePoint
Ƭ SimplePoint: [number, number, number]
Defined in
SplineConfig
Ƭ SplineConfig: SplineTangent | { endFactor?: number ; endTangent?: SplineTangent ; startFactor?: number ; startTangent?: StartSplineTangent  }
Defined in
SurfaceType
Ƭ SurfaceType: "PLANE" | "CYLINDRE" | "CONE" | "SPHERE" | "TORUS" | "BEZIER_SURFACE" | "BSPLINE_SURFACE" | "REVOLUTION_SURFACE" | "EXTRUSION_SURFACE" | "OFFSET_SURFACE" | "OTHER_SURFACE"
Defined in
Variables
DEG2RAD
• DEG2RAD: number
Defined in
HASH_CODE_MAX
• HASH_CODE_MAX: 2147483647
Defined in
RAD2DEG
• RAD2DEG: number
Defined in
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
| Name | Type | 
|---|---|
| text | string | 
| __namedParameters | Object | 
| __namedParameters.fontFamily | undefined|string | 
| __namedParameters.fontSize | undefined|number | 
| __namedParameters.startX | undefined|number | 
| __namedParameters.startY | undefined|number | 
Returns
Defined in
Drawing Functions
draw
▸ draw(): DrawingPen
Creates a drawing pen to programatically draw in 2D.
Returns
Defined in
drawCircle
▸ drawCircle(radius): Drawing
Creates the Drawing of a circle.
The circle is centered on [0, 0]
Parameters
| Name | Type | 
|---|---|
| radius | number | 
Returns
Defined in
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
| Name | Type | 
|---|---|
| majorRadius | number | 
| minorRadius | number | 
Returns
Defined in
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
| Name | Type | 
|---|---|
| func | ( t:number) =>Point2D | 
| __namedParameters | Object | 
| __namedParameters.pointsCount | undefined|number | 
| __namedParameters.start | undefined|number | 
| __namedParameters.stop | undefined|number | 
| approximationConfig | BSplineApproximationConfig | 
Returns
Defined in
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
| Name | Type | Default value | 
|---|---|---|
| radius | number | undefined | 
| sidesCount | number | undefined | 
| sagitta | number | 0 | 
Returns
Defined in
drawRoundedRectangle
▸ drawRoundedRectangle(width, height, r?): Drawing
Creates the Drawing of a rectangle with (optional) rounded corners.
The rectangle is centered on [0, 0]
Parameters
| Name | Type | Default value | 
|---|---|---|
| width | number | undefined | 
| height | number | undefined | 
| r | number| {rx?:number;ry?:number} | 0 | 
Returns
Defined in
drawSingleCircle
▸ drawSingleCircle(radius): Drawing
Creates the Drawing of a circle as one single curve.
The circle is centered on [0, 0]
Parameters
| Name | Type | 
|---|---|
| radius | number | 
Returns
Defined in
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
| Name | Type | 
|---|---|
| majorRadius | number | 
| minorRadius | number | 
Returns
Defined in
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
| Name | Type | 
|---|---|
| text | string | 
| __namedParameters | Object | 
| __namedParameters.fontFamily | undefined|string | 
| __namedParameters.fontSize | undefined|number | 
| __namedParameters.startX | undefined|number | 
| __namedParameters.startY | undefined|number | 
Returns
Defined in
Import Functions
importSTEP
▸ importSTEP(STLBlob): Promise<AnyShape>
Creates a new shapes from a STEP file (as a Blob or a File).
Parameters
| Name | Type | 
|---|---|
| STLBlob | Blob | 
Returns
Promise<AnyShape>
Defined in
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
| Name | Type | 
|---|---|
| STLBlob | Blob | 
Returns
Promise<AnyShape>
Defined in
Other Functions
GCWithObject
▸ Const GCWithObject(obj): <Type>(value: Type) => Type
Parameters
| Name | Type | 
|---|---|
| obj | any | 
Returns
fn
▸ <Type>(value): Type
Type parameters
| Name | Type | 
|---|---|
| Type | extends Deletable | 
Parameters
| Name | Type | 
|---|---|
| value | Type | 
Returns
Type
Defined in
GCWithScope
▸ Const GCWithScope(): <Type>(value: Type) => Type
Returns
fn
▸ <Type>(value): Type
Type parameters
| Name | Type | 
|---|---|
| Type | extends Deletable | 
Parameters
| Name | Type | 
|---|---|
| value | Type | 
Returns
Type
Defined in
addHolesInFace
▸ Const addHolesInFace(face, holes): Face
Parameters
| Name | Type | 
|---|---|
| face | Face | 
| holes | Wire[] | 
Returns
Defined in
asDir
▸ asDir(coords): gp_Dir
Parameters
| Name | Type | 
|---|---|
| coords | Point | 
Returns
gp_Dir
Defined in
asPnt
▸ asPnt(coords): gp_Pnt
Parameters
| Name | Type | 
|---|---|
| coords | Point | 
Returns
gp_Pnt
Defined in
assembleWire
▸ Const assembleWire(listOfEdges): Wire
Parameters
| Name | Type | 
|---|---|
| listOfEdges | ( Edge|Wire)[] | 
Returns
Defined in
axis2d
▸ Const axis2d(point, direction): gp_Ax2d
Parameters
| Name | Type | 
|---|---|
| point | Point2D | 
| direction | Point2D | 
Returns
gp_Ax2d
Defined in
basicFaceExtrusion
▸ Const basicFaceExtrusion(face, extrusionVec): Solid
Parameters
| Name | Type | 
|---|---|
| face | Face | 
| extrusionVec | Vector | 
Returns
Defined in
cast
▸ cast(shape): AnyShape
Parameters
| Name | Type | 
|---|---|
| shape | TopoDS_Shape | 
Returns
Defined in
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
| Name | Type | 
|---|---|
| Type | extends FaceOrEdge | 
Parameters
| Name | Type | 
|---|---|
| filters | { filter:Finder<Type> ;radius:number}[] | 
Returns
[(v: Type) => number, () => void]
Defined in
complexExtrude
▸ complexExtrude(wire, center, normal, profileShape, shellMode): [Shape3D, Wire, Wire]
Parameters
| Name | Type | 
|---|---|
| wire | Wire | 
| center | Point | 
| normal | Point | 
| profileShape | undefined|ExtrusionProfile | 
| shellMode | true | 
Returns
Defined in
▸ complexExtrude(wire, center, normal, profileShape?, shellMode?): Shape3D
Parameters
| Name | Type | 
|---|---|
| wire | Wire | 
| center | Point | 
| normal | Point | 
| profileShape? | ExtrusionProfile | 
| shellMode? | false | 
Returns
Defined in
compoundShapes
▸ Const compoundShapes(shapeArray): AnyShape
Parameters
| Name | Type | 
|---|---|
| shapeArray | AnyShape[] | 
Returns
Defined in
createNamedPlane
▸ Const createNamedPlane(plane, sourceOrigin?): Plane
Parameters
| Name | Type | 
|---|---|
| plane | PlaneName | 
| sourceOrigin | number|Point | 
Returns
Defined in
cut2D
▸ Const cut2D(first, second): null | Blueprint | CompoundBlueprint | Blueprints
Parameters
| Name | Type | 
|---|---|
| first | Shape2D | 
| second | Shape2D | 
Returns
null | Blueprint | CompoundBlueprint | Blueprints
Defined in
cutBlueprints
▸ Const cutBlueprints(first, second): null | Blueprint | Blueprints
Parameters
| Name | Type | 
|---|---|
| first | Blueprint | 
| second | Blueprint | 
Returns
null | Blueprint | Blueprints
Defined in
blueprints/booleanOperations.ts:381
downcast
▸ downcast(shape): GenericTopo
Parameters
| Name | Type | 
|---|---|
| shape | TopoDS_Shape | 
Returns
GenericTopo
Defined in
drawRectangle
▸ Const drawRectangle(width, height, r?): Drawing
Parameters
| Name | Type | Default value | 
|---|---|---|
| width | number | undefined | 
| height | number | undefined | 
| r | number| {rx?:number;ry?:number} | 0 | 
Returns
Defined in
fuse2D
▸ Const fuse2D(first, second): null | Blueprint | CompoundBlueprint | Blueprints
Parameters
| Name | Type | 
|---|---|
| first | Shape2D | 
| second | Shape2D | 
Returns
null | Blueprint | CompoundBlueprint | Blueprints
Defined in
fuseBlueprints
▸ Const fuseBlueprints(first, second): null | Blueprint | Blueprints
Parameters
| Name | Type | 
|---|---|
| first | Blueprint | 
| second | Blueprint | 
Returns
null | Blueprint | Blueprints
Defined in
blueprints/booleanOperations.ts:350
genericSweep
▸ genericSweep(wire, spine, sweepConfig, shellMode): [Shape3D, Wire, Wire]
Parameters
| Name | Type | 
|---|---|
| wire | Wire | 
| spine | Wire | 
| sweepConfig | GenericSweepConfig | 
| shellMode | true | 
Returns
Defined in
▸ genericSweep(wire, spine, sweepConfig, shellMode?): Shape3D
Parameters
| Name | Type | 
|---|---|
| wire | Wire | 
| spine | Wire | 
| sweepConfig | GenericSweepConfig | 
| shellMode? | false | 
Returns
Defined in
getFont
▸ Const getFont(fontFamily?): Font
Parameters
| Name | Type | Default value | 
|---|---|---|
| fontFamily | string | "default" | 
Returns
Font
Defined in
getOC
▸ Const getOC(): OpenCascadeInstance
Returns
OpenCascadeInstance
Defined in
intersectBlueprints
▸ Const intersectBlueprints(first, second): null | Blueprint | Blueprints
Parameters
| Name | Type | 
|---|---|
| first | Blueprint | 
| second | Blueprint | 
Returns
null | Blueprint | Blueprints
Defined in
blueprints/booleanOperations.ts:412
isShape3D
▸ isShape3D(shape): shape is Shape3D
Parameters
| Name | Type | 
|---|---|
| shape | AnyShape | 
Returns
shape is Shape3D
Defined in
isWire
▸ isWire(shape): shape is Wire
Parameters
| Name | Type | 
|---|---|
| shape | AnyShape | 
Returns
shape is Wire
Defined in
iterTopo
▸ Const iterTopo(shape, topo): IterableIterator<TopoDS_Shape>
Parameters
| Name | Type | 
|---|---|
| shape | TopoDS_Shape | 
| topo | TopoEntity | 
Returns
IterableIterator<TopoDS_Shape>
Defined in
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
| Name | Type | Default value | 
|---|---|---|
| fontPath | string | undefined | 
| fontFamily | string | "default" | 
Returns
Promise<Font>
Defined in
localGC
▸ Const localGC(debug?): [<T>(v: T) => T, () => void, undefined | Set<Deletable>]
Parameters
| Name | Type | 
|---|---|
| debug? | boolean | 
Returns
[<T>(v: T) => T, () => void, undefined | Set<Deletable>]
Defined in
loft
▸ Const loft(wires, __namedParameters?, returnShell?): Shape3D
Parameters
| Name | Type | Default value | 
|---|---|---|
| wires | Wire[] | undefined | 
| __namedParameters | LoftConfig | {} | 
| returnShell | boolean | false | 
Returns
Defined in
makeAx1
▸ Const makeAx1(center, dir): gp_Ax1
Parameters
| Name | Type | 
|---|---|
| center | Point | 
| dir | Point | 
Returns
gp_Ax1
Defined in
makeAx2
▸ Const makeAx2(center, dir, xDir?): gp_Ax2
Parameters
| Name | Type | 
|---|---|
| center | Point | 
| dir | Point | 
| xDir? | Point | 
Returns
gp_Ax2
Defined in
makeAx3
▸ Const makeAx3(center, dir, xDir?): gp_Ax3
Parameters
| Name | Type | 
|---|---|
| center | Point | 
| dir | Point | 
| xDir? | Point | 
Returns
gp_Ax3
Defined in
makeBSplineApproximation
▸ Const makeBSplineApproximation(points, __namedParameters?): Edge
Parameters
| Name | Type | 
|---|---|
| points | Point[] | 
| __namedParameters | BSplineApproximationConfig | 
Returns
Defined in
makeBaseBox
▸ Const makeBaseBox(xLength, yLength, zLength): Shape3D
Parameters
| Name | Type | 
|---|---|
| xLength | number | 
| yLength | number | 
| zLength | number | 
Returns
Defined in
makeBezierCurve
▸ Const makeBezierCurve(points): Edge
Parameters
| Name | Type | 
|---|---|
| points | Point[] | 
Returns
Defined in
makeCircle
▸ Const makeCircle(radius, center?, normal?): Edge
Parameters
| Name | Type | 
|---|---|
| radius | number | 
| center | Point | 
| normal | Point | 
Returns
Defined in
makeCompound
▸ Const makeCompound(shapeArray): AnyShape
Parameters
| Name | Type | 
|---|---|
| shapeArray | AnyShape[] | 
Returns
Defined in
makeCylinder
▸ Const makeCylinder(radius, height, location?, direction?): Solid
Parameters
| Name | Type | 
|---|---|
| radius | number | 
| height | number | 
| location | Point | 
| direction | Point | 
Returns
Defined in
makeEllipse
▸ Const makeEllipse(majorRadius, minorRadius, center?, normal?, xDir?): Edge
Parameters
| Name | Type | 
|---|---|
| majorRadius | number | 
| minorRadius | number | 
| center | Point | 
| normal | Point | 
| xDir? | Point | 
Returns
Defined in
makeEllipseArc
▸ Const makeEllipseArc(majorRadius, minorRadius, startAngle, endAngle, center?, normal?, xDir?): Edge
Parameters
| Name | Type | 
|---|---|
| majorRadius | number | 
| minorRadius | number | 
| startAngle | number | 
| endAngle | number | 
| center | Point | 
| normal | Point | 
| xDir? | Point | 
Returns
Defined in
makeFace
▸ Const makeFace(wire): Face
Parameters
| Name | Type | 
|---|---|
| wire | Wire | 
Returns
Defined in
makeHelix
▸ Const makeHelix(pitch, height, radius, center?, dir?, lefthand?): Edge
Parameters
| Name | Type | Default value | 
|---|---|---|
| pitch | number | undefined | 
| height | number | undefined | 
| radius | number | undefined | 
| center | Point | undefined | 
| dir | Point | undefined | 
| lefthand | boolean | false | 
Returns
Defined in
makeLine
▸ Const makeLine(v1, v2): Edge
Parameters
| Name | Type | 
|---|---|
| v1 | Point | 
| v2 | Point | 
Returns
Defined in
makeNewFaceWithinFace
▸ Const makeNewFaceWithinFace(originFace, wire): Face
Parameters
| Name | Type | 
|---|---|
| originFace | Face | 
| wire | Wire | 
Returns
Defined in
makeNonPlanarFace
▸ Const makeNonPlanarFace(wire): Face
Parameters
| Name | Type | 
|---|---|
| wire | Wire | 
Returns
Defined in
makeOffset
▸ Const makeOffset(face, offset, tolerance?): Shape3D
Parameters
| Name | Type | Default value | 
|---|---|---|
| face | Face | undefined | 
| offset | number | undefined | 
| tolerance | number | 1e-6 | 
Returns
Defined in
makePlane
▸ makePlane(plane): Plane
Parameters
| Name | Type | 
|---|---|
| plane | Plane | 
Returns
Defined in
▸ makePlane(plane?, origin?): Plane
Parameters
| Name | Type | 
|---|---|
| plane? | PlaneName | 
| origin? | number|Point | 
Returns
Defined in
makePlaneFromFace
▸ Const makePlaneFromFace(face, originOnSurface?): Plane
Parameters
| Name | Type | 
|---|---|
| face | Face | 
| originOnSurface | Point2D | 
Returns
Defined in
makePolygon
▸ Const makePolygon(points): Face
Parameters
| Name | Type | 
|---|---|
| points | Point[] | 
Returns
Defined in
makeSolid
▸ makeSolid(facesOrShells): Solid
Parameters
| Name | Type | 
|---|---|
| facesOrShells | ( Face|Shell)[] | 
Returns
Defined in
makeSphere
▸ Const makeSphere(radius): Solid
Parameters
| Name | Type | 
|---|---|
| radius | number | 
Returns
Defined in
makeTangentArc
▸ Const makeTangentArc(startPoint, startTgt, endPoint): Edge
Parameters
| Name | Type | 
|---|---|
| startPoint | Point | 
| startTgt | Point | 
| endPoint | Point | 
Returns
Defined in
makeThreePointArc
▸ Const makeThreePointArc(v1, v2, v3): Edge
Parameters
| Name | Type | 
|---|---|
| v1 | Point | 
| v2 | Point | 
| v3 | Point | 
Returns
Defined in
makeVertex
▸ Const makeVertex(point): Vertex
Parameters
| Name | Type | 
|---|---|
| point | Point | 
Returns
Defined in
mirror
▸ mirror(shape, inputPlane, origin): TopoDS_Shape
Parameters
| Name | Type | 
|---|---|
| shape | TopoDS_Shape | 
| inputPlane | Plane|PlaneName|Point | 
| origin | Point | 
Returns
TopoDS_Shape
Defined in
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
| Name | Type | 
|---|---|
| blueprints | Blueprint[] | 
Returns
Defined in
polysideInnerRadius
▸ Const polysideInnerRadius(outerRadius, sidesCount, sagitta?): number
Helper function to compute the inner radius of a polyside (even if a sagitta is defined
Parameters
| Name | Type | Default value | 
|---|---|---|
| outerRadius | number | undefined | 
| sidesCount | number | undefined | 
| sagitta | number | 0 | 
Returns
number
Defined in
sketches/cannedSketches.ts:163
polysidesBlueprint
▸ Const polysidesBlueprint(radius, sidesCount, sagitta?): Blueprint
Parameters
| Name | Type | Default value | 
|---|---|---|
| radius | number | undefined | 
| sidesCount | number | undefined | 
| sagitta | number | 0 | 
Returns
Defined in
blueprints/cannedBlueprints.ts:4
revolution
▸ Const revolution(face, center?, direction?, angle?): Shape3D
Parameters
| Name | Type | Default value | 
|---|---|---|
| face | Face | undefined | 
| center | Point | undefined | 
| direction | Point | undefined | 
| angle | number | 360 | 
Returns
Defined in
rotate
▸ rotate(shape, angle, position?, direction?): TopoDS_Shape
Parameters
| Name | Type | 
|---|---|
| shape | TopoDS_Shape | 
| angle | number | 
| position | Point | 
| direction | Point | 
Returns
TopoDS_Shape
Defined in
roundedRectangleBlueprint
▸ Const roundedRectangleBlueprint(width, height, r?): Blueprint
Parameters
| Name | Type | Default value | 
|---|---|---|
| width | number | undefined | 
| height | number | undefined | 
| r | number| {rx?:number;ry?:number} | 0 | 
Returns
Defined in
blueprints/cannedBlueprints.ts:29
scale
▸ scale(shape, center, scale): TopoDS_Shape
Parameters
| Name | Type | 
|---|---|
| shape | TopoDS_Shape | 
| center | Point | 
| scale | number | 
Returns
TopoDS_Shape
Defined in
setOC
▸ Const setOC(oc): void
Parameters
| Name | Type | 
|---|---|
| oc | OpenCascadeInstance | 
Returns
void
Defined in
shapeType
▸ Const shapeType(shape): TopAbs_ShapeEnum
Parameters
| Name | Type | 
|---|---|
| shape | TopoDS_Shape | 
Returns
TopAbs_ShapeEnum
Defined in
supportExtrude
▸ Const supportExtrude(wire, center, normal, support): Shape3D
Parameters
| Name | Type | 
|---|---|
| wire | Wire | 
| center | Point | 
| normal | Point | 
| support | TopoDS_Shape | 
Returns
Defined in
translate
▸ translate(shape, vector): TopoDS_Shape
Parameters
| Name | Type | 
|---|---|
| shape | TopoDS_Shape | 
| vector | Point | 
Returns
TopoDS_Shape
Defined in
twistExtrude
▸ twistExtrude(wire, angleDegrees, center, normal, profileShape?, shellMode?): Shape3D
Parameters
| Name | Type | 
|---|---|
| wire | Wire | 
| angleDegrees | number | 
| center | Point | 
| normal | Point | 
| profileShape? | ExtrusionProfile | 
| shellMode? | false | 
Returns
Defined in
▸ twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMode): [Shape3D, Wire, Wire]
Parameters
| Name | Type | 
|---|---|
| wire | Wire | 
| angleDegrees | number | 
| center | Point | 
| normal | Point | 
| profileShape | undefined|ExtrusionProfile | 
| shellMode | true | 
Returns
Defined in
Sketching Functions
sketchCircle
▸ Const sketchCircle(radius, planeConfig?): Sketch
Creates the Sketch of a circle in a defined plane
Parameters
| Name | Type | 
|---|---|
| radius | number | 
| planeConfig | PlaneConfig | 
Returns
Defined in
sketchEllipse
▸ Const sketchEllipse(xRadius?, yRadius?, planeConfig?): Sketch
Creates the Sketch of an ellispe in a defined plane
Parameters
| Name | Type | Default value | 
|---|---|---|
| xRadius | number | 1 | 
| yRadius | number | 2 | 
| planeConfig | PlaneConfig | {} | 
Returns
Defined in
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
| Name | Type | 
|---|---|
| face | Face | 
| offset | number | 
Returns
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
| Name | Type | 
|---|---|
| func | ( t:number) =>Point2D | 
| planeConfig | PlaneConfig | 
| __namedParameters | Object | 
| __namedParameters.pointsCount | undefined|number | 
| __namedParameters.start | undefined|number | 
| __namedParameters.stop | undefined|number | 
| approximationConfig | BSplineApproximationConfig | 
Returns
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
| Name | Type | Default value | 
|---|---|---|
| radius | number | undefined | 
| sidesCount | number | undefined | 
| sagitta | number | 0 | 
| planeConfig | PlaneConfig | {} | 
Returns
Defined in
sketches/cannedSketches.ts:129
sketchRectangle
▸ Const sketchRectangle(xLength, yLength, planeConfig?): Sketch
Creates the Sketch of a rectangle in a defined plane
Parameters
| Name | Type | 
|---|---|
| xLength | number | 
| yLength | number | 
| planeConfig | PlaneConfig | 
Returns
Defined in
sketchRoundedRectangle
▸ Const sketchRoundedRectangle(width, height, r?, planeConfig?): Sketch
Creates the Sketch of a rounded rectangle in a defined plane
Parameters
| Name | Type | Default value | 
|---|---|---|
| width | number | undefined | 
| height | number | undefined | 
| r | number| {rx?:number;ry?:number} | 0 | 
| planeConfig | PlaneConfig | {} | 
Returns
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
| Name | Type | 
|---|---|
| text | string | 
| textConfig? | Object | 
| textConfig.fontFamily? | "string" | 
| textConfig.fontSize? | number | 
| textConfig.startX? | number | 
| textConfig.startY? | number | 
| planeConfig | Object | 
| planeConfig.origin? | number|Point | 
| planeConfig.plane? | Plane|PlaneName |