[macro req] make line perpendicular to two non-colinear lines [pseudocode]

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
llll
Posts: 173
Joined: Fri Nov 12, 2021 1:56 am

[macro req] make line perpendicular to two non-colinear lines [pseudocode]

Post by llll »

Right now I can do it manually, but it is not parametric..
If there's a method to do this in sketcher, please show.
If someone can make macros well, please do this one :D
It's to centre a line at the intersection of two lines, no matter angle..
I've run into need to do this a few times, despite being new. But cyclic dependencies prevent
Maybe rounding errors preventing both angles being driving value? Would fixing that allow solving the cyclic dependency issue? idk

Make One half reference angle, one driving angle
Plug those values into this equation to find correct driving angle.

Code: Select all

Larger angle - lesser angle /2 = equalizer.
If larger angle == driving dimension
  	 Driving dimension = larger angle - equalizer
Elif lesser angle == driving dimension
 	 Driving dimensions = lesser angle + equalizer
Attachments
FreeCADLink_rFPgwzmX0Y.png
FreeCADLink_rFPgwzmX0Y.png (9.94 KiB) Viewed 347 times
User avatar
Roy_043
Veteran
Posts: 8550
Joined: Thu Dec 27, 2018 12:28 pm

Re: [macro req] make line perpendicular to two non-colinear lines [pseudocode]

Post by Roy_043 »

You seem to want to bisect an angle in a sketch.
Attachments
sketch-bisect-angle.FCStd
(7.15 KiB) Downloaded 17 times
sketch-bisect-angle.png
sketch-bisect-angle.png (4.95 KiB) Viewed 330 times
User avatar
Roy_043
Veteran
Posts: 8550
Joined: Thu Dec 27, 2018 12:28 pm

Re: [macro req] make line perpendicular to two non-colinear lines [pseudocode]

Post by Roy_043 »

Without partially redundant constraint.
Attachments
sketch-bisect-angle-2.FCStd
(6.89 KiB) Downloaded 12 times
Post Reply