kcl →
shell
Remove volume from a 3-dimensional shape such that a wall of the
provided thickness remains, taking volume starting at the provided face, leaving it open in that direction.
shell(data: ShellData, extrude_group_set: ExtrudeGroupSet) -> ExtrudeGroupSet
Examples
// Remove the end face for the extrusion.
const firstSketch = startSketchOn('XY')
|> startProfileAt([-12, 12], %)
|> line([24, 0], %)
|> line([0, -24], %)
|> line([-24, 0], %)
|> close(%)
|> extrude(6, %)
// Remove the end face for the extrusion.
shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
// Remove the start face for the extrusion.
const firstSketch = startSketchOn('-XZ')
|> startProfileAt([-12, 12], %)
|> line([24, 0], %)
|> line([0, -24], %)
|> line([-24, 0], %)
|> close(%)
|> extrude(6, %)
// Remove the start face for the extrusion.
shell({ faces: ['start'], thickness: 0.25 }, firstSketch)
// Remove a tagged face and the end face for the extrusion.
const firstSketch = startSketchOn('XY')
|> startProfileAt([-12, 12], %)
|> line([24, 0], %)
|> line([0, -24], %)
|> line([-24, 0], %, $myTag)
|> close(%)
|> extrude(6, %)
// Remove a tagged face for the extrusion.
shell({ faces: [myTag], thickness: 0.25 }, firstSketch)
// Remove multiple faces at once.
const firstSketch = startSketchOn('XY')
|> startProfileAt([-12, 12], %)
|> line([24, 0], %)
|> line([0, -24], %)
|> line([-24, 0], %, $myTag)
|> close(%)
|> extrude(6, %)
// Remove a tagged face and the end face for the extrusion.
shell({
faces: [myTag, 'end'],
thickness: 0.25
}, firstSketch)
// Shell a sketch on face.
let size = 100
const case = startSketchOn('-XZ')
|> startProfileAt([-size, -size], %)
|> line([2 * size, 0], %)
|> line([0, 2 * size], %)
|> tangentialArcTo([-size, size], %)
|> close(%)
|> extrude(65, %)
const thing1 = startSketchOn(case, 'end')
|> circle([-size / 2, -size / 2], 25, %)
|> extrude(50, %)
const thing2 = startSketchOn(case, 'end')
|> circle([size / 2, -size / 2], 25, %)
|> extrude(50, %)
// We put "case" in the shell function to shell the entire object.
shell({ faces: ['start'], thickness: 5 }, case)
// Shell a sketch on face object on the end face.
let size = 100
const case = startSketchOn('XY')
|> startProfileAt([-size, -size], %)
|> line([2 * size, 0], %)
|> line([0, 2 * size], %)
|> tangentialArcTo([-size, size], %)
|> close(%)
|> extrude(65, %)
const thing1 = startSketchOn(case, 'end')
|> circle([-size / 2, -size / 2], 25, %)
|> extrude(50, %)
const thing2 = startSketchOn(case, 'end')
|> circle([size / 2, -size / 2], 25, %)
|> extrude(50, %)
// We put "thing1" in the shell function to shell the end face of the object.
shell({ faces: ['end'], thickness: 5 }, thing1)
// Shell sketched on face objects on the end face, include all sketches to shell
// the entire object.
let size = 100
const case = startSketchOn('XY')
|> startProfileAt([-size, -size], %)
|> line([2 * size, 0], %)
|> line([0, 2 * size], %)
|> tangentialArcTo([-size, size], %)
|> close(%)
|> extrude(65, %)
const thing1 = startSketchOn(case, 'end')
|> circle([-size / 2, -size / 2], 25, %)
|> extrude(50, %)
const thing2 = startSketchOn(case, 'end')
|> circle([size / 2, -size / 2], 25, %)
|> extrude(50, %)
// We put "thing1" and "thing2" in the shell function to shell the end face of the object.
shell({ faces: ['end'], thickness: 5 }, [thing1, thing2])
Arguments
data
:ShellData
- Data for shells. (REQUIRED)
{
// The faces you want removed.
faces: ["start" | "end" |
{
// Engine information for a tag.
info: {
// The id of the tagged object.
id: uuid,
// The path the tag is on.
path: {
// The from point.
from: [number, number],
// The tag of the path.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
// The to point.
to: [number, number],
},
// The sketch group the tag is on.
sketchGroup: uuid,
// The surface information for the tag.
surface: {
// The face id for the extrude plane.
faceId: uuid,
// The id of the geometry.
id: uuid,
// The source range.
sourceRange: [number, number],
// The tag.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "extrudePlane",
} |
{
// The face id for the extrude plane.
faceId: uuid,
// The id of the geometry.
id: uuid,
// The source range.
sourceRange: [number, number],
// The tag.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "extrudeArc",
} |
{
// The id for the chamfer surface.
faceId: uuid,
// The id of the geometry.
id: uuid,
// The source range.
sourceRange: [number, number],
// The tag.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "chamfer",
} |
{
// The id for the fillet surface.
faceId: uuid,
// The id of the geometry.
id: uuid,
// The source range.
sourceRange: [number, number],
// The tag.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "fillet",
},
},
value: string,
}],
// The thickness of the shell.
thickness: number,
}
extrude_group_set
:ExtrudeGroupSet
- A extrude group or a group of extrude groups. (REQUIRED)
{
// Chamfers or fillets on this extrude group.
edgeCuts: [{
// The engine id of the edge to fillet.
edgeId: uuid,
// The id of the engine command that called this fillet.
id: uuid,
radius: number,
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "fillet",
} |
{
// The engine id of the edge to chamfer.
edgeId: uuid,
// The id of the engine command that called this chamfer.
id: uuid,
length: number,
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "chamfer",
}],
// The id of the extrusion end cap
endCapId: uuid,
// The height of the extrude group.
height: number,
// The id of the extrude group.
id: uuid,
// The sketch group.
sketchGroup: {
// The id of the sketch group (this will change when the engine's reference to it changes.
id: uuid,
// What the sketch is on (can be a plane or a face).
on: {
// The id of the plane.
id: uuid,
// Origin of the plane.
origin: {
x: number,
y: number,
z: number,
},
type: "plane",
// Type for a plane.
value: "XY" | "XZ" | "YZ" | "Custom",
// What should the plane’s X axis be?
xAxis: {
x: number,
y: number,
z: number,
},
// What should the plane’s Y axis be?
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis (normal).
zAxis: {
x: number,
y: number,
z: number,
},
} |
{
// The extrude group the face is on.
extrudeGroup: {
// Chamfers or fillets on this extrude group.
edgeCuts: [{
// The engine id of the edge to fillet.
edgeId: uuid,
// The id of the engine command that called this fillet.
id: uuid,
radius: number,
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "fillet",
} |
{
// The engine id of the edge to chamfer.
edgeId: uuid,
// The id of the engine command that called this chamfer.
id: uuid,
length: number,
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "chamfer",
}],
// The id of the extrusion end cap
endCapId: uuid,
// The height of the extrude group.
height: number,
// The id of the extrude group.
id: uuid,
// The sketch group.
sketchGroup: SketchGroup,
// The id of the extrusion start cap
startCapId: uuid,
// The extrude surfaces.
value: [{
// The face id for the extrude plane.
faceId: uuid,
// The id of the geometry.
id: uuid,
// The source range.
sourceRange: [number, number],
// The tag.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "extrudePlane",
} |
{
// The face id for the extrude plane.
faceId: uuid,
// The id of the geometry.
id: uuid,
// The source range.
sourceRange: [number, number],
// The tag.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "extrudeArc",
} |
{
// The id for the chamfer surface.
faceId: uuid,
// The id of the geometry.
id: uuid,
// The source range.
sourceRange: [number, number],
// The tag.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "chamfer",
} |
{
// The id for the fillet surface.
faceId: uuid,
// The id of the geometry.
id: uuid,
// The source range.
sourceRange: [number, number],
// The tag.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
type: "fillet",
}],
},
// The id of the face.
id: uuid,
type: "face",
// The tag of the face.
value: string,
// What should the face’s X axis be?
xAxis: {
x: number,
y: number,
z: number,
},
// What should the face’s Y axis be?
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis (normal).
zAxis: {
x: number,
y: number,
z: number,
},
},
// The starting path.
start: {
// The from point.
from: [number, number],
// The tag of the path.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
// The to point.
to: [number, number],
},
// Tag identifiers that have been declared in this sketch group.
tags: {
},
// The paths in the sketch group.
value: [{
// The from point.
from: [number, number],
// The tag of the path.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
// The to point.
to: [number, number],
type: "ToPoint",
} |
{
// arc's direction
ccw: bool,
// the arc's center
center: [number, number],
// The from point.
from: [number, number],
// The tag of the path.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
// The to point.
to: [number, number],
type: "TangentialArcTo",
} |
{
// arc's direction
ccw: bool,
// the arc's center
center: [number, number],
// The from point.
from: [number, number],
// The tag of the path.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
// The to point.
to: [number, number],
type: "TangentialArc",
} |
{
// The from point.
from: [number, number],
// The tag of the path.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
// The to point.
to: [number, number],
type: "Horizontal",
// The x coordinate.
x: number,
} |
{
// The from point.
from: [number, number],
// The tag of the path.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
// The to point.
to: [number, number],
type: "AngledLineTo",
// The x coordinate.
x: number,
// The y coordinate.
y: number,
} |
{
// The from point.
from: [number, number],
// The tag of the path.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number],
end: number,
start: number,
value: string,
},
// The to point.
to: [number, number],
type: "Base",
}],
},
// The id of the extrusion start cap
startCapId: uuid,
type: "extrudeGroup",
// The extrude surfaces.
value: [{
// The face id for the extrude plane.
faceId: uuid,
// The id of the geometry.
id: uuid,
// The source range.
sourceRange: [number, number],
// The tag.
tag: {
digest: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number,