Moving towards merging in drawing stuff?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Moving towards merging in drawing stuff?
Hello all,
The svg snippets stuff I have been working on is starting to look somewhat more complete, and I am starting to think of GUI stuff. Link to github stuff: https://github.com/jcc242/FreeCAD
Any guidelines for Python code to be merged? I would rather not merge anything into the 0.13 since it sounds like a 0.13 is gearing up for release and I still have a ton of issues and broken code and everything.
Last time I asked about drawing module GUI stuff Yorik mentioned that it was in the process of converting from whatever it was into a webkit renderer. Is this process completed?
I am thinking of taking up C++ for the GUI stuff to keep it consistent with what is already there. What method of wrapping Python are we using so that I may use the SVG snippet module in C++?
I don't think I have found any documentation on the wiki for developing FreeCAD modules in C++, unless I missed it (very probable). My C++ is also pretty weak (hoping to use this opportunity to get better at it), so I hope you don't mind me stumbling around for a while!
Thank you and I am sure I will have a million more questions!
The svg snippets stuff I have been working on is starting to look somewhat more complete, and I am starting to think of GUI stuff. Link to github stuff: https://github.com/jcc242/FreeCAD
Any guidelines for Python code to be merged? I would rather not merge anything into the 0.13 since it sounds like a 0.13 is gearing up for release and I still have a ton of issues and broken code and everything.
Last time I asked about drawing module GUI stuff Yorik mentioned that it was in the process of converting from whatever it was into a webkit renderer. Is this process completed?
I am thinking of taking up C++ for the GUI stuff to keep it consistent with what is already there. What method of wrapping Python are we using so that I may use the SVG snippet module in C++?
I don't think I have found any documentation on the wiki for developing FreeCAD modules in C++, unless I missed it (very probable). My C++ is also pretty weak (hoping to use this opportunity to get better at it), so I hope you don't mind me stumbling around for a while!
Thank you and I am sure I will have a million more questions!
-
- Posts: 395
- Joined: Fri Oct 07, 2011 8:58 pm
- Location: Beaverton,Oregon, USA
- Contact:
Re: Moving towards merging in drawing stuff?
Hi,
Sorry, I don't have much advice about the C++ python wrapping stuff, but you might want to demonstrate what your python code does, so that we know which direction you want to go. I do that sort of thing by putting ideas and code snippets on my blog (look at my sig line for the url). Maybe put some code snippets and images in this thread, on the forum.
I looked at your repo a few days ago and pointed it out to Yorik, while we were chatting on IRC. We both said 'Wow!' It looks like you've been busy. I am very interested in what you have done. It would be great to get to a point where we have actual dimensions in the Drawing workbench.
Thanks.
Sorry, I don't have much advice about the C++ python wrapping stuff, but you might want to demonstrate what your python code does, so that we know which direction you want to go. I do that sort of thing by putting ideas and code snippets on my blog (look at my sig line for the url). Maybe put some code snippets and images in this thread, on the forum.
I looked at your repo a few days ago and pointed it out to Yorik, while we were chatting on IRC. We both said 'Wow!' It looks like you've been busy. I am very interested in what you have done. It would be great to get to a point where we have actual dimensions in the Drawing workbench.
Thanks.
Re: Moving towards merging in drawing stuff?
I requested wiki access in the other thread, I was thinking of sticking some stuff up on there. I'm not sure how keen I am on keeping up a blog, I haven't been doing much interesting stuff with FreeCAD except that python module. I'll see what I can write up in the coming week though.
Thanks for checking out my repo too, I am flattered you guys said "wow"!
Thanks for checking out my repo too, I am flattered you guys said "wow"!
-
- Posts: 655
- Joined: Fri Jul 22, 2011 8:37 pm
- Contact:
Re: Moving towards merging in drawing stuff?
Hi,
I have some bits of help on c++ on my blog, but always good advice is to have a good IDE that has code hinting, and using the online QT documentation.
It would be also a good idea to have a few pictures or a video just to show what your code does, instead of having to build it.
Luke
From what I know this hasn't started yet, but was planned. Is it not the case of changing the view from using QSVG with QGraphicsView to webkit? It would make a nice small project for someone.jcc242 wrote:Last time I asked about drawing module GUI stuff Yorik mentioned that it was in the process of converting from whatever it was into a webkit renderer. Is this process completed?
c++ for the gui doesn't have any major benefits over python except its inherent power from the language itself. However, I think GUI programming is a nice way to learn but also visually practice c++ since it's less abstract.jcc242 wrote:I am thinking of taking up C++ for the GUI stuff to keep it consistent with what is already there. What method of wrapping Python are we using so that I may use the SVG snippet module in C++?
I have some bits of help on c++ on my blog, but always good advice is to have a good IDE that has code hinting, and using the online QT documentation.
It would be also a good idea to have a few pictures or a video just to show what your code does, instead of having to build it.
Luke
Development blog - http://freecadamusements.blogspot.co.uk/
Re: Moving towards merging in drawing stuff?
Some general thought on the Drawing module....
I'm nowadays a bit unhappy with my initial design of the drawing module. I was hopping for Inkscape to
do more steps toward 2D CAD drawings. Unfortunately they didn't.
Using SVG is very clean and powerfull, but with some problems.... Using WebKit is a very fat approach.
Also, if we think to the end, we have to implement a lot of 2D stuff, as selection/drawing/moving......
At the moment I think about a alternative for SVG, means dxf/LibreCAD. LibreCAD has all the 2D capabilities
we would have to implement. Also it foster the whole dxf swamp (which i don't like, but its a defacto standard).
That would mean, generating dxf with the Views in FreeCAD and using LibreCAD as viewer and editor in the 2D space....
How close we make the connection to LibreCAD is another question. Simple import/export of dxf is a start. Automatic
update of the 2D world in LibreCAD with the document update cycle would be next.. Even more would be possible.
I fear we are with SVG on the wrong boat sailing in a wrong direction.....
But thats a thought, open for discussion....
I'm nowadays a bit unhappy with my initial design of the drawing module. I was hopping for Inkscape to
do more steps toward 2D CAD drawings. Unfortunately they didn't.
Using SVG is very clean and powerfull, but with some problems.... Using WebKit is a very fat approach.
Also, if we think to the end, we have to implement a lot of 2D stuff, as selection/drawing/moving......
At the moment I think about a alternative for SVG, means dxf/LibreCAD. LibreCAD has all the 2D capabilities
we would have to implement. Also it foster the whole dxf swamp (which i don't like, but its a defacto standard).
That would mean, generating dxf with the Views in FreeCAD and using LibreCAD as viewer and editor in the 2D space....
How close we make the connection to LibreCAD is another question. Simple import/export of dxf is a start. Automatic
update of the 2D world in LibreCAD with the document update cycle would be next.. Even more would be possible.
I fear we are with SVG on the wrong boat sailing in a wrong direction.....
But thats a thought, open for discussion....
Stop whining - start coding!
Re: Moving towards merging in drawing stuff?
I understand your wish not to implement functionality already found in another open source project (LibreCAD). But the problem is, LibreCAD's legacy UI is simply terrible (and that is an understatement). Having it embedded into FreeCAD would bring much confusion to the end-user IMHO, because its interface is so totally different from FreeCAD's.
In any case, I would hope for this to be a stopgap measure, and that the long-term goal (once geometry creation and assembly are covered) would be to have a completely native Drawing module in FreeCAD.
BTW I don't know if you guys know this, but the latest QCad v3 (commercial version) can now export to SVG format. I don't know if it can import though.
In any case, I would hope for this to be a stopgap measure, and that the long-term goal (once geometry creation and assembly are covered) would be to have a completely native Drawing module in FreeCAD.
BTW I don't know if you guys know this, but the latest QCad v3 (commercial version) can now export to SVG format. I don't know if it can import though.
Re: Moving towards merging in drawing stuff?
I don't know what would be the best choice (long-term) and would give best results (short-term) but SVG is probably something i would like it to be in the centre of the FreeCAD strategy.I fear we are with SVG on the wrong boat sailing in a wrong direction.....
But thats a thought, open for discussion....
Re: Moving towards merging in drawing stuff?
No, not LibreCAD. Aside from the nightmare of working with a proprietary format like DXF, the LibreCAD workflow is not one I would use and it really is dangerous to depend on another project like that. You're generally pretty safe with libraries like OpenCascade, but once you start using other features of a higher level package like LibreCAD which you don't control, there is a danger that its developers will do something which will make users very unhappy.
What are the basic issues that need to be addressed? I hate to say it, but depending on the needs, sometimes there is no choice but to create a new implementation of something.
What are the basic issues that need to be addressed? I hate to say it, but depending on the needs, sometimes there is no choice but to create a new implementation of something.
Re: Moving towards merging in drawing stuff?
Luke: I will probably have to do quite a bit of reading and small test programs before I will be ready for big time stuff. Out of curiosity, which IDE do you use (that question could be directed towards everyone)?
I hve some reservations with using SVG for technical documents, but I'm not too fond of using DXF either because of its limitations and control by Autodesk (though I do like that it is supported by nearly every other program). Are there any other free 2D CAD formats? It seems libreDWG is incompatible with our license. I don't think any method of displaying and editing 2D drawings will be lightweight, so I'm not sure webkit is a big thing to worry about (i.e. possibly the only way to go lighter is to exclude 2D drawings entirely and let another program handle them, but even still we need a way to prepare views for exporting).
As for LibreCAD's interface, I just gave it a try. I've been using AutoCAD for a very long time so it was a little offputting that it didn't work like AutoCAD. The interface itself wasn't bad, just the workflow felt very slow to me. They have a plugin system, right? Perhaps we can take advantage of that if we decide to outsource 2D drawings to them. And patch in some workflow improvements =D
As far as the code I have written so far, I think it could be fairly easily changed from outputting SVG to some other format.
I hve some reservations with using SVG for technical documents, but I'm not too fond of using DXF either because of its limitations and control by Autodesk (though I do like that it is supported by nearly every other program). Are there any other free 2D CAD formats? It seems libreDWG is incompatible with our license. I don't think any method of displaying and editing 2D drawings will be lightweight, so I'm not sure webkit is a big thing to worry about (i.e. possibly the only way to go lighter is to exclude 2D drawings entirely and let another program handle them, but even still we need a way to prepare views for exporting).
As for LibreCAD's interface, I just gave it a try. I've been using AutoCAD for a very long time so it was a little offputting that it didn't work like AutoCAD. The interface itself wasn't bad, just the workflow felt very slow to me. They have a plugin system, right? Perhaps we can take advantage of that if we decide to outsource 2D drawings to them. And patch in some workflow improvements =D
As far as the code I have written so far, I think it could be fairly easily changed from outputting SVG to some other format.
Re: Moving towards merging in drawing stuff?
What are they and does another format solve them?I hve some reservations with using SVG for technical documents
What would using another format change? Less work by "embedding LibreCAD" or it would bring something else too? What would be lost compared to SVG?
Basically i could say the same about SVG. You can open/edit your SVG document in wide range of software.though I do like that it is supported by nearly every other program
And i must admit using SVG in FreeCAD is one of the biggest features FreeCAD offers to me and i was surprised to read using SVG is going in wrong direction because i was not under such impression until now. I am not saying i am right or wrong but it's just such great feature and if i understand this correctly SVG would be ditched mainly because that would bring less work in terms of FreeCAD development? It's valid thinking i guess but on the other hand reading this:
SVG export is terrible - ID: 3562931
After using SVG in FreeCAD just feels wrong but yes i could be wrong and it could make sense for other users/developers of FreeCAD. In the end it will probably be "pragmatic decision" based on available developers/experience in this area and making educated guess what would work better. But if it's merely the question SVG vs. something else i would choose SVG and work on that.