// Gasket
// Gasket for the pipe flange assembly. A gasket is a mechanical seal that fills the space between two or more mating surfaces, preventing leaks of liquids or gases under compression

// Set units
@settings(defaultLengthUnit = in, kclVersion = 1.0)

// Import parameters
import gasketOutsideDiameter, gasketInnerDiameter, gasketThickness from "parameters.kcl"

// Create the base of the gasket
gasketBase = startSketchOn(XY)
  |> circle(%, center = [0, 0], radius = gasketOutsideDiameter / 2)
  |> extrude(%, length = gasketThickness)

// Extrude a circular hole through the gasket base
startSketchOn(gasketBase, face = END)
  |> circle(%, center = [0, 0], radius = gasketInnerDiameter / 2)
  |> extrude(%, length = -gasketThickness)
  |> appearance(%, color = "#d0cb3e")
