@rulecad/cad 0.7.89 → 0.7.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,6 +64,10 @@
64
64
  "$ref": "#/$defs/expr",
65
65
  "description": "A strain limit in place of stress, a share of the length (0.02 is 2%), such as \"pla.strength / pla.modulus / 2\": the stress limit is it times the material's modulus. Most use for a mechanism, whose hinges bend"
66
66
  },
67
+ "robust": {
68
+ "type": "boolean",
69
+ "description": "Optimise the design as made a little thin and a little thick too (its eroded and dilated copies, Wang, Lazarov and Sigmund 2011). With a stress or strain limit: the lightest layout that keeps the limit on all three. A mechanism: the one whose worst copy moves its output furthest, and with a limit, kept to it on all three (da Silva, Beck and Sigmund 2019); its supports, input and output stay solid. About three times the solves. Refused with a volume alone"
70
+ },
67
71
  "filter": {
68
72
  "$ref": "#/$defs/expr",
69
73
  "description": "Filter radius, mm: about the thinnest member (default a cell and a half, and never under two of the printer's lines)"
@@ -122,6 +126,18 @@
122
126
  "$ref": "#/$defs/load"
123
127
  }
124
128
  },
129
+ "in": {
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": ["assembly", "item"],
133
+ "description": "The assembly the problem is placed in: its coordinates are the item's own there, as that item's design draws the result. Regions can then sit at the assembly's joints (joint) and keep clear of its moving parts (sweep). While the assembly is read, the item, and any other built from this problem, is drawn without a result (its problem variables set to none)",
134
+ "properties": {
135
+ "assembly": { "type": "string", "description": "The assembly's name, in projects/<project>/assemblies" },
136
+ "item": { "type": "string", "description": "The item whose frame the problem is drawn in: the part being optimised" },
137
+ "pose": { "type": "string", "description": "The pose it is read in (default the one the assembly shows)" },
138
+ "z": { "$ref": "#/$defs/expr", "description": "A flat problem: the plate's middle plane, mm along the item's z (default half its thickness, a plate drawn up from z 0)" }
139
+ }
140
+ },
125
141
  "cases": {
126
142
  "type": "object",
127
143
  "additionalProperties": {
@@ -178,14 +194,28 @@
178
194
  "description": "One section all along this axis: a part cut from a bar, an extrusion or a plate of the profile"
179
195
  },
180
196
  "mill": {
181
- "type": "string",
182
- "pattern": "^[+-][xyz]$",
183
- "description": "Milled from this side ('+z': the tool cuts down from above): no undercuts, so a cell is as solid as every cell between it and the tool. Not with overhang or cast. Rules: mill-3axis"
197
+ "description": "Milled from this side ('+z': the tool cuts down from above): no undercuts, so a cell is as solid as every cell between it and the tool. Or from several sides, a setup each (['+z', '-z']: turned over for the second): a cell is left where no side's tool reaches it. Or a variable holding the side or sides ('+z', '+z -z') or 'none' (not milled), so a variant can switch it. Not with overhang or cast. Rules: mill-3axis",
198
+ "oneOf": [
199
+ { "type": "string", "pattern": "^([+-][xyz]|[A-Za-z_][A-Za-z0-9_]*)$" },
200
+ { "type": "array", "items": { "type": "string", "pattern": "^[+-][xyz]$" }, "minItems": 1, "uniqueItems": true }
201
+ ]
202
+ },
203
+ "tool": {
204
+ "$ref": "#/$defs/expr",
205
+ "description": "With mill: the tool's radius, mm (a flat end mill). No pocket narrower than the tool, and every inside corner seen from the tool rounded to at least its radius. At the grid's resolution: the tool's end is the cells whose centres are within its radius, so give at least a cell. Rules: mill-3axis (an inside corner's radius)"
206
+ },
207
+ "feature": {
208
+ "$ref": "#/$defs/expr",
209
+ "description": "The thinnest member made, mm: for a printer, its two lines (x1c.wall_min). Members narrower go as the part is optimised, and cad optimise reports any left. Where a cell is as wide or wider, every member already is and nothing changes; up to three cells across it is held by an opening filter; wider is refused by name with the cell size that would hold it. Rules: x1c (wall_min, line)"
210
+ },
211
+ "draft": {
212
+ "$ref": "#/$defs/expr",
213
+ "description": "With cast: the draft, degrees. The part narrows towards the side it is drawn off: a wall steps out a cell every whole number of layers in 1 / tan(draft), so at least this draft; refused by name when the grid is too shallow for one step. Rules: mould-injection"
184
214
  },
185
215
  "cast": {
186
- "description": "Cast or moulded: in a mould drawn off one way ('+z'), or in two halves drawn off both ways along an axis from a parting plane. No undercuts from the draw; draft is left to the drawing. Not with overhang or mill. Rules: mould-injection",
216
+ "description": "Cast or moulded: in a mould drawn off one way ('+z'), or in two halves drawn off both ways along an axis from a parting plane. No undercuts from the draw, and with draft the walls taper. Not with overhang or mill. Rules: mould-injection",
187
217
  "oneOf": [
188
- { "type": "string", "pattern": "^[+-][xyz]$" },
218
+ { "type": "string", "pattern": "^([+-][xyz]|[A-Za-z_][A-Za-z0-9_]*)$", "description": "The way it is drawn off, or a variable holding it (or 'none': not cast)" },
189
219
  {
190
220
  "type": "object",
191
221
  "additionalProperties": false,
@@ -198,8 +228,8 @@
198
228
  ]
199
229
  },
200
230
  "voids": {
201
- "enum": ["allowed", "refused"],
202
- "description": "Enclosed voids in the result: allowed (the default), or refused, for metal powder bed printing (powder left inside can't be got out) or a casting's trapped core: cad optimise then reports each as an error with its volume and where it is. Rules: dmls"
231
+ "enum": ["allowed", "refused", "prevented"],
232
+ "description": "Enclosed voids in the result: allowed (the default); refused, for metal powder bed printing (powder left inside can't be got out) or a casting's trapped core: cad optimise then reports each as an error with its volume and where it is; or prevented: the optimiser keeps every void open to the outside as it goes (a virtual temperature, kept under a cap: an enclosed void runs hot), and any left are still reported as errors. Prevented is for the stiffest part that fills a volume, not a mechanism or a stress limit. Rules: dmls"
203
233
  },
204
234
  "output": {
205
235
  "type": "object",
@@ -218,6 +248,11 @@
218
248
  "pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
219
249
  "description": "In place of at: another design's anchor, object.anchor, where it is as that design is built (x and y of it in a flat problem). A cylinder lies along the anchor's axis unless it names one. Move the anchor and the problem moves with it. A design built from this problem can't be named: name what it's fixed to"
220
250
  },
251
+ "joint": {
252
+ "type": "string",
253
+ "pattern": "^[A-Za-z0-9_-]+$",
254
+ "description": "In place of at: a joint of the assembly the problem is in (in), where it is in the item's frame: the joint's anchor on the item when the item is one of its ends, else its parent's anchor as the pose places it (x and y of it in a flat problem). A cylinder lies along the joint's axis unless it names one"
255
+ },
221
256
  "r": {
222
257
  "$ref": "#/$defs/expr"
223
258
  },
@@ -266,6 +301,11 @@
266
301
  "required": [
267
302
  "anchor"
268
303
  ]
304
+ },
305
+ {
306
+ "required": [
307
+ "joint"
308
+ ]
269
309
  }
270
310
  ]
271
311
  },
@@ -302,6 +342,11 @@
302
342
  "pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
303
343
  "description": "In place of at: another design's anchor, object.anchor, where it is as that design is built (x and y of it in a flat problem). A cylinder lies along the anchor's axis unless it names one. Move the anchor and the problem moves with it. A design built from this problem can't be named: name what it's fixed to"
304
344
  },
345
+ "joint": {
346
+ "type": "string",
347
+ "pattern": "^[A-Za-z0-9_-]+$",
348
+ "description": "In place of at: a joint of the assembly the problem is in (in), where it is in the item's frame: the joint's anchor on the item when the item is one of its ends, else its parent's anchor as the pose places it (x and y of it in a flat problem). A cylinder lies along the joint's axis unless it names one"
349
+ },
305
350
  "r": {
306
351
  "$ref": "#/$defs/expr",
307
352
  "description": "A circle's or ball's radius, or a cylinder's"
@@ -339,6 +384,19 @@
339
384
  "type": "string",
340
385
  "description": "A named part of another design in the project, as it's built: object.part. In a flat (2D) problem, its section halfway up (a plate's outline, its holes open)"
341
386
  },
387
+ "sweep": {
388
+ "type": "string",
389
+ "description": "Avoid only: an item or item.part of the assembly the problem is in (in), swept through a joint's range (through), the other joints held at the pose. Each step is a region to keep clear: the part where it is then, in the item's frame (in a flat problem, all of it within the plate's thickness about its middle plane, in.z: its sections up the plate, half a cell apart and closer where a face leans). Change the assembly and the region follows"
390
+ },
391
+ "through": {
392
+ "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" }, "minItems": 1 }],
393
+ "description": "With sweep: the joint it is swept through, from its min to its max (or joints, each in turn)"
394
+ },
395
+ "steps": {
396
+ "type": "integer",
397
+ "minimum": 1,
398
+ "description": "With sweep: how many steps across each joint's range (default: enough that no point of the part moves more than half a cell between two)"
399
+ },
342
400
  "label": {
343
401
  "type": "string"
344
402
  },
@@ -371,6 +429,11 @@
371
429
  "pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
372
430
  "description": "In place of at: another design's anchor, object.anchor, where it is as that design is built (x and y of it in a flat problem). A cylinder lies along the anchor's axis unless it names one. Move the anchor and the problem moves with it. A design built from this problem can't be named: name what it's fixed to"
373
431
  },
432
+ "joint": {
433
+ "type": "string",
434
+ "pattern": "^[A-Za-z0-9_-]+$",
435
+ "description": "In place of at: a joint of the assembly the problem is in (in), where it is in the item's frame: the joint's anchor on the item when the item is one of its ends, else its parent's anchor as the pose places it (x and y of it in a flat problem). A cylinder lies along the joint's axis unless it names one"
436
+ },
374
437
  "r": {
375
438
  "$ref": "#/$defs/expr",
376
439
  "description": "A circle's or ball's radius, or a cylinder's"
@@ -447,6 +510,11 @@
447
510
  "pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
448
511
  "description": "In place of at: another design's anchor, object.anchor, where it is as that design is built (x and y of it in a flat problem). A cylinder lies along the anchor's axis unless it names one. Move the anchor and the problem moves with it. A design built from this problem can't be named: name what it's fixed to"
449
512
  },
513
+ "joint": {
514
+ "type": "string",
515
+ "pattern": "^[A-Za-z0-9_-]+$",
516
+ "description": "In place of at: a joint of the assembly the problem is in (in), where it is in the item's frame: the joint's anchor on the item when the item is one of its ends, else its parent's anchor as the pose places it (x and y of it in a flat problem). A cylinder lies along the joint's axis unless it names one"
517
+ },
450
518
  "r": {
451
519
  "$ref": "#/$defs/expr",
452
520
  "description": "A circle's or ball's radius, or a cylinder's"