- edited description
Not Plotting for open_gerber -follow 1
Issue #253
new
With the current master branch, on Python2, modules updated (matplotlib 2.2.2), Win10 x64.
When I open a Gerber file with follow parameter True, there is no update on the screen.
After the file parsing, the Gerber object has only a list of LineStrings inside. When the method FlatCAMObj.FlatCAMGerber.plot() (found around line 606) is called (after the signal that object_created is emitted),
if self.options["solid"]:
for poly in geometry:
# TODO: Too many things hardcoded.
try:
patch = PolygonPatch(poly,
facecolor="#BBF268",
edgecolor="#006E20",
alpha=0.75,
zorder=2)
self.axes.add_patch(patch)
except AssertionError:
FlatCAMApp.App.log.warning("A geometry component was not a polygon:")
FlatCAMApp.App.log.warning(str(poly))
every item in the object geometry list is processed as Exception AssertionError, and the log.warning line looks like this:
[DEBUG][Dummy-1] A new object is available. Should plot it!
[DEBUG][MainThread] on_object_created --> FlatCAMGerber.plot()
[DEBUG][MainThread] plot --> FlatCAMObj.plot()
[WARNING][MainThread] A geometry component was not a polygon:
[WARNING][MainThread] LINESTRING (20.779 24.462, 20.779 27.002, 18.229 27.002, 14.429 27.002)
[WARNING][MainThread] A geometry component was not a polygon:
[WARNING][MainThread] LINESTRING (18.229 27.002, 19.509 27.002, 19.509 28.272)
[WARNING][MainThread] A geometry component was not a polygon:
[WARNING][MainThread] LINESTRING (32.209 14.302, 28.399 14.302, 28.399 16.842)
[WARNING][MainThread] A geometry component was not a polygon:
[WARNING][MainThread] LINESTRING (28.399 14.302, 18.239 14.302)
[WARNING][MainThread] A geometry component was not a polygon:
[WARNING][MainThread] LINESTRING (20.779 16.842, 23.329 16.842, 23.329 28.272, 27.129 28.272)
[WARNING][MainThread] A geometry component was not a polygon:
[WARNING][MainThread] LINESTRING (20.779 19.382, 14.429 19.382)
[WARNING][MainThread] A geometry component was not a polygon:
[WARNING][MainThread] LINESTRING (20.779 21.922, 18.239 21.922)
[WARNING][MainThread] A geometry component was not a polygon:
[WARNING][MainThread] LINESTRING (28.399 21.922, 32.209 21.922)
and those lines are not plotted.
It seems to me that Linestrings are not processed at all. Unfortunately I have no knowledge on how matplotlib works so I post the issue here (instead of solving it).
Comments (3)
-
reporter -
reporter - edited description
-
reporter - edited description
- Log in to comment