Files
modeling-app/public/kcl-samples/pipe-with-bend/main.kcl
Josh Gomez 656eb0abec Update all KCL-Samples to be more ME friendly (#6132)
* update all kcl-samples

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* Update kcl-samples simulation test output

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-04 11:03:13 -07:00

28 lines
827 B
Plaintext

// Pipe with bend
// A tubular section or hollow cylinder, usually but not necessarily of circular cross-section, used mainly to convey substances that can flow.
// Set units
@settings(defaultLengthUnit = in)
// Define parameters
innerDiameter = 10
outerDiameter = 20
bendRadius = 30
bendAngle = 90
// Create a sketch in the 'XZ' plane
sketch000 = startSketchOn(XZ)
// Create a profile for the outer diameter
outerProfile = circle(sketch000, center = [bendRadius, 0], radius = outerDiameter / 2)
// Create a profile for the inner diameter
innerProfile = circle(sketch000, center = [bendRadius, 0], radius = innerDiameter / 2)
// Create the profile of the pipe
pipeProfile = outerProfile
|> hole(innerProfile, %)
// Revolve the pipe profile at the desired angle
pipe = revolve(pipeProfile, axis = Y, angle = bendAngle)