Tangent Constraint seems wrong

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
rich61
Posts: 156
Joined: Sat Jul 20, 2019 9:56 am

Tangent Constraint seems wrong

Post by rich61 »

FreeCAD 0.18.2 -- 3 JPG images attached.

First I draw two over lapping rectangles.
Rectangles1.jpg
Rectangles1.jpg (5.62 KiB) Viewed 735 times
Then I use the trim tool to remove a line segment. Its OK.
Rectangles2.jpg
Rectangles2.jpg (4.18 KiB) Viewed 735 times
Then I trim a 2nd line.
Rectangles3.jpg
Rectangles3.jpg (6.12 KiB) Viewed 735 times
Notice that now a 'Tangent Constraint appears below the two horizontal lines.

This seems wrong. A horizontal constraint would be correct.

Can someone help explain this ? Thanks.

Rich
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Tangent Constraint seems wrong

Post by openBrain »

Hi rich61, welcome on the forum.

That's a bit of maths but actually it's correct.
Doing it short, a tangency between 2 lines means they are colinear, which is the expected. ;)
There have been discussions in the past about making it clearer, but nothing get out of them ATM. :)
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Tangent Constraint seems wrong

Post by jmaustpc »

please also understand that Sketcher Trim tool is something that you should not normally need to use. In ten years I have never once personally found a need or use case for it. If you are operating sketcher as a sketcher with constraints etc. why would you ever use Trim? It seems to me that its just people coming from old fashioned 2d CAD trying to use this old way of drawing that really very rarely makes sense in modern 3d modelling.

for example
rich61 wrote: Sat Jul 20, 2019 10:20 am First I draw two over lapping rectangles.
Why would you do that? Why not just create the outline with a PolyLine?

Trim has to guess what out come you want, it generally does reasonably well at doing so, but you are asking for problems. Best to just model what you want in the first place, in most cases.
rich61
Posts: 156
Joined: Sat Jul 20, 2019 9:56 am

Re: Tangent Constraint seems wrong

Post by rich61 »

Thank you openBrain, mathematically correct, it is tangent. I played with Alibre long ago, and they had a colinear constraint I think. Had an icon like this -- -- I feel better knowing that it is correct, but it is still a bit jarring to think of anything tangent without a curve.

jmaustpc, I will try to get used to not using trim, it used to be one of my favorite tools. I imagine that trim produces lots of fixups in the data base also.

Just learning,

Thanks
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Tangent Constraint seems wrong

Post by bejant »

rich61 wrote: Sat Jul 20, 2019 10:20 am Notice that now a 'Tangent Constraint appears below the two horizontal lines.

This seems wrong. A horizontal constraint would be correct.
Hi rich61 and welcome! In your example a Horizontal Constraint would only be partially correct because in order to keep the line segments co-linear (without using a Tangency Constraint) you'd still have to apply a Point On Edge Constraint.

And, of course, the added Tangency Constraint also works if you Trim a line segment that isn't only Horizontal or Vertical.


jmaustpc wrote: Sat Jul 20, 2019 12:25 pm for example
rich61 wrote: Sat Jul 20, 2019 10:20 am First I draw two over lapping rectangles.
Why would you do that? Why not just create the outline with a PolyLine?
I can create the Sketch much faster that way. I guess Normand thinks so too:
phpBB [video]
rich61
Posts: 156
Joined: Sat Jul 20, 2019 9:56 am

Re: Tangent Constraint seems wrong

Post by rich61 »

I don't know anything about how the CAD data is structured and how it is modified as we make edit changes. The polyline method might be cleaner. But I still like trim, sometimes the easiest way to make sure you connect something is to go beyond it then trim.

I also am happy to know that tangent is also co-linear. I drew a horizontal line and then a second one to the right and above and applied the tangent constraint to both, and they lined up. Then I created a first horizontal line then a second angled line, and the tangent constraint lined them up and made the second horizontal also.

I would never have guessed that tangent = co-incident. It would be cheap to just add another icon to the constraints menu for co-incident [ -- -- ].

Great to learn that tip on the forum today.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Tangent Constraint seems wrong

Post by openBrain »

rich61 wrote: Sat Jul 20, 2019 3:38 pm But I still like trim, sometimes the easiest way to make sure you connect something is to go beyond it then trim.
As said by jmaustpc, I also believe it is more a method coming from the old 2D drafting. :)
The surest method to get coincidence is to select both endpoints and set ... coincidence constraint. :lol:
An advantage of that is if you choose tangent instead of coincidence, you'll have both constraints (tangency + coincidence) in one shot. Same apply choosing perpendicular instead of coincidence. ;)
I would never have guessed that tangent = co-incident. It would be cheap to just add another icon to the constraints menu for co-incident [ -- -- ].
I did a first proposal here in the past => https://forum.freecadweb.org/viewtopic. ... 10#p292977
I never had much feedback, and shall admit that I put that in stand by... I'll try to open the ticket soon so this isn't lost.
If you're interested in going a bit further, in the same thread @abdullah explained haw line-line tangency is implemented inside the solver. ;)
rich61
Posts: 156
Joined: Sat Jul 20, 2019 9:56 am

Re: Tangent Constraint seems wrong

Post by rich61 »

openBrain

I read the post you referenced.

H: Considering a line is an arc with an infinite radius, that's pretty normal that tangency leads to colinearity.

That made the light go on. :)

Rich
Post Reply