Create angle measurement to horizontal

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
mkabatek
Posts: 6
Joined: Mon Jul 27, 2020 2:50 pm

Create angle measurement to horizontal

Post by mkabatek »

Hello, I've been using FreeCad TechDraw, and it works very well. However I'm struggling with one aspect of creating angle measurements. How can I create an angle measurement that simple goes from an angle to a horizontal line if there is no line or facet in the part, or there are not three points to choose from.

I have tried creating a horizontal LeaderLine, however I cannot measure the angle from my part to the leader line. Is there some way to simply draw a horizontal line in TechDraw and measure an angle from my part to the horizontal line? Below is an image of an example:
Screen Shot 2020-07-27 at 8.55.52 AM.png
Screen Shot 2020-07-27 at 8.55.52 AM.png (54.32 KiB) Viewed 768 times
I want to add an angle measurement from my part to the horizontal where I have drawn a red circle, however I cannot find an easy way to make that happen without modifying the part. Surly there is a way to either add a horizontal line I can use to measure to, or add an arbitrary angle? Any guidance or assistance is greatly appreciated.

OS: macOS 10.15
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21514 (Git)
Build type: Release
Branch: master
Hash: 89ddab33f692a9bd739171689f9ab0eb58d64b35
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Create angle measurement to horizontal

Post by wandererfan »

mkabatek wrote: Mon Jul 27, 2020 3:02 pm How can I create an angle measurement that simple goes from an angle to a horizontal line if there is no line or facet in the part, or there are not three points to choose from.
Some useful hints in this post.

A function to create a cosmetic line from the Gui is coming. It is stacked up behind some bug fixes.
mkabatek
Posts: 6
Joined: Mon Jul 27, 2020 2:50 pm

Re: Create angle measurement to horizontal

Post by mkabatek »

wandererfan wrote: Tue Jul 28, 2020 1:43 pm
mkabatek wrote: Mon Jul 27, 2020 3:02 pm How can I create an angle measurement that simple goes from an angle to a horizontal line if there is no line or facet in the part, or there are not three points to choose from.
Some useful hints in this post.

A function to create a cosmetic line from the Gui is coming. It is stacked up behind some bug fixes.
Awesome thank you. You mentioned in that thread that you can draw a line using python in TechDraw. Can you link me to an example or resources for carrying that out without having to draw a line in 3d space for now? Either way this is very helpful information.

For anyone else coming across this thread, wandererfan's solution mentioned without writing python code is to create a line object from the part menu
Screen Shot 2020-07-28 at 11.51.00 AM.png
Screen Shot 2020-07-28 at 11.51.00 AM.png (53.09 KiB) Viewed 686 times
Screen Shot 2020-07-28 at 11.50.47 AM.png
Screen Shot 2020-07-28 at 11.50.47 AM.png (94.57 KiB) Viewed 686 times


Place the line where you want it to be in 3D space and include it inside a compound part, or just capture it in TechDraw by inserting a view with it selected. Now you can draw an angle.
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Create angle measurement to horizontal

Post by wandererfan »

mkabatek wrote: Tue Jul 28, 2020 5:56 pm You mentioned in that thread that you can draw a line using python in TechDraw. Can you link me to an example or resources for carrying that out without having to draw a line in 3d space for now?
TechDraw_API near the bottom. You're looking for "makeCosmeticLine". Note that the points are in paper space, not model space. A version that takes 3D points is in the infamous queue.
mkabatek
Posts: 6
Joined: Mon Jul 27, 2020 2:50 pm

Re: Create angle measurement to horizontal

Post by mkabatek »

Thank you so much this is very helpful.
Post Reply