Files
modeling-app/docs/kcl-std/functions/std-sketch-getCommonEdge.md
Nick Cameron 2ac05508bc Move edge functions to KCL (#7259)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-05-29 10:14:04 +12:00

188 KiB

title, subtitle, excerpt, layout
title subtitle excerpt layout
getCommonEdge Function in std::sketch Get the shared edge between two faces. manual

Get the shared edge between two faces.

getCommonEdge(faces: [tag; 2]): Edge

Arguments

Name Type Description Required
faces [tag; 2] The tags of the faces you want to find the common edge between. Yes

Returns

Edge - An edge of a solid.

Examples

// Get an edge shared between two faces, created after a chamfer.

scale = 20
part001 = startSketchOn(XY)
    |> startProfile(at = [0, 0])
    |> line(end = [0, scale])
    |> line(end = [scale, 0])
    |> line(end = [0, -scale])
    |> close(tag = $line0)
    |> extrude(length = 20, tagEnd = $end0)
    // We tag the chamfer to reference it later.
    |> chamfer(length = 10, tags = [getOppositeEdge(line0)], tag = $chamfer0)

// Get the shared edge between the chamfer and the extrusion.
commonEdge = getCommonEdge(faces = [chamfer0, end0])

// Chamfer the shared edge.
// TODO: uncomment this when ssi for fillets lands
// chamfer(part001, length = 5, tags = [commonEdge])

Rendered example of getCommonEdge 0