kcl-samples → cylinder
cylinder

KCL
// Cylinder
// A cylinder is a primitive shape defined by its diameter and length
@settings(defaultLengthUnit = mm)
// Define parameters
length = 10
diameter = 10
// create a sketch for the cylinder profile on the XY plane
sketch = startSketchOn(XY)
// create the profile centered at the origin
profile = startProfile(sketch, at = [0, 0])
|> circle(center = profileStart(), radius = diameter / 2)
// extrude the profile to create the box
cylinder = extrude(profile, length = length)