@rulecad/cad 0.7.11 → 0.7.12

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.
package/README.md CHANGED
@@ -371,7 +371,8 @@ worked out again when something it depends on changes.
371
371
 
372
372
  A 3D result with a build direction is made printable before it's drawn: built up layer by layer from the bed, every
373
373
  cell that nothing holds up (an icicle, a loose bit, a sheet hanging under an edge: whatever the optimiser's smooth
374
- overhang filter let through) is emptied, with whatever rested on it; a bridge may run out half the printer's span.
374
+ overhang filter let through) is emptied, with whatever rested on it; a bridge may run out half the printer's span,
375
+ in the optimiser's filter and in the cleaning alike, so a flat underside can open into holes that wide.
375
376
  Kept regions always stay, and the optimiser is made to hold them up: a kept cell with nothing under it costs it as
376
377
  much as the whole part's compliance. If there wasn't material enough to stand a kept region on, `cad optimise` says
377
378
  how much of it is left hanging. Then the drawn surface is tipped back to the printer's overhang limit and any tip left
package/lib/optimise.mjs CHANGED
@@ -76,7 +76,7 @@ export async function readProblem(project, ref) {
76
76
  if (dim === 2 && !(problem.thickness > 0)) throw new Error(`${path.basename(file)}: a flat (2D) problem needs a thickness`);
77
77
  const outline = { smooth: p.outline?.smooth ?? 4, minArea: p.outline?.min_area != null ? ev(p.outline.min_area) : problem.cell ** 2 * 2 };
78
78
  // A printable solid's surface is kept within the printer's overhang limit too (smoothing can tip faces past it)
79
- if (dim === 3 && problem.overhang) { const n = printerOf(project), pr = resolve({ uses: [n] }).values[n]; outline.overhang = { up: problem.overhang, angle: pr?.overhang ?? 45, bridge: pr?.bridge ?? 5 }; }
79
+ if (dim === 3 && problem.overhang) { const n = printerOf(project), pr = resolve({ uses: [n] }).values[n]; outline.overhang = { up: problem.overhang, angle: pr?.overhang ?? 45, bridge: pr?.bridge ?? 5 }; problem.bridge = outline.overhang.bridge; } // (the optimiser bridges half that)
80
80
  return { ref, name, variant, file, dim, title: p.title || name, material: { name: p.material, ...m }, problem, outline, critical: !!p.critical };
81
81
  }
82
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulecad/cad",
3
- "version": "0.7.11",
3
+ "version": "0.7.12",
4
4
  "description": "The cad command: JSCAD designs from traceable rules, checked for printing and fit, versioned by what fits, shared as links and exported as Bambu 3MF.",
5
5
  "type": "module",
6
6
  "bin": {