TechDraw for 2D CAD

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

TechDraw for 2D CAD

Post by yorik »

As you all probably know, DraftSight ceases to be free by the end of this year, so that basically leaves Linux with just a few good free 2D CAD options:
- LibreCAD, free and opensource, but partial DWG support and features (no TTF fonts, etc)
- QCAD (from which LibreCAD was originally forked), free and opensource (no DWG support), or paid for DWG support (which I did, BTW, it's cheap and I like the development model that the QCAD author tries to achieve)

I think FreeCAD could be a decent third option there, so I am starting to use it as my main 2D app, and fix issues as I meet them. This includes a number of TD issues too, so I thought I'd start a thread here to keep track of progresses.

What I did recently is adding an "OverrideStyle" property to TD Draft views, that is True by default, so the TD Draft view still works like before (the color/linestyle defined in the TD view applies to all objects), but that you can disable, so each Draft object is rendered with its own style/color.

This gives pretty good results. With OverrideStyle turned off, the line width specified on the TD Draft view serves as a base width, so if it is for ex. 0.15, a Draft line with width of 1.0 will render as 0.15, another one with 2.0 will render as 0.30, and so on. All in all, we get pretty accurate result, and
Screenshot from 2019-08-29 14-43-55.png
Screenshot from 2019-08-29 14-43-55.png (176.27 KiB) Viewed 3125 times
Screenshot from 2019-08-29 14-44-15.png
Screenshot from 2019-08-29 14-44-15.png (239.78 KiB) Viewed 3125 times
Here is the file if anyone is interested in having a look...

Next step I want to support is some form of hatching. Not sure what's the best path here, I need to play a bit more.

Some issues to look at later on (not sure they have an easy solution, though):

- When using right-click->print PDF, the resulting PDF is 100% identical to what appears in the TD view. All texts, however, get converted to paths, which makes the document unsearchable, and inflates its size too.
- When exporting to SVG, the template texts are rendered as text, the texts inside the TD Draft View are exported as paths. But I saw there is a trick where the template gets "rewritten" in post-processing. Maybe we can do the same for svg-based views...
- Clip objects are not supported in SVG export.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: TechDraw for 2D CAD

Post by triplus »

Good to see all the development lately, for making Draft -> TechDraw procedure more seamless. As for 2D CAD. We had a discussion a while back, on how improving things, like the DXF import performance. And after working with the results. This are the things that still could improve. As for the rest, Draft module for FreeCAD always was and still is a good general purpose 2D CAD option.
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: TechDraw for 2D CAD

Post by bitacovir »

FreeCAD is today the best open 2D CAD option after LibreCAD. And that is thanks to you.
Well done and keep working.
I will test your file once the new FreeCAD version is available for Windows.
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: TechDraw for 2D CAD

Post by triplus »

And there is one area, that can substantially reduce confusion, for first time Draft users. That is changing the default working plane setting from Auto to Top. That is just how other 2D CAD software works.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: TechDraw for 2D CAD

Post by yorik »

triplus wrote: Fri Aug 30, 2019 10:27 am And there is one area, that can substantially reduce confusion, for first time Draft users. That is changing the default working plane setting from Auto to Top. That is just how other 2D CAD software works.
I'm not sure about that because we'd immediately get the inverse complaints: Why can't I snap or draw in a vertical plane! FreeCAD is CRAP! :D And also, the working plane does start in the XY plane. Only the button shows "auto". Maybe we could change "Auto" to something like "Top (auto)"?
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: TechDraw for 2D CAD

Post by triplus »

Yes, that is true. Here one needs to think what makes more sense. If the plan is to position Draft workbench as a powerful 2D CAD solution and (new) people should try it out. In that case i would recommend for going with the Top as default. As otherwise a lot of first experiences will end up in things like slightly rotating the viewport and believing there is a bug involved. As the result on the screen, when adding 2D geometry, or a dimension for it, well obviously is wrong? ;)

P.S. Having auto set as default, that tries to send a different message. Draft workbench is a powerful 2D/3D oriented drafting workbench. Nothing wrong with that, and it's great that it is made like that. But first time users, trying out 2D CAD, the powerful 3D drafting capabilities quickly can become an overwhelming and much harder to comprehend experience.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: TechDraw for 2D CAD

Post by carlopav »

Agree with triplus: I was expecting Draft to be more 2d oriented. Auto mode is cool but I think top wp looks more robust to first time users.
follow my experiments on BIM modelling for architecture design
ABeton
Posts: 150
Joined: Tue Sep 03, 2019 6:39 pm

Re: TechDraw for 2D CAD

Post by ABeton »

Maybe we could have an option in the Draft settings in preferences which would change the view to Top view, and the navigation style to CAD whenever we open the Draft workbench.
Post Reply