Index: openscad/line_speed/README
===================================================================
--- openscad/line_speed/README (revision 37239)
+++ openscad/line_speed/README (revision 37240)
@@ -4,3 +4,12 @@
Workaround #1: pixmap/: export pixmap data and use that as height map; compiles
fast, renders slow.
+
+Workaround #2: poly/: an openscad polygon object is an outer contour and
+multiple inner contours subtracted from it. It'd be possible to use librnd
+poly lib to "invert" a copper/silk layer by subtracting it from a rectangle;
+the resulting contour could be spliced and used as poly holes on the same
+initial rectangle in openscad. Results in a single poly obj. It's somewhat
+slow to calculate it during compilation and rendering is slow too.
+
+
Index: openscad/line_speed/poly/A.scad
===================================================================
--- openscad/line_speed/poly/A.scad (nonexistent)
+++ openscad/line_speed/poly/A.scad (revision 37240)
@@ -0,0 +1,30 @@
+use
+
+// Round cap line
+module pcb_line_rc(x1, y1, length, angle, width, thick) {
+ translate([x1,y1,0]) {
+union() {
+
+ rotate([0,0,angle]) {
+ translate([length/2+2, 0, 0])
+ cube([length-8, width, thick], center=true);
+// cylinder(r=width/2, h=thick, center=true, $fn=3);
+// translate([length, 0, 0])
+// cylinder(r=width/2, h=thick, center=true, $fn=3);
+ }
+ }
+ }
+}
+
+
+if (0)
+for(y=[1:8000]) {
+ pcb_line_rc(1, y, 20, 0, 0.5, 0.1);
+ pcb_line_rc(41, y, 20, 0, 0.5, 0.1);
+// pcb_line_rc(21, y, 20, 0, 0.5, 0.1);
+}
+
+
+//linear_extrude(height=1)
+ drawing();
+
Index: openscad/line_speed/poly/gen.sh
===================================================================
--- openscad/line_speed/poly/gen.sh (nonexistent)
+++ openscad/line_speed/poly/gen.sh (revision 37240)
@@ -0,0 +1,27 @@
+#!/bin/sh
+awk '
+BEGIN {
+ sx = 90;
+ sy = 90;
+ pt = "[-1,-1], ["sx+1", -1], ["sx+1", "sy+1"], [-1, "sy+1"]"
+ pts = 4;
+ paths = "[0,1,2,3]";
+
+ for(y = 0; y < sx; y++) {
+ for(x = 0; x < sy; x++) {
+ paths = paths ", ["
+ for(a = 0; a < 2*3.1415; a+=0.4) {
+ pt = pt ", [" x + cos(a)*0.6 "," y + sin(a)*0.6 "]"
+ paths = paths ((a == 0) ? "":",") pts
+ pts++
+ }
+ paths = paths "]"
+ }
+ }
+
+ print "module drawing() {"
+ print " polygon(points=[" pt "], paths=[" paths "], convexity=10);"
+ print "}"
+}
+' > P.scad
+
Property changes on: openscad/line_speed/poly/gen.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property