chiark / gitweb /
toolbox-inserts: flail around openscad bugs
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 21 Apr 2025 18:40:10 +0000 (19:40 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 21 Apr 2025 18:48:39 +0000 (19:48 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
toolbox-inserts.scad

index 31c263aa0af326c9c3501fcff3f814c28162c333..4fb69bb6284323beb3183b71b7e4f93023f06785 100644 (file)
@@ -206,14 +206,13 @@ module FixingsHoledPlan() {
     BoxCavityModelMainPlan();
 }
 
-module OnePlate(right) { ////toplevel
+module SomePlates(right) { ////toplevel
   render() difference(){
     intersection(){
       BoxCavityModel();
       linextr(-20, 0) square(1000, center=true);
-      mirror([ right? 0 : 1, 0,0 ])
-       linextr_x_yz(plate_mid_gap/2, box_x)
-       square(1000, center=true);
+
+      children(0);
     }
 
     union(){
@@ -231,6 +230,14 @@ module OnePlate(right) { ////toplevel
   }
 }
 
+module PlateSelect(right) {
+  mirror([ right? 0 : 1, 0,0 ])
+    linextr_x_yz(plate_mid_gap/2, box_x)
+    square(1000, center=true);
+}
+module OnePlate(right) {
+  SomePlates() PlateSelect(right);
+}
 module LeftPlate() { ////toplevel
   render() OnePlate(false);
 }      
@@ -239,10 +246,10 @@ module RightPlate() { ////toplevel
 }
 
 module TestPlates() { ////toplevel
-  render() intersection(){
-    union(){
-      LeftPlate();
-      RightPlate();
+  render() intersection() {
+    SomePlates() union(){
+      PlateSelect(false);
+      PlateSelect(true);
     }
 
     linextr(-100,100)