Files
modeling-app/rust/kcl-lib/tests/flush_batch_on_end/input.kcl
Adam Chalmers 6e115c19d5 KCL: Migrate hole to kwargs (#6382)
Previously:

`|> hole(circle(radius = 2, center = p), %)`

Now:

`|> subtract2d(tool = circle(radius = 2, center = p))`
2025-04-26 15:31:51 -05:00

35 lines
744 B
Plaintext

@settings(defaultLengthUnit = in)
// Set units in inches (in)
// Define constants
innerDiameter = 0.364
outerDiameter = 35 / 64
length = 1 + 1 / 2
// create a sketch on the 'XY' plane
sketch000 = startSketchOn('XY')
// create a profile of the outside of the pipe
outerProfile = circle(
sketch000,
center = [0.0, 0.0],
radius = outerDiameter / 2,
tag = $arc000,
)
// create a profile of the inside of the pipe
innerProfile = circle(
sketch000,
center = [0.0, 0.0],
radius = innerDiameter / 2,
tag = $arc001,
)
// create a profile with holes sketch000Profile000Holes
pipeProfile = outerProfile
|> subtract2d(tool = innerProfile)
// extrude the pipe profile to create the pipe
pipe = extrude(pipeProfile, length = length)