mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-04 11:05:56 +00:00
Kernel rig: parameter cases, an expression in a sketch dimension and a cyclic one refused
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"sources": [],
|
||||
"what": "parameters.change that makes two parameters depend on each other",
|
||||
"source": "invariants",
|
||||
"method": "A = B - 5 with B = A + 5 has no value: refused",
|
||||
"outcome": "refused",
|
||||
"refusal": "circular reference"
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "parameters.add",
|
||||
"params": {
|
||||
"name": "A",
|
||||
"expression": "10 mm",
|
||||
"unit": "mm"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "parameters.add",
|
||||
"params": {
|
||||
"name": "B",
|
||||
"expression": "A + 5 mm",
|
||||
"unit": "mm"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"length": "B",
|
||||
"width": 10,
|
||||
"height": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "parameters.change",
|
||||
"params": {
|
||||
"name": "A",
|
||||
"expression": "B - 5 mm"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"sources": [],
|
||||
"what": "sketch dimensions 2 W and W / 2: changing W rebuilds the plate",
|
||||
"method": "W = 30: a 60x15 rectangle extruded 10: V = 9000, A = 2 (900 + 600 + 150) = 3300; 6 faces",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 9000.0,
|
||||
"area_mm2": 3300.0,
|
||||
"faces": 6,
|
||||
"source": "analytic"
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "parameters.add",
|
||||
"params": {
|
||||
"name": "W",
|
||||
"expression": "20 mm",
|
||||
"unit": "mm"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.create",
|
||||
"params": {
|
||||
"plane": "XY",
|
||||
"name": "S"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.rectangle.two_point",
|
||||
"params": {
|
||||
"p0": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"p1": [
|
||||
40,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.dimension",
|
||||
"params": {
|
||||
"entities": [
|
||||
"l1"
|
||||
],
|
||||
"type": "length",
|
||||
"value": "2 * W"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.dimension",
|
||||
"params": {
|
||||
"entities": [
|
||||
"l4"
|
||||
],
|
||||
"type": "length",
|
||||
"value": "W / 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "sketch.finish",
|
||||
"params": {}
|
||||
},
|
||||
{
|
||||
"command": "solid.extrude",
|
||||
"params": {
|
||||
"sketch": "S",
|
||||
"distance": 10,
|
||||
"operation": "new",
|
||||
"body_name": "Plate"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "parameters.change",
|
||||
"params": {
|
||||
"name": "W",
|
||||
"expression": "30 mm"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user