-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.kcl
33 lines (26 loc) · 850 Bytes
/
main.kcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// 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 constants
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({
center = [bendRadius, 0],
radius = outerDiameter / 2
}, sketch000)
// create a profile for the inner diameter
innerProfile = circle({
center = [bendRadius, 0],
radius = innerDiameter / 2
}, sketch000)
// create the profile of the pipe
pipeProfile = outerProfile
|> hole(innerProfile, %)
// revolve the pipe profile at the desired angle
pipe = revolve({ axis = "Y", angle = bendAngle }, pipeProfile)