Scribbles LWPOLYLINE

11 views
Skip to first unread message

mrkim

unread,
Oct 15, 2010, 2:04:25 AM10/15/10
to MakerBot Unicorn
This is what I did to get vector paths working:
##bitmap -> vector
autotrace -output-format dxf -output-file myoutput.dxf -input-format
PNG myinput.png

qcad: select all, scale, explode ##reduce DXF (POLYLINE -> LWPOLYLINE)

#patch to support LWPOLYLINE
http://omwheel.com/robot/code/scribbles-10-14-10.patch

python scribbles.py myoutput-autotrace-scale-explode.dxf > myoutput-
autotrace-scale-explode.gcode

Matt G

unread,
Oct 17, 2010, 9:09:55 AM10/17/10
to MakerBot Unicorn
I'd love to get more details about this work you are doing, if you
have a moment.
thanks!
Matt

On Oct 15, 2:04 am, mrkim <mrkimro...@gmail.com> wrote:
> This is what I did to get vector paths working:
> ##bitmap -> vector
> autotrace -output-format dxf -output-file myoutput.dxf -input-format
> PNG myinput.png
>
> qcad: select all, scale, explode ##reduce DXF (POLYLINE -> LWPOLYLINE)
>
> #patch to support LWPOLYLINEhttp://omwheel.com/robot/code/scribbles-10-14-10.patch

mrkim

unread,
Oct 17, 2010, 4:34:58 PM10/17/10
to MakerBot Unicorn
Following the very helpful Tutorial #1 with my test image, I ran into
a few differences:
In my qcad(2.0.5), explode seemed to only reduce the polylines down to
lwpolylines, where I think scribbles and the tutorial intended to use
just simple lines.

It looked like for lwpolylines, import_dxf.py had code to collect up
the (x,y) coordinates into the intermediate list called segments. Not
only did my test image have lwpolylines, it had polylines that were
only 1 vertex long, and was failing at segments because the single
pair was not of type list.
So the patch supports that case by looking at the vertex count given
by dxf code 90. Then the polyline gets rendered as a series of
go_to_point's. (Not in the patch)If the go_to_point's(which moves with
pen up) is changed to draw_to_point, then that was just enough to get
my test image to print.

Hope that is helpful, or maybe it was all just folly.
Reply all
Reply to author
Forward
0 new messages