kcl-samples → pipe

pipe

pipe

KCL

// Pipe
// Piping for the pipe flange assembly

// Set units
@settings(defaultLengthUnit = in)

// Define parameters
pipeInnerDiameter = 2.0
pipeOuterDiameter = 2.375
pipeLength = 6

// 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")