Files
modeling-app/public/kcl-samples/pipe-flange-assembly/1120t74-pipe.kcl
Jonathan Tran 160f55ede5 BREAKING: More units of measure work and keyword args (#6291)
* More units of measure work

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Update CSG output since engine change

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
2025-04-14 09:58:19 +00:00

24 lines
676 B
Plaintext

// Pipe
// Piping for the pipe flange assembly
// Set units
@settings(defaultLengthUnit = in)
// Import parameters
import pipeInnerDiameter, pipeOuterDiameter, pipeLength from "parameters.kcl"
// Create a function to make the pipe. Export
export fn pipe() {
// Create the pipe base
pipeBase = startSketchOn(XZ)
|> circle(%, center = [0, 0], radius = pipeOuterDiameter / 2)
|> extrude(%, length = pipeLength)
// Extrude a hole through the length of the pipe
pipe = startSketchOn(pipeBase, face = END)
|> circle(center = [0, 0], radius = pipeInnerDiameter / 2)
|> extrude(%, length = -pipeLength)
|> appearance(color = "#a24ed0")
return pipe
}