[merged] PR #4935 Adding TechDrawTools to TechDraw WB

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
edi
Posts: 481
Joined: Fri Jan 17, 2020 1:32 pm

[merged] PR #4935 Adding TechDrawTools to TechDraw WB

Post by edi »

Adding first 5 tools taken from TechDrawTools.FCMacro to the master. The tools are:
- create circle center lines
- create hole thread side view and ground view
- create screw thread side view and ground view
TechDraw21.png
TechDraw21.png (23.6 KiB) Viewed 7246 times
The tools are documented in https://forum.freecadweb.org/viewtopic.php?f=35&t=59334.
Last edited by edi on Thu Sep 16, 2021 1:51 pm, edited 1 time in total.
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: PR #4935 Adding TechDrawTools to TechDraw WB

Post by Shalmeneser »

8-)
domad
Veteran
Posts: 2051
Joined: Mon Jun 22, 2020 12:16 pm

Re: PR #4935 Adding TechDrawTools to TechDraw WB

Post by domad »

yes, yes, yes...!
User avatar
ragohix769
Posts: 565
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: PR #4935 Adding TechDrawTools to TechDraw WB

Post by ragohix769 »

edi wrote: Fri Jul 23, 2021 2:53 pm Adding first 5 tools taken from TechDrawTools.FCMacro to the master. The tools are:
- create circle center lines
- create hole thread side view and ground view
- create screw thread side view and ground view
TechDraw21.png
The tools are documented in https://forum.freecadweb.org/viewtopic.php?f=35&t=59334.
You are a hero! 8-) 8-) 8-)
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough :-(
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same :-)
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #4935 Adding TechDrawTools to TechDraw WB

Post by chrisb »

Great addition!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: PR #4935 Adding TechDrawTools to TechDraw WB

Post by balrobs »

Hi @edi
Thank you for your great work!
I've compiled it on Linux without problems ... only this warning message:

Code: Select all

...
[ 93%] Building CXX object src/Mod/TechDraw/App/CMakeFiles/TechDraw.dir/Cosmetic.cpp.o
/home/balrobs/Desktop/freecad-source/src/Mod/TechDraw/App/Cosmetic.cpp: In static member function ‘static std::pair<Base::Vector3<double>, Base::Vector3<double> > TechDraw::CenterLine::calcEndPoints2Lines(TechDraw::DrawViewPart*, std::vector<std::__cxx11::basic_string<char> >, int, double, double, double, double, bool)’:
/home/balrobs/Desktop/freecad-source/src/Mod/TechDraw/App/Cosmetic.cpp:999:75: warning: unused parameter ‘flip’ [-Wunused-parameter]
  999 |                                                       double rotate, bool flip)
      |                                                                      ~~~~~^~~~
[ 93%] Building CXX object src/Mod/TechDraw/App/CMakeFiles/TechDraw.dir/PropertyGeomFormatList.cpp.o
...
I can't evaluate if it's important and if it's related to your latest changes or not so I leave it to you.
Then testing your four tools I found some strange behaviors (forgive me if I got something wrong :oops: )
  • when in a view or section there is more then one circle (see view000 and section A-A) things are displayed misaligned
  • when using the "draw cosmetic hole thread ground view" tool (see view001) the cosmetic circle is drawn at the inside of the selected circle, the same as for the "draw cosmetic screw thread ground view (see view002)
  • when using the "draw cosmetic thread hole side view" tool (see section B-B) the cosmetic lines are drawn at the inside of the selected lines, the same as for the "draw cosmetic screw thread side view" tool (see section C-C)
test_01.png
test_01.png (102.24 KiB) Viewed 6314 times
BTW the tool tip text shows "draw cosmetic crew thread side view". Probably it should show "draw cosmetic screw thread side view"
Thank you again so much for all your efforts! Can't wait to see your tools merged to master.
Attachments
test_01.FCStd
(29.11 KiB) Downloaded 99 times
edi
Posts: 481
Joined: Fri Jan 17, 2020 1:32 pm

Re: PR #4935 Adding TechDrawTools to TechDraw WB

Post by edi »

@balrobs: Thank you for testing. It is a scaling problem. You use scale 0.5.
The origin of the coordinate system is allways in the center of the view. Because of an issue in my software all created figures are shrinked to the half size.
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: PR #4935 Adding TechDrawTools to TechDraw WB

Post by balrobs »

Hi @edi,
I'm happy you already localised the problem.
As soon as there will be a patch I will test again.
Thanks for lifting TD to a new level :D
Post Reply