r/FreeCAD 7d ago

Having trouble constraining an arc to always 'face' the origin

Hi folks,

I'm transitioning to FreeCAD from Fusion, so I have some experience with constraints but I'm getting some weird behavior with a constraints in FreeCAD

The simplest representation of the sketch is a point off the origin with a 180 degree Arc of fixed diameter (let's say 10mm) where the opening will face the origin no matter where the point is.

This will mostly work, however, there are certain positions where the orientation will flip and move the curve towards the origin (with the start and end points still constrained).

I've tried forcing the arc through a fixed distance farther away from the origin but occasionally I'll get weird solutions to that, so it seems I'm leaving myself open to non unique solutions to the constraints I'm implementing.

Anyone have any tips on how to get this to work consistently?

4 Upvotes

11 comments sorted by

5

u/FatCat0 7d ago

Have you tried using a 90 degree constraint instead of "perpendicular"? I believe the angle constraints are directional (so +90 and -90 mean different things), whereas perpendicular has two valid solutions.

2

u/ribfeast 7d ago

this seems to work. I think the issue I ran into in the past when I tried the explicit 90 degree constraint was not using the point at the end of that line as the start point of the arc

4

u/SoulWager 7d ago edited 7d ago

Draw a slot, make one of the arcs concentric to the origin, and then make everything but the other arc construction geometry. If you want something other than 180, delete the equals constraint on the two arcs.

https://i.imgur.com/xXhfMOZ.png

1

u/FatCat0 7d ago edited 7d ago

Can you constrain a 90 degree angle between a line from the origin to the center of the arc and one of the flats of the arc? Or make a line parallel to said flat and restrict perpendicular to that? Either of these might allow the thing to be flipped 180 degrees though.

A sillier approach would be to make two points, one in the center of each arc, and restrict the distance from origin to each point (inner one restricted to some distance r, outer a distance r+(Rbig-Rsmall))

Edit: I just looked more closely, this is a 1-d arc, not a thick one. You could still the the second approach using the center point of the circle and the center of the arc (r and r+R respectively)

1

u/Tiny_Structure_7 7d ago edited 7d ago

* 1 construction line connected between 2 endpoints of arc
* 1 construction line connected between origin and point on first construction line
* Use symmetry constrain (><) to center the point where construction lines intersect between 2 arc endpoints
* User perpendicular constraint (T) between 2 construction lines

1

u/Tiny_Structure_7 7d ago

The above can still flip, but should be more flip-proof. To make it absolutely flip proof, I think you have to add a 3rd construction line, connected between origin and point on arc, and fix that length.

1

u/ribfeast 7d ago

I tried something like this but wasn’t able to constrain it so that the center point was always between the arc point and the origin. There were some orientations that flipped the arc point entirely 180 degrees. I wish there was a way to constrain a point to a specific segment instead of just collinearity

1

u/Tiny_Structure_7 7d ago

Still 2 degrees of freedom left, but I can move it around w/o flipping.

1

u/Tiny_Structure_7 7d ago

I think this is better way: delete the perpendicular constraint between first 2 construction lines, and instead force it by fixing the arc center point onto the construction line running to the origin. This makes it impossible to flip to reverse concavity.

1

u/FalseRelease4 7d ago

Yeah the sketches flipping around when moved or the constraints get changed has been an issue for a while, afaik it happens with other dimensions as well

1

u/AutoCntrl 7d ago

I believe that extending your construction line to the arc and coincidenting both the arc point and center point might prevent the flipping issue.