mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-04 19:15:57 +00:00
kernel-cases: sweeps closed, twisted and joined sweeps from #561-#3897, ribs, tripod pipes
End faces of a loft, a sweep and a coil extruded, closed twisted sweeps round a torus, a twisted square cut through a tube, a ring swept along a short arc and joined to a collar, two overlapping swept arc walls, a rib grown along the sketch normal, and three pipes meeting at a point. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#2005",
|
||||
"tangency-labs/solidcraft#2010"
|
||||
],
|
||||
"what": "an 8 x 8 square swept a full turn round a circle of radius 30 with a 180 degree twist, cut from a torus (R 30, r 8) that holds it (no result, or minutes)",
|
||||
"source": "analytic",
|
||||
"method": "the square (half diagonal 5.66 < 8) turns about its centre, which follows the circle, so it sweeps A * 2 pi R = 64 * 2 pi 30 whatever the twist; it lies wholly inside the torus (V = 2 pi^2 R r^2 = 37895.0), leaving a sealed tunnel (a body with an internal void, shell count 2 which the rig cannot grade, so valid is false): V = 37895.0 - 12063.7 = 25831.3.",
|
||||
"valid": false,
|
||||
"body_count": 1,
|
||||
"volume_mm3": 25835.56511039833
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
"name": "Path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.circle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"radius": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
"name": "Tube"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.circle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
30,
|
||||
0
|
||||
],
|
||||
"radius": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.revolve",
|
||||
"params": {
|
||||
"axis": "Z",
|
||||
"angle": "360 deg",
|
||||
"operation": "new",
|
||||
"body_name": "Torus"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
"name": "SweepProfile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.line",
|
||||
"params": {
|
||||
"points": [
|
||||
[
|
||||
26,
|
||||
-4
|
||||
],
|
||||
[
|
||||
34,
|
||||
-4
|
||||
],
|
||||
[
|
||||
34,
|
||||
4
|
||||
],
|
||||
[
|
||||
26,
|
||||
4
|
||||
]
|
||||
],
|
||||
"infer": false,
|
||||
"closed": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.sweep",
|
||||
"params": {
|
||||
"sketch": "SweepProfile",
|
||||
"path_sketch": "Path",
|
||||
"path": [
|
||||
"c1"
|
||||
],
|
||||
"operation": "cut",
|
||||
"twist": "180 deg"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#2005",
|
||||
"tangency-labs/solidcraft#2010"
|
||||
],
|
||||
"what": "an 8 x 8 square swept a full turn round a circle of radius 30 with a 90 degree twist, as a new body (the sweep that closes on itself)",
|
||||
"source": "analytic",
|
||||
"method": "twisting about the section centre leaves the section area unchanged and its centre follows the circle, so V = A * 2 pi R = 64 * 2 pi 30 = 12063.7; the 90 degree twist maps the square onto itself, so the end sections meet and the body is one closed ring.",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 12063.715789784805
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
"name": "Path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.circle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"radius": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
"name": "SweepProfile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.line",
|
||||
"params": {
|
||||
"points": [
|
||||
[
|
||||
26,
|
||||
-4
|
||||
],
|
||||
[
|
||||
34,
|
||||
-4
|
||||
],
|
||||
[
|
||||
34,
|
||||
4
|
||||
],
|
||||
[
|
||||
26,
|
||||
4
|
||||
]
|
||||
],
|
||||
"infer": false,
|
||||
"closed": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.sweep",
|
||||
"params": {
|
||||
"sketch": "SweepProfile",
|
||||
"path_sketch": "Path",
|
||||
"path": [
|
||||
"c1"
|
||||
],
|
||||
"operation": "new",
|
||||
"twist": "90 deg"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#2056",
|
||||
"tangency-labs/solidcraft#2057"
|
||||
],
|
||||
"what": "a rib drawn on a plane 20 mm in front of a block (parallel to XZ, a 40 mm line along X) with direction normal, growing toward the block",
|
||||
"source": "analytic",
|
||||
"method": "the wall runs along the sketch normal (+Y) from y = -20 to the block face y = 0 and into it, 40 long and 2 thick (across the curve, in the sketch plane): it adds 40 * 2 * 20 = 1600 to the block 60 x 40 x 10: V = 24000 + 1600 = 25600, one body.",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 25600.0
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"length": 60,
|
||||
"width": 40,
|
||||
"height": 10,
|
||||
"corner": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"body_name": "Block"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
-20.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
"name": "RibS"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.line",
|
||||
"params": {
|
||||
"points": [
|
||||
[
|
||||
10,
|
||||
5
|
||||
],
|
||||
[
|
||||
50,
|
||||
5
|
||||
]
|
||||
],
|
||||
"infer": false,
|
||||
"ids": [
|
||||
"r1"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.rib",
|
||||
"params": {
|
||||
"sketch": "RibS",
|
||||
"curves": [
|
||||
"r1"
|
||||
],
|
||||
"thickness": 2,
|
||||
"direction": "normal"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#2862"
|
||||
],
|
||||
"what": "three pipes of diameter 4.4 and length 20 along +X, +Y and +Z, all ending at the origin, joined (a non-planar tripod junction: kernel panics, then no result)",
|
||||
"source": "analytic",
|
||||
"method": "inclusion-exclusion with r = 2.2: each pipe pi r^2 L; two pipes overlap in a quarter of a bicylinder (16 r^3 / 3 / 4 = 4 r^3 / 3); all three overlap in an octant of a tricylinder (8 (2 - sqrt 2) r^3 / 8). V = 3 pi r^2 L - 3 (4/3) r^3 + (2 - sqrt 2) r^3 = 3 pi r^2 L - (2 + sqrt 2) r^3.",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 875.9639605903272
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": "XY",
|
||||
"name": "P"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.options",
|
||||
"params": {
|
||||
"sketch_3d": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.line3d",
|
||||
"params": {
|
||||
"points": [
|
||||
[
|
||||
20,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.line3d",
|
||||
"params": {
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
20,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.line3d",
|
||||
"params": {
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0,
|
||||
20
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.pipe",
|
||||
"params": {
|
||||
"path_sketch": "P",
|
||||
"path": [
|
||||
"w1"
|
||||
],
|
||||
"diameter": 4.4,
|
||||
"body_name": "A"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.pipe",
|
||||
"params": {
|
||||
"path_sketch": "P",
|
||||
"path": [
|
||||
"w2"
|
||||
],
|
||||
"diameter": 4.4,
|
||||
"operation": "join",
|
||||
"targets": [
|
||||
"A"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.pipe",
|
||||
"params": {
|
||||
"path_sketch": "P",
|
||||
"path": [
|
||||
"w3"
|
||||
],
|
||||
"diameter": 4.4,
|
||||
"operation": "join",
|
||||
"targets": [
|
||||
"A"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#2891",
|
||||
"tangency-labs/solidcraft#3695"
|
||||
],
|
||||
"what": "a 20 x 20 square swept 250 mm along the axis of a tube (ID 20, OD 30, 250 long) with a 30 degree twist, cut from it (the twisted cut froze the app)",
|
||||
"source": "analytic",
|
||||
"method": "the square (inscribed circle r 10 = the bore, half diagonal 14.14 < 15) turns about the tube axis, so at every height the cut section is the same: the part of the annulus inside the square = square - bore disc. What is left is the OD disc minus the square: area pi 225 - 400 = 306.86, a connected ring, V = 250 (225 pi - 400) = 76714.6.",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 76714.58676442585
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
"name": "Tube"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.circle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"radius": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.circle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"radius": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.extrude",
|
||||
"params": {
|
||||
"distance": 250,
|
||||
"profiles": [
|
||||
{
|
||||
"point": [
|
||||
12.5,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"body_name": "Tube"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
"name": "Sq"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.rectangle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"corner": [
|
||||
10,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
"name": "Axis"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.line",
|
||||
"params": {
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
250
|
||||
]
|
||||
],
|
||||
"infer": false,
|
||||
"ids": [
|
||||
"p1"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.sweep",
|
||||
"params": {
|
||||
"sketch": "Sq",
|
||||
"path_sketch": "Axis",
|
||||
"path": [
|
||||
"p1"
|
||||
],
|
||||
"operation": "cut",
|
||||
"twist": "30 deg"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#3897"
|
||||
],
|
||||
"what": "a ring profile (radii 79.815 and 78.285) swept along a 22.5 degree arc of radius 94.815 whose start is at the ring centre, joined to a ring-shaped collar under the profile (froze at \"Computing\")",
|
||||
"source": "analytic",
|
||||
"method": "the ring section is square to the path and centred on it, and its radius is below the bend radius, so the sweep is a tube segment: V = A_ring R theta, A_ring = pi (79.815^2 - 78.285^2). The collar is the same ring extruded 10 mm down, touching the sweep start face: V = A_ring (10 + 94.815 * 22.5 deg).",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 35894.3194465593
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
"name": "Ring"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.circle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"radius": 79.815
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.circle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"radius": 78.285
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.extrude",
|
||||
"params": {
|
||||
"distance": 10,
|
||||
"direction": "negative",
|
||||
"profiles": [
|
||||
{
|
||||
"point": [
|
||||
79,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"body_name": "Collar"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
"name": "Path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.arc.three_point",
|
||||
"params": {
|
||||
"start": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"through": [
|
||||
1.8218436385677137,
|
||||
18.497488881959192
|
||||
],
|
||||
"end": [
|
||||
7.217362124942355,
|
||||
36.284129639696
|
||||
],
|
||||
"id": "a1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.sweep",
|
||||
"params": {
|
||||
"sketch": "Ring",
|
||||
"path_sketch": "Path",
|
||||
"path": [
|
||||
"a1"
|
||||
],
|
||||
"profiles": [
|
||||
{
|
||||
"point": [
|
||||
79,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"operation": "join",
|
||||
"targets": [
|
||||
"Collar"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#561",
|
||||
"tangency-labs/solidcraft#677"
|
||||
],
|
||||
"what": "the small end face of a square-to-square loft (40 mm side to 20 mm over 40 mm) extruded 10 mm (loft faces had no attachable source)",
|
||||
"source": "analytic",
|
||||
"method": "ruled loft of two squares = pyramid frustum: V = 40/3 (1600 + 400 + 800) = 37333.3; the top face is a 20 x 20 square at z = 40, extruding it 10 mm adds 4000: V = 41333.3.",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 41333.333333333336
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
"name": "A"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.rectangle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"corner": [
|
||||
20,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
40.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
"name": "B"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.rectangle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"corner": [
|
||||
10,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.loft",
|
||||
"params": {
|
||||
"sections": [
|
||||
{
|
||||
"sketch": "A"
|
||||
},
|
||||
{
|
||||
"sketch": "B"
|
||||
}
|
||||
],
|
||||
"operation": "new",
|
||||
"body_name": "Loft"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.extrude",
|
||||
"params": {
|
||||
"face": [
|
||||
0,
|
||||
0,
|
||||
40
|
||||
],
|
||||
"distance": 10,
|
||||
"operation": "join"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#561",
|
||||
"tangency-labs/solidcraft#677"
|
||||
],
|
||||
"what": "the end cap of a mitred swept bar (8 x 5 section, 30 up then 40 across) extruded 6 mm further along the path",
|
||||
"source": "analytic",
|
||||
"method": "bar V = 40 * 70 = 2800 (mitred, see 96); the end cap is the plane x = 40, 8 high (z 26..34) and 5 wide: extruding it outward 6 mm adds 8 * 5 * 6 = 240: V = 3040.",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 3040.0
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
"name": "Path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.line",
|
||||
"params": {
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
30
|
||||
]
|
||||
],
|
||||
"infer": false,
|
||||
"ids": [
|
||||
"p1"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.line",
|
||||
"params": {
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
30
|
||||
],
|
||||
[
|
||||
40,
|
||||
30
|
||||
]
|
||||
],
|
||||
"infer": false,
|
||||
"ids": [
|
||||
"p2"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
"name": "Sec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.rectangle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"corner": [
|
||||
4,
|
||||
2.5
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.sweep",
|
||||
"params": {
|
||||
"sketch": "Sec",
|
||||
"path_sketch": "Path",
|
||||
"path": [
|
||||
"p1",
|
||||
"p2"
|
||||
],
|
||||
"operation": "new",
|
||||
"body_name": "Bar"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.extrude",
|
||||
"params": {
|
||||
"face": [
|
||||
40,
|
||||
0,
|
||||
30
|
||||
],
|
||||
"distance": 6,
|
||||
"operation": "join"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#561",
|
||||
"tangency-labs/solidcraft#677"
|
||||
],
|
||||
"what": "the start face of a 3-turn square-wire coil (4 mm wire, pitch 8, centre diameter 40) extruded 5 mm",
|
||||
"source": "analytic",
|
||||
"method": "the coil is 4 x 4 wire at radius 20 turned 3 times by the screw: V = 16 * 2 pi 20 * 3 = 6032.1. The start face is the 4 x 4 section in the plane y = 0 at x 18..22, z -2..2; extruding it 5 mm out of the plane (into free space, away from the wire) adds 16 * 5 = 80: V = 6112.1.",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 6111.857894892402
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.coil",
|
||||
"params": {
|
||||
"diameter": 40,
|
||||
"revolutions": 3,
|
||||
"pitch": 8,
|
||||
"section_size": 4,
|
||||
"section": "square",
|
||||
"section_position": "center",
|
||||
"name": "Spring",
|
||||
"operation": "new"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.extrude",
|
||||
"params": {
|
||||
"face": [
|
||||
20,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"distance": 5,
|
||||
"operation": "join"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#844"
|
||||
],
|
||||
"what": "two swept walls (12 mm thick, 60 mm high) along concentric half circles of radius 50 and 58 turned 90 degrees apart, overlapping in thickness by 4 mm over a quarter turn and sharing the planes z = 0 and z = 60 (join gave an error, minutes, or an open body)",
|
||||
"source": "analytic",
|
||||
"method": "wall A is the ring r 44..56 over 0..180 degrees, wall B the ring r 52..64 over 90..270 degrees, both z 0..60: V_A = 60 (pi/2)(56^2 - 44^2) = 113097, V_B = 60 (pi/2)(64^2 - 52^2) = 131155; they overlap in r 52..56, angles 90..180: 60 (pi/4)(56^2 - 52^2) = 20357. V = V_A + V_B - overlap = 223932.7; one body (the walls touch over a quarter turn).",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 223932.72434788046
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
"name": "PathA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.arc.three_point",
|
||||
"params": {
|
||||
"start": [
|
||||
50.0,
|
||||
0.0
|
||||
],
|
||||
"through": [
|
||||
3.061616997868383e-15,
|
||||
50.0
|
||||
],
|
||||
"end": [
|
||||
-50.0,
|
||||
6.123233995736766e-15
|
||||
],
|
||||
"id": "a1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
50.0,
|
||||
0.0,
|
||||
30.0
|
||||
],
|
||||
"x_dir": [
|
||||
1.0,
|
||||
0.0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
"name": "ProfA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.rectangle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"corner": [
|
||||
6,
|
||||
30
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.sweep",
|
||||
"params": {
|
||||
"sketch": "ProfA",
|
||||
"path_sketch": "PathA",
|
||||
"path": [
|
||||
"a1"
|
||||
],
|
||||
"operation": "new",
|
||||
"body_name": "WallA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"x_dir": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
"name": "PathB"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.arc.three_point",
|
||||
"params": {
|
||||
"start": [
|
||||
3.5514757175273244e-15,
|
||||
58.0
|
||||
],
|
||||
"through": [
|
||||
-58.0,
|
||||
7.102951435054649e-15
|
||||
],
|
||||
"end": [
|
||||
-1.0654427152581972e-14,
|
||||
-58.0
|
||||
],
|
||||
"id": "a1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": {
|
||||
"origin": [
|
||||
3.5514757175273244e-15,
|
||||
58.0,
|
||||
30.0
|
||||
],
|
||||
"x_dir": [
|
||||
6.123233995736766e-17,
|
||||
1.0,
|
||||
0
|
||||
],
|
||||
"y_dir": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
"name": "ProfB"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.rectangle.center",
|
||||
"params": {
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"corner": [
|
||||
6,
|
||||
30
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.sweep",
|
||||
"params": {
|
||||
"sketch": "ProfB",
|
||||
"path_sketch": "PathB",
|
||||
"path": [
|
||||
"a1"
|
||||
],
|
||||
"operation": "join",
|
||||
"targets": [
|
||||
"WallA"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user