LWPOLYLINE question

172 views
Skip to first unread message

joris De Bondt

unread,
Dec 7, 2017, 3:52:43 AM12/7/17
to python-ezdxf
Hi,

I'm currently exploring the ezdxf package.One of the things I need to do is to draw rectangles and color shade them. Drawing rectangles is not a problem, I can use the msp.add_lwpolyline(points).
But I would like to fill-up the drawn rectangles with different colors . Is there a way to do this?

Regards,
Joris

joris De Bondt

unread,
Dec 7, 2017, 11:16:41 AM12/7/17
to python-ezdxf
Hi,

Reading the ezdxf manual again I've found that one can use the Hatch Boundary class to draw the colored rectangles. I've done some initial testing and seems to do what I need. The only thing is when I have 2 overlapping rectangles I would like to send one of them to the background. I didn't find yet a way to do that. Any ideas?

Regards,
Joris


Op donderdag 7 december 2017 09:52:43 UTC+1 schreef joris De Bondt:

Manfred Moitzi

unread,
Dec 7, 2017, 10:54:17 PM12/7/17
to joris De Bondt, python-ezdxf
Hi!

The DXF standard does not support/define z-order for 2D elements, AutoCAD draws 
the elements in the order of appearance in the ENTITIES section, but this does not 
guarantee that other CAD application do it the same way.

If you really need full control over layout properties of elements like line width, color, transparency
or z-order of appearance, DXF is NOT the right choice, better formats are SVG or PDF.

Best regards,
Manfred 


--
You received this message because you are subscribed to the Google Groups "python-ezdxf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-ezdxf+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages