Re: displaying dxf drawings in a GUI
Jakab Gábor <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
Hi Robin, I'll look into the SVG renderer! For now the matplotlib-based approach works fine, as I - for now at least - have really basic shapes and matplotlib patches can do these. But the limits are clearly set by the classes available in the patches module. A more general approach will certainly be necessary in the future. Thank you again for your contributions in the wxpython module - I can tell you these are invaluable. Best regards, Gabor On Wednesday, November 20, 2019 at 10:37:29 PM UTC+1, Robin Dunn wrote: > > I recently added a SVG renderer to wxPython 4.1 so if there is a good way > to convert dxf files to svg files that would be one way you could go. OTOH, > if you're able to decompose the dxf files into paths, curves and simple > shapes then you could take a similar approach for rendering it to a > wx.GraphicsContext. See > https://github.com/wxWidgets/Phoenix/blob/master/wx/svg/__init__.py#L147 > > -- > Robin > > > On Saturday, November 16, 2019 at 2:53:20 PM UTC-8, Jakab Gábor wrote: >> >> Dear all, >> >> I'm working on an app that would enable the user to quickly generate 2D >> .dxf drawings based on some input values. >> >> For user convenience and visual error checking it makes a lot of sense to >> show the generated dxf in the GUI right at input, preferably in a way that >> reads the entities to be shown from the generated dxf files. >> >> Writing and querying the drawings can be done quite easily using the >> excellent ezdxf package; now I'm looking for the canvas that best suits my >> needs. >> >> To display are basic geometric entities: lines, arcs, perhaps some text. >> Anything more complex can be approximated by lines. >> >> I *think* the FloatCanvas class in wx.lib.floatcanvas can do everything I >> need out of the box. >> >> Do you have any suggestions what else could be used? >> >> Thanks in advance! >> > -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/f64f9082-3e1a-4b52-b73b-23c72bf38eff%40googlegroups.com.