Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions content/pages/docs/kcl-std/functions/std-sketch-extrude.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ can change this behavior by using the `method` parameter. See
| `length` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | How far to extrude the given sketches. Incompatible with `to`. | No |
| `to` | [`Point3d`](/docs/kcl-std/types/std-types-Point3d) or [`Axis3d`](/docs/kcl-std/types/std-types-Axis3d) or [`Plane`](/docs/kcl-std/types/std-types-Plane) or [`Edge`](/docs/kcl-std/types/std-types-Edge) or [`Face`](/docs/kcl-std/types/std-types-Face) or [`Sketch`](/docs/kcl-std/types/std-types-Sketch) or [`Solid`](/docs/kcl-std/types/std-types-Solid) or [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) or [`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace) or [`any`](/docs/kcl-std/types/std-types-any) | Reference to extrude to. Incompatible with `length` and `twistAngle`. Experimental face API: edge specifier objects (`{ sideFaces = [faceTag1, faceTag2], endFaces? = [...], index? }`) are not ready for generated or user-facing KCL yet; prefer existing point, axis, plane, edge, face, sketch, solid, or tag forms until point-and-click and migration support ships. | No |
| `symmetric` | [`bool`](/docs/kcl-std/types/std-types-bool) | If true, the extrusion will happen symmetrically around the sketch. Otherwise, the extrusion will happen on only one side of the sketch. | No |
| `direction` | [`Point3d`](/docs/kcl-std/types/std-types-Point3d) or [`Edge`](/docs/kcl-std/types/std-types-Edge) or [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) or [`Segment`](/docs/kcl-std/types/std-types-Segment) | **Experimental.** If specified, will extrude in this direction instead of the sketch plane normal. If an edge is being extruded, this defaults to halfway between the faces on either side of the edge. | No |
| `direction` | [`Point3d`](/docs/kcl-std/types/std-types-Point3d) or [`Edge`](/docs/kcl-std/types/std-types-Edge) or [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) or [`Segment`](/docs/kcl-std/types/std-types-Segment) | If specified, will extrude in this direction instead of the sketch plane normal. If an edge is being extruded, this defaults to halfway between the faces on either side of the edge. | No |
| `bidirectionalLength` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | If specified, will also extrude in the opposite direction to 'distance' to the specified distance. If 'symmetric' is true, this value is ignored. | No |
| `tagStart` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | A named tag for the face at the start of the extrusion, i.e. the original sketch. | No |
| `tagEnd` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | A named tag for the face at the end of the extrusion, i.e. the new face created by extruding the original sketch. | No |
Expand Down Expand Up @@ -646,7 +646,7 @@ extrude(
</model-viewer>

```kcl
@settings(kclVersion = 2.0, experimentalFeatures = allow)
@settings(kclVersion = 2.0)

// The direction parameter can apply to sketches, segments, or edges
// Directions can be specified by an axis, a sketch segment, or a body's edge.
Expand Down Expand Up @@ -766,5 +766,3 @@ extrude002 = extrude(
touch-action="pan-y"
>
</model-viewer>


Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ When creating a non-symmetric bidirectional extrusion, this sets how far to extr
In this example, the extrude uses two different lengths: 5mm in one direction and 2mm in the other. This allows you to create features that extend unequally from the sketch, giving you more control and flexibility for asymmetric or custom shapes.
</div>

## Direction

By default, a sketch profile extrudes perpendicular to its sketch plane. Set `direction` when the
extrusion should follow a different vector. In the command palette, select a sketch segment or an
existing body edge to define that direction. In KCL, you can also pass a three-component vector, a
tagged edge, or an edge returned by an edge query.

The direction reference sets the extrusion's orientation; `length` still sets its distance. The
same parameter is available when [extruding a surface or body
edge](/docs/zoo-design-studio/features/3d-design/parametric-modeling/surface-modeling/create-surfaces/extrude).

## Start Tag and End Tag
Apply tags to the start face (your original sketch plane) or end face (the extruded cap) to reference them in later operations. This is mainly used for referencing faces from other objects or features, especially in code or scripts. In the usual point-and-click UI flow, you don't need to set these tags. This is mostly for advanced users who want precise control or automation.

Expand Down Expand Up @@ -197,6 +208,9 @@ be used with `length` or `twistAngle`.

`symmetric`: Splits the extrusion equally to both sides of the sketch plane.

`direction`: Overrides the sketch plane normal. Accepts a 3D vector, sketch segment, body edge,
tagged edge, or queried edge.

`bidirectionalLength`: Adds a second extrusion distance in the opposite direction. Ignored when
`symmetric` is enabled.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
title: Extrude Surface
excerpt: Create surface extrusions with the Extrude Surface tool in Zoo Design Studio.
excerpt: Create surface extrusions from sketch profiles and body edges in Zoo Design Studio.
sidebarPosition: 0
---

Use the same Extrude tool used in
[Extrude Solid](/docs/zoo-design-studio/features/3d-design/parametric-modeling/solid-modeling/create-solids/extrude),
then set `bodyType` to `surface` to create an open surface instead of a closed solid. This is useful
for reference geometry, patch workflows, and downstream surface edits that should remain open rather
than forming a volumetric body.
then set `bodyType` to `surface` to create an open surface instead of a closed solid. You can extrude
a sketch segment, sketch region, or an edge from an existing body. This is useful for reference
geometry, patch workflows, and downstream surface edits that should remain open rather than forming
a volumetric body.

<FramedImage
src="/documentation-assets/docs/zoo-design-studio/features/3d-design/parametric-modeling/surface-modeling/create-surfaces/extrude/extrude-surface.gif"
Expand All @@ -31,10 +32,28 @@ the only difference is that here you are intentionally choosing the surface outp
maxHeightPx={640}
/>

## Selection
## Profiles

Choose a sketch segment when the surface should use a single edge as its profile. If the sketch
forms a closed region, choose the region to use the full enclosed profile instead.
Select one or more sketch segments, body edges, or sketch regions to extrude. A segment or body
edge creates a sheet surface that extends from that curve. A region uses the complete enclosed
profile and creates an open surface body instead of a solid.

To extrude an existing body's edge, start Extrude and select the edge in the viewport. Set
`bodyType` to `surface`; edge extrusions cannot create a solid directly. Use `method = new` to keep
the new surface separate. `method = merge` is not currently supported for edge extrusion.

You can extrude multiple body edges together, but you cannot mix body edges with sketch or face
profiles in the same `extrude` call. Use separate extrusions instead.

<FramedImage
src="/documentation-assets/docs/zoo-design-studio/features/3d-design/parametric-modeling/surface-modeling/create-surfaces/extrude/select-body-edge.webp"
alt="An edge selected on an existing body for surface extrusion"
aspect="1 / 1"
maxHeightPx={420}
/>
<div style={{textAlign: 'center', marginBottom: '1.5em', fontStyle: 'italic'}}>
Selected body edge
</div>

<FramedImage
src="/documentation-assets/docs/zoo-design-studio/features/3d-design/parametric-modeling/surface-modeling/create-surfaces/extrude/select-segment.webp"
Expand All @@ -55,12 +74,52 @@ forms a closed region, choose the region to use the full enclosed profile instea
Selected sketch region
</div>

## Direction

By default, a sketch profile extrudes along its sketch plane normal. When extruding a body edge,
Zoo Design Studio infers a direction halfway between the normals of the two faces beside the edge.

Use `direction` to override that default. In the command palette, select a sketch segment or an
existing body edge to supply the direction. In KCL, `direction` also accepts a three-component
vector, a tagged edge, or an edge returned by an edge query. The selected curve supplies only its
direction; `length` still controls how far the profile is extruded.

<FramedImage
src="/documentation-assets/docs/zoo-design-studio/features/3d-design/parametric-modeling/surface-modeling/create-surfaces/extrude/edge-extrude.webp"
alt="A body edge extruded with its inferred direction"
aspect="1 / 1"
maxHeightPx={360}
/>
<div style={{textAlign: 'center', marginBottom: '1.5em', fontStyle: 'italic'}}>
Body edge extruded in the inferred direction
</div>

<FramedImage
src="/documentation-assets/docs/zoo-design-studio/features/3d-design/parametric-modeling/surface-modeling/create-surfaces/extrude/edge-extrude-direction.webp"
alt="A body edge extruded with a custom direction"
aspect="1 / 1"
maxHeightPx={360}
/>
<div style={{textAlign: 'center', marginBottom: '1.5em', fontStyle: 'italic'}}>
The same edge extruded with <code>direction = [1, 0, 1]</code>
</div>

For example, all of these forms are valid:

```kcl
extrude(profile, length = 5, direction = [1, 0, 1])
extrude(profile, length = 5, direction = directionSketch.line1)
extrude(profile, length = 5, direction = getOppositeEdge(edgeTag))
```

## Other Parameters

All other Extrude parameters, such as `Length`, `Extrude To Face`, `Symmetric`,
`Bidirectional Length`, `Twist Angle`, and `Start Tag / End Tag`, work the same way as they do in
`Length`, `Extrude To Face`, `Symmetric`, and `Bidirectional Length` work as described in
[Extrude Solid](/docs/zoo-design-studio/features/3d-design/parametric-modeling/solid-modeling/create-solids/extrude).
For the full parameter reference, visit the solid modeling section.
Because an extruded edge or sketch segment creates no start or end cap, `Start Tag` and `End Tag`
are not available for those profiles. `direction` and `twistAngle` cannot be used together. See the
[`extrude` KCL reference](/docs/kcl-std/functions/std-sketch-extrude) for every parameter and
combination.

## Surface Extrude In The Aquarium

Expand All @@ -79,8 +138,8 @@ gallery.

## Are you interested in code?

Zoo Design Studio writes KCL behind the scenes. A surface extrusion is just an `extrude` call with
`bodyType = SURFACE`, applied to a sketch segment or profile.
Zoo Design Studio writes KCL behind the scenes. A surface extrusion is an `extrude` call with
`bodyType = SURFACE`, applied to a sketch segment, body edge, or profile.

```kcl
mySketch = sketch(on = XY) {
Expand All @@ -94,5 +153,33 @@ mySketch = sketch(on = XY) {
surfaceExtrude = extrude(mySketch.arc1, length = 5, bodyType = SURFACE)
```

To extrude an edge from an existing body, reference the edge directly or use an edge-query
function. This example extrudes the edge opposite a tagged sketch segment and uses another sketch
segment for its direction:

```kcl
@settings(kclVersion = 2.0)

baseSketch = sketch(on = XY) {
line1 = line(start = [var 0mm, var 0mm], end = [var 10mm, var 0mm])
line2 = line(start = [var 10mm, var 0mm], end = [var 10mm, var 5mm])
line3 = line(start = [var 10mm, var 5mm], end = [var 0mm, var 5mm])
line4 = line(start = [var 0mm, var 5mm], end = [var 0mm, var 0mm])
}
base = extrude(region(point = [5mm, 2mm], sketch = baseSketch), length = 5)

directionSketch = sketch(on = YZ) {
line1 = line(start = [var 0mm, var 0mm], end = [var 1mm, var 1mm])
}

edgeSurface = extrude(
getOppositeEdge(base.sketch.tags.line1),
length = 8,
direction = directionSketch.line1,
bodyType = SURFACE,
method = NEW,
)
```

Want to find out more about the `extrude` function? [Check it out](/docs/kcl-std/functions/std-sketch-extrude)
in our KCL docs.
Loading