[OpenSCAD] DXF for cut and engrave

Parkinbot rudolf at digitaldocument.de
Wed Oct 30 09:46:36 EDT 2019


Troberg wrote
> The problem is that as soon as they have a width, the laser will cut
> twice.

A somewhat odd but viable solution to "implement" zero-width lines that
comes into my mind, would be to create and output a 3D model and feed just
the lines that are on the [x,y,0] plane into the laser cutter. In an STL
output you would then find and sort/connect all vertices and edges that have
their Z coordinate set to 0 into pathes. 

The implementation of the line() primitive would then be, e.g.: 

<http://forum.openscad.org/file/t887/line.png> 

a = [1,1, 0]; 
b = [0,12, 0]; 

line(a, b, 0.01, 3); 

module line(p, q, width=0.1, height=1)
{
  v = q-p; 
  normal = [-v[1], v[0], 0]; 
  un = normal/norm(normal)*width/2; 
  n = [un[0], un[1], height]; 
  n1 = [-un[0], -un[1], height]; 
  points=[p, p+n, p+n1, q, q+n, q+n1]; 
  faces=[[0,1,2], [3,5,4], [0, 3, 4, 1], [0, 2, 5, 3],  [2, 1, 4, 5]]; 
  polyhedron(points,faces); 
}


A multiline() implementation of this is straightforward. Going a step
further, one could interpret laser intensity via the height parameter. 




--
Sent from: http://forum.openscad.org/



More information about the Discuss mailing list