I had a master plan on this. It included:
* reference-dimension constraints (thanks to Abdullah, we have them, and I nudged him to the right direction for supporting the next pieces of the plan)
* expression constraint. It is to define an expression using reference dimensions as variables. This can be replaced by a few math constraints, like ratio, sum, maybe something else to avoid messing with expression parsing... but expressions is the preferred way to go.
This should be some massive power. Things like length ratios, belts, angle equality become easily possible. Problem is, I'm not coding it yet .
I remember someone (I think it was ickby) pointed out there is some expression toolkit in OpenCascade, with support of derivatives. That sounds very promising, but I haven't looked into it yet, and it's unlikely to happen any time soon I'm afraid.
Length constraint is still a necessity, though, and there is no reason for not implementing it now .
Feature request: equality constraint between lines and arcs in the Sketcher
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 54
- Joined: Thu May 15, 2014 11:51 am
Re: Feature request: equality constraint between lines and arcs in the Sketcher
Thanks!DeepSOIC wrote: Length constraint is still a necessity, though, and there is no reason for not implementing it now .
-
- Posts: 54
- Joined: Thu May 15, 2014 11:51 am
Re: Feature request: equality constraint between lines and arcs in the Sketcher
This was the hint! You actually can constrain the length of a line to the length of an arc in the same sketch via the expression:triplus wrote: P.S. I am wondering if expressions could be used in combination with existing constraints. I guess it depends on the use case.
Code: Select all
Sketch.Shape.Edge1.Length
This is what I was looking for, thank you!
Re: Feature request: equality constraint between lines and arcs in the Sketcher
You're welcome.chrili_rakete wrote:This is what I was looking for, thank you!
-
- Posts: 602
- Joined: Tue Jan 29, 2013 10:35 pm
Re: Feature request: equality constraint between lines and arcs in the Sketcher
My gut feeling (as I have not tested this) is that this is not going to be stable, as the geometry is updated after the solver has finished its computations.chrili_rakete wrote: This was the hint! You actually can constrain the length of a line to the length of an arc in the same sketch via the expression:where Edge1 is the arc in the sketch.Code: Select all
Sketch.Shape.Edge1.Length
This is what I was looking for, thank you!
(I think you just found a loop-hole in the dependency tracking in freecad's expression system, and I'd consider that a bug...)
Eivind