replicad
Finders Classes
Other Classes
- BaseSketcher2d
- Blueprint
- BlueprintSketcher
- Blueprints
- BoundingBox
- BoundingBox2d
- CompSolid
- Compound
- CompoundBlueprint
- CompoundSketch
- CornerFinder
- Curve
- Curve2D
- Drawing
- DrawingPen
- Edge
- Face
- Plane
- ProjectionCamera
- 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
Drawing Functions
- draw
- drawCircle
- drawEllipse
- drawParametricFunction
- drawPointsInterpolation
- drawPolysides
- drawRectangle
- drawRoundedRectangle
- drawSingleCircle
- drawSingleEllipse
- drawText
Import Functions
Other Functions
- GCWithObject
- GCWithScope
- addHolesInFace
- asDir
- asPnt
- assembleWire
- axis2d
- basicFaceExtrusion
- cast
- combineFinderFilters
- complexExtrude
- compoundShapes
- createNamedPlane
- cut2D
- cutBlueprints
- downcast
- drawFaceOutline
- drawProjection
- fuse2D
- fuseBlueprints
- genericSweep
- getFont
- getOC
- intersect2D
- intersectBlueprints
- isPoint
- isProjectionPlane
- isShape3D
- isWire
- iterTopo
- loadFont
- localGC
- loft
- lookFromPlane
- makeAx1
- makeAx2
- makeAx3
- makeBSplineApproximation
- makeBaseBox
- makeBezierCurve
- makeCircle
- makeCompound
- makeCylinder
- makeDirection
- makeEllipse
- makeEllipseArc
- makeFace
- makeHelix
- makeLine
- makeNewFaceWithinFace
- makeNonPlanarFace
- makeOffset
- makePlane
- makePlaneFromFace
- makePolygon
- makeProjectedEdges
- makeSolid
- makeSphere
- makeTangentArc
- makeThreePointArc
- makeVertex
- mirror
- organiseBlueprints
- polysideInnerRadius
- polysidesBlueprint
- revolution
- rotate
- roundedRectangleBlueprint
- scale
- setOC
- shapeType
- sketchText
- supportExtrude
- textBlueprints
- translate
- twistExtrude
Sketching Functions
- sketchCircle
- sketchEllipse
- sketchFaceOffset
- sketchParametricFunction
- sketchPolysides
- sketchRectangle
- sketchRoundedRectangle
Type Aliases
AnyShape
Ƭ AnyShape: Vertex
| Edge
| Wire
| Face
| Shell
| Solid
| CompSolid
| Compound
Defined in
Corner
Ƭ Corner: Object
Type declaration
Name | Type |
---|---|
firstCurve | Curve2D |
point | Point2D |
secondCurve | Curve2D |
Defined in
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
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
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
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
• Const
DEG2RAD: number
Defined in
HASH_CODE_MAX
• Const
HASH_CODE_MAX: 2147483647
Defined in
RAD2DEG
• Const
RAD2DEG: number
Defined in
Drawing Functions
draw
▸ draw(initialPoint?
): DrawingPen
Creates a drawing pen to programatically draw in 2D.
Parameters
Name | Type |
---|---|
initialPoint? | Point2D |
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
▸ 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
Name | Type |
---|---|
func | (t : number ) => Point2D |
«destructured» | Object |
› pointsCount | undefined | number |
› start | undefined | number |
› stop | undefined | number |
approximationConfig | BSplineApproximationConfig |
Returns
Defined in
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
Name | Type |
---|---|
points | Point2D [] |
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
drawRectangle
▸ drawRectangle(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
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
, «destructured»?
): 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 |
«destructured» | Object |
› fontFamily | undefined | string |
› fontSize | undefined | number |
› startX | undefined | number |
› 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
▸ 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
▸ 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
▸ 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
▸ assembleWire(listOfEdges
): Wire
Parameters
Name | Type |
---|---|
listOfEdges | (Edge | Wire )[] |
Returns
Defined in
axis2d
▸ axis2d(point
, direction
): gp_Ax2d
Parameters
Name | Type |
---|---|
point | Point2D |
direction | Point2D |
Returns
gp_Ax2d
Defined in
basicFaceExtrusion
▸ 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
▸ 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
Name | Type |
---|---|
filters | { filter : Finder <Type , T > ; 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
▸ compoundShapes(shapeArray
): AnyShape
Parameters
Name | Type |
---|---|
shapeArray | AnyShape [] |
Returns
Defined in
createNamedPlane
▸ createNamedPlane(plane
, sourceOrigin?
): Plane
Parameters
Name | Type |
---|---|
plane | PlaneName |
sourceOrigin | number | Point |
Returns
Defined in
cut2D
▸ cut2D(first
, second
): null
| CompoundBlueprint
| Blueprint
| Blueprints
Parameters
Name | Type |
---|---|
first | Shape2D |
second | Shape2D |
Returns
null
| CompoundBlueprint
| Blueprint
| Blueprints
Defined in
cutBlueprints
▸ cutBlueprints(first
, second
): null
| Blueprint
| Blueprints
Parameters
Name | Type |
---|---|
first | Blueprint |
second | Blueprint |
Returns
null
| Blueprint
| Blueprints
Defined in
blueprints/booleanOperations.ts:503
downcast
▸ downcast(shape
): GenericTopo
Parameters
Name | Type |
---|---|
shape | TopoDS_Shape |
Returns
GenericTopo
Defined in
drawFaceOutline
▸ drawFaceOutline(face
): Drawing
Parameters
Name | Type |
---|---|
face | Face |
Returns
Defined in
drawProjection
▸ drawProjection(shape
, projectionCamera?
): Object
Parameters
Name | Type | Default value |
---|---|---|
shape | AnyShape | undefined |
projectionCamera | ProjectionPlane | ProjectionCamera | "front" |
Returns
Object
Name | Type |
---|---|
hidden | Drawing |
visible | Drawing |
Defined in
fuse2D
▸ fuse2D(first
, second
): null
| CompoundBlueprint
| Blueprint
| Blueprints
Parameters
Name | Type |
---|---|
first | Shape2D |
second | Shape2D |
Returns
null
| CompoundBlueprint
| Blueprint
| Blueprints
Defined in
fuseBlueprints
▸ fuseBlueprints(first
, second
): null
| Blueprint
| Blueprints
Parameters
Name | Type |
---|---|
first | Blueprint |
second | Blueprint |
Returns
null
| Blueprint
| Blueprints
Defined in
blueprints/booleanOperations.ts:472
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
▸ getFont(fontFamily?
): Font
Parameters
Name | Type | Default value |
---|---|---|
fontFamily | string | "default" |
Returns
Font
Defined in
getOC
▸ getOC(): OpenCascadeInstance
Returns
OpenCascadeInstance
Defined in
intersect2D
▸ intersect2D(first
, second
): Blueprint
| Blueprints
| CompoundBlueprint
| null
Parameters
Name | Type |
---|---|
first | Shape2D |
second | Shape2D |
Returns
Blueprint
| Blueprints
| CompoundBlueprint
| null
Defined in
intersectBlueprints
▸ intersectBlueprints(first
, second
): null
| Blueprint
| Blueprints
Parameters
Name | Type |
---|---|
first | Blueprint |
second | Blueprint |
Returns
null
| Blueprint
| Blueprints
Defined in
blueprints/booleanOperations.ts:534
isPoint
▸ isPoint(p
): p is Point
Parameters
Name | Type |
---|---|
p | unknown |
Returns
p is Point
Defined in
isProjectionPlane
▸ isProjectionPlane(plane
): plane is ProjectionPlane
Parameters
Name | Type |
---|---|
plane | unknown |
Returns
plane is ProjectionPlane
Defined in
projection/ProjectionCamera.ts:37
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
▸ iterTopo(shape
, topo
): IterableIterator
<TopoDS_Shape
>
Parameters
Name | Type |
---|---|
shape | TopoDS_Shape |
topo | TopoEntity |
Returns
IterableIterator
<TopoDS_Shape
>
Defined in
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
Name | Type | Default value |
---|---|---|
fontPath | string | undefined |
fontFamily | string | "default" |
Returns
Promise
<Font
>
Defined in
localGC
▸ 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
▸ loft(wires
, «destructured»?
, returnShell?
): Shape3D
Parameters
Name | Type | Default value |
---|---|---|
wires | Wire [] | undefined |
«destructured» | LoftConfig | {} |
returnShell | boolean | false |
Returns
Defined in
lookFromPlane
▸ lookFromPlane(projectionPlane
): ProjectionCamera
Parameters
Name | Type |
---|---|
projectionPlane | ProjectionPlane |
Returns
Defined in
projection/ProjectionCamera.ts:41
makeAx1
▸ makeAx1(center
, dir
): gp_Ax1
Parameters
Name | Type |
---|---|
center | Point |
dir | Point |
Returns
gp_Ax1
Defined in
makeAx2
▸ makeAx2(center
, dir
, xDir?
): gp_Ax2
Parameters
Name | Type |
---|---|
center | Point |
dir | Point |
xDir? | Point |
Returns
gp_Ax2
Defined in
makeAx3
▸ makeAx3(center
, dir
, xDir?
): gp_Ax3
Parameters
Name | Type |
---|---|
center | Point |
dir | Point |
xDir? | Point |
Returns
gp_Ax3
Defined in
makeBSplineApproximation
▸ makeBSplineApproximation(points
, «destructured»?
): Edge
Parameters
Name | Type |
---|---|
points | Point [] |
«destructured» | BSplineApproximationConfig |
Returns
Defined in
makeBaseBox
▸ makeBaseBox(xLength
, yLength
, zLength
): Shape3D
Parameters
Name | Type |
---|---|
xLength | number |
yLength | number |
zLength | number |
Returns
Defined in
makeBezierCurve
▸ makeBezierCurve(points
): Edge
Parameters
Name | Type |
---|---|
points | Point [] |
Returns
Defined in
makeCircle
▸ makeCircle(radius
, center?
, normal?
): Edge
Parameters
Name | Type |
---|---|
radius | number |
center | Point |
normal | Point |
Returns
Defined in
makeCompound
▸ makeCompound(shapeArray
): AnyShape
Parameters
Name | Type |
---|---|
shapeArray | AnyShape [] |
Returns
Defined in
makeCylinder
▸ makeCylinder(radius
, height
, location?
, direction?
): Solid
Parameters
Name | Type |
---|---|
radius | number |
height | number |
location | Point |
direction | Point |
Returns
Defined in
makeDirection
▸ makeDirection(p
): Point
Parameters
Name | Type |
---|---|
p | Direction |
Returns
Defined in
makeEllipse
▸ makeEllipse(majorRadius
, minorRadius
, center?
, normal?
, xDir?
): Edge
Parameters
Name | Type |
---|---|
majorRadius | number |
minorRadius | number |
center | Point |
normal | Point |
xDir? | Point |
Returns
Defined in
makeEllipseArc
▸ 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
▸ makeFace(wire
): Face
Parameters
Name | Type |
---|---|
wire | Wire |
Returns
Defined in
makeHelix
▸ 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
▸ makeLine(v1
, v2
): Edge
Parameters
Name | Type |
---|---|
v1 | Point |
v2 | Point |
Returns
Defined in
makeNewFaceWithinFace
▸ makeNewFaceWithinFace(originFace
, wire
): Face
Parameters
Name | Type |
---|---|
originFace | Face |
wire | Wire |
Returns
Defined in
makeNonPlanarFace
▸ makeNonPlanarFace(wire
): Face
Parameters
Name | Type |
---|---|
wire | Wire |
Returns
Defined in
makeOffset
▸ 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
▸ makePlaneFromFace(face
, originOnSurface?
): Plane
Parameters
Name | Type |
---|---|
face | Face |
originOnSurface | Point2D |
Returns
Defined in
makePolygon
▸ makePolygon(points
): Face
Parameters
Name | Type |
---|---|
points | Point [] |
Returns
Defined in
makeProjectedEdges
▸ makeProjectedEdges(shape
, camera
, withHiddenLines?
): Object
Parameters
Name | Type | Default value |
---|---|---|
shape | AnyShape | undefined |
camera | ProjectionCamera | undefined |
withHiddenLines | boolean | true |
Returns
Object
Name | Type |
---|---|
hidden | Edge [] |
visible | Edge [] |
Defined in
projection/makeProjectedEdges.ts:14
makeSolid
▸ makeSolid(facesOrShells
): Solid
Parameters
Name | Type |
---|---|
facesOrShells | (Face | Shell )[] |
Returns
Defined in
makeSphere
▸ makeSphere(radius
): Solid
Parameters
Name | Type |
---|---|
radius | number |
Returns
Defined in
makeTangentArc
▸ makeTangentArc(startPoint
, startTgt
, endPoint
): Edge
Parameters
Name | Type |
---|---|
startPoint | Point |
startTgt | Point |
endPoint | Point |
Returns
Defined in
makeThreePointArc
▸ makeThreePointArc(v1
, v2
, v3
): Edge
Parameters
Name | Type |
---|---|
v1 | Point |
v2 | Point |
v3 | Point |
Returns
Defined in
makeVertex
▸ 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 | Point | Plane | PlaneName |
origin | Point |
Returns
TopoDS_Shape
Defined in
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
Name | Type |
---|---|
blueprints | Blueprint [] |
Returns
Defined in
polysideInnerRadius
▸ 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
▸ 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
▸ 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
▸ 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
▸ setOC(oc
): void
Parameters
Name | Type |
---|---|
oc | OpenCascadeInstance |
Returns
void
Defined in
shapeType
▸ shapeType(shape
): TopAbs_ShapeEnum
Parameters
Name | Type |
---|---|
shape | TopoDS_Shape |
Returns
TopAbs_ShapeEnum
Defined in
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 |
Returns
Defined in
supportExtrude
▸ supportExtrude(wire
, center
, normal
, support
): Shape3D
Parameters
Name | Type |
---|---|
wire | Wire |
center | Point |
normal | Point |
support | TopoDS_Shape |
Returns
Defined in
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
Name | Type |
---|---|
text | string |
«destructured» | Object |
› fontFamily | undefined | string |
› fontSize | undefined | number |
› startX | undefined | number |
› startY | undefined | number |
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
▸ 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
▸ 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
▸ 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
▸ 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
Name | Type |
---|---|
func | (t : number ) => Point2D |
planeConfig | PlaneConfig |
«destructured» | Object |
› pointsCount | undefined | number |
› start | undefined | number |
› stop | undefined | number |
approximationConfig | BSplineApproximationConfig |
Returns
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
Name | Type | Default value |
---|---|---|
radius | number | undefined |
sidesCount | number | undefined |
sagitta | number | 0 |
planeConfig | PlaneConfig | {} |
Returns
Defined in
sketches/cannedSketches.ts:129
sketchRectangle
▸ 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
▸ 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 | {} |