Replies: 1 comment
-
My suggestion would be to break the problem down. Also I will try to give general advice here but I don't have enough information to know what the best approach will be for your application. If you want to use the existing cad widget then I suggest getting familiar with QGraphicsScene first before interfacing with the cad widget. For example are you able to create a prototype of your application that just deals with simple elements like lines without involving DXF / ezdxf. For example make a gui where you can click and drag to place lines and make the types of edits you want to eventually apply to a DXF file. If you are building a very simple CAD application then it may be sufficient to load the DXF in the cad widget and re-render after making an edit. If you require proper interactivity the design becomes much more challenging. I would suggest you do not work with DXF directly but instead parse the DXF to an internal representation that is easier to manipulate that can be re-exported as DXF. This is an approach I have taken in the past. In this case the CAD widget may serve as a useful reference (if you build your application in Qt) but is probably not best to use directly. |
Beta Was this translation helpful? Give feedback.
-
Hello, honored ones. I need to create my own interface based on the Cad Widget, when the user selects some properties from the widget sheet will change the Drawing itself and I want users to immediately see the changes on the CadWidget, rather than opening the dxf. I also want to provide for the possibility of moving elements in the connection CadWidget - change coordinates - passing coordinates to doc.modelspace().
@mbway answered many questions, would appreciate help or direction to the right path.
Beta Was this translation helpful? Give feedback.
All reactions