Contraining point onto two lines in one move

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
PedjaS
Posts: 147
Joined: Sat Jan 18, 2020 6:35 pm

Contraining point onto two lines in one move

Post by PedjaS »

If I want to constrain point to crossing of two lines I have to constrain point to one line first and then repeat that to the second. Is there more optimal way?

I tried selecting point and two lines but then constraint cannot be applied. I think it is obvious that two constraints could be applied in that case speeding up the process.
Last edited by Kunda1 on Tue Aug 23, 2022 3:47 pm, edited 1 time in total.
Reason: fixed typo in thread title
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Contraining pointonto two lines in one move

Post by GeneFC »

PedjaS wrote: Mon Aug 01, 2022 12:37 pm I tried selecting point and two lines but then constraint cannot be applied.
I just tried that using a very recent version, and it worked fine.

Code: Select all

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of FreeCAD: 64-bit
Version: 0.21.29849 (Git)
Build type: Release
Branch: Master
Hash: 790bf5363e05c3de35d3c1350fd887b94f27a656
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United States (en_US)
Installed mods: 
  * FeedsAndSpeeds 0.4.0
  * FeedsAndSpeeds-master.zip
  * Help 1.0.3
  * offline-documentation
Gene
drmacro
Veteran
Posts: 8866
Joined: Sun Mar 02, 2014 4:35 pm

Re: Contraining pointonto two lines in one move

Post by drmacro »

Seems to work for me:
PointOn2Lines.gif
PointOn2Lines.gif (405.82 KiB) Viewed 1203 times


Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (XFCE/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.21.29892 (Git)
Build type: Release
Branch: master
Hash: c6ddc477331c655a30b071875c800b113d82f1b3
Python 3.9.2, Qt 5.15.2, Coin 4.0.0, Vtk 7.1.1, OCC 7.7.0.dev
Locale: English/United States (en_US)
Installed mods: 
  * ...
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Contraining pointonto two lines in one move

Post by Shalmeneser »

Sketcher_ConstrainPointOnObject works correctly in

Code: Select all

OS: Windows 10 Version 1809
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: French/France (fr_FR)
Installed mods: 
  * fasteners 0.3.50
  * fcgear 1.0.0
  * Manipulator 1.4.9
  * sheetmetal 0.2.53
I'm happy to learn a new trick today.
User avatar
PedjaS
Posts: 147
Joined: Sat Jan 18, 2020 6:35 pm

Re: Contraining pointonto two lines in one move

Post by PedjaS »

Interestingly, I tried this just before I posted and could not make it work.

Now it works! :)
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: Contraining pointonto two lines in one move

Post by NewJoker »

I usually do it by selecting all the three entities (two lines and one point) at once with a right-to-left box selection. Then I apply the constraint. Even fewer clicks.
User avatar
onekk
Veteran
Posts: 6146
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Contraining pointonto two lines in one move

Post by onekk »

PedjaS wrote: Mon Aug 01, 2022 12:37 pm If I want to constrain point to crossing of two lines I have to constrain point to one line first and then repeat that to the second. Is there more optimal way?

I tried selecting point and two lines but then constraint cannot be applied. I think it is obvious that two constraints could be applied in that case speeding up the process.
Probably if you have posted some "relevant and requested" informations as told in the post at the top starting with "IMPORTANT:":

https://forum.freecadweb.org/viewtopic.php?f=3&t=2264

We could have an idea of what version you were using, as something could be different across OS or different versions, like a "Linux distribution supplied one" or an "official AppImage" or .....

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Contraining pointonto two lines in one move

Post by GeneFC »

NewJoker wrote: Tue Aug 02, 2022 8:22 am I usually do it by selecting all the three entities (two lines and one point) at once with a right-to-left box selection. Then I apply the constraint. Even fewer clicks.
I tried this as a first attempt when this topic showed up.

It failed.

The reason was that I selected the endpoints of the lines as well as the lines themselves. The error message was that too many elements were selected.

Sooo, this works fine, but the user must be careful to avoid selecting the endpoints of the lines.

Gene
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: Contraining pointonto two lines in one move

Post by NewJoker »

GeneFC wrote: Tue Aug 02, 2022 1:54 pm Sooo, this works fine, but the user must be careful to avoid selecting the endpoints of the lines.
Yes, and it's also necessary to avoid selecting other entities (especially points) if they are nearby.
User avatar
PedjaS
Posts: 147
Joined: Sat Jan 18, 2020 6:35 pm

Re: Contraining pointonto two lines in one move

Post by PedjaS »

onekk wrote: Tue Aug 02, 2022 1:14 pm
PedjaS wrote: Mon Aug 01, 2022 12:37 pm If I want to constrain point to crossing of two lines I have to constrain point to one line first and then repeat that to the second. Is there more optimal way?

I tried selecting point and two lines but then constraint cannot be applied. I think it is obvious that two constraints could be applied in that case speeding up the process.
Probably if you have posted some "relevant and requested" informations as told in the post at the top starting with "IMPORTANT:":

https://forum.freecadweb.org/viewtopic.php?f=3&t=2264

We could have an idea of what version you were using, as something could be different across OS or different versions, like a "Linux distribution supplied one" or an "official AppImage" or .....

Regards

Carlo D.


As you are so keen on this and very proficient in scripting, here is suggestion: make a script that disallows anyone to post anything on the forum without having to post that IMPORTANT information that you require. Maybe even better - ban them.

Especially, when IMPORTANT required information is actually not needed. Just for fun.
Post Reply