That indeed would justify a lot of effort!
Feature Request: Extend equality restriction in the sketcher.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Feature Request: Extend equality restriction in the sketcher.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Feature Request: Extend equality restriction in the sketcher.
What would be the next step(s) for this request to be considered for a possible implementation?
I have uploaded many FreeCAD video tutorials to my YouTube channel
Re: Feature Request: Extend equality restriction in the sketcher.
Let's discuss this here a bit further and then write a constructive feature request. Can you give examples where the new proportional constraint would prevent flipping?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Feature Request: Extend equality restriction in the sketcher.
Lets see if the attached files fulfill the the Idea (hipothesis).
Consider first the file equality.FCStd.
The fully constrained sketch severalLocalSolutionsSketch has several local solutions , one of them is the shown one.
It has a constraint named totaLength.
Suppose that the length named aQuarterOfTotalLength is desired be equal to tolalLength/4.
If totalLength is modified from its initial value of 200mm to 20mm, the sketch flips and aQuarterOfTotalLength length would be equal to tolalLength/2 (=10 mm in this case)
Now consider the file proportionalTest.FCStd:
Three of four small horizontal lines have equality constraints and one of them has has a constraint aQuarterOfTotalLength equal to tolalLength/4.
- Now in the sketch proportionalitySketch, modify the constraint tolalLength from 200 mm to 20 (and recompute).
- We see that proportionalitySketch does not flips and we get the desired solution: aQuarterOfTotalLength keeps its value equal to (the current value of) tolalLength/4.
- Attachments
-
- equality.FCStd
- (6.32 KiB) Downloaded 20 times
-
- proportionality.FCStd
- (6.34 KiB) Downloaded 22 times
Last edited by jruiz on Mon Apr 20, 2020 2:56 pm, edited 2 times in total.
I have uploaded many FreeCAD video tutorials to my YouTube channel
Re: Feature Request: Extend equality restriction in the sketcher.
With the attached file aSlightlyDifferentProportionalityTest.FCStd a slightly proportionality test from the one made before with proportionalityTest.FCStd file can done.
Modify again the constrained dimension totalLength from its current value of 200 mm to 20 mm and recompute the sketch: The sketch does not flip and the porportion between the dimension keep unaltered.
Just made this sketch to highlight a little more what this "proportionality" restriction could made for the sketches...
- Attachments
-
- aSlightlyDifferentProportionalityTest.FCStd
- (6.56 KiB) Downloaded 20 times
I have uploaded many FreeCAD video tutorials to my YouTube channel
Re: Feature Request: Extend equality restriction in the sketcher.
Reduced unit:
As I mentioned in a previous message, this "proportionality" restriction could be used for defining what is called in other fields of sciences, Reduced Units.
Adopting this way of working, by setting a reduced unit, the sketches can be resized immediately (modifying just one parameter) and without the risk for the skecth to flip.
In the attached file reducedUnits.FCStd, edit the sketch and modify several times the constraint named reducedUnit as you want, then recompute the sketch each time and watch the effect caused on the sketch.
As you see, there are several dimensions shown in the sketch. With the "proportionality" restriction just one dimension would be shown. The other ones would be replaced by a small symbol (i. e. like the one used for equality restriction) indicating that such restrictions are being used.
- Attachments
-
- reducedUnits.FCStd
- (6.68 KiB) Downloaded 17 times
I have uploaded many FreeCAD video tutorials to my YouTube channel
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Feature Request: Extend equality restriction in the sketcher.
i'm all for.
I've been meaning to make it for a long time actually, along with equality/ratio constraint for arbitrary datums such as angles. Still haven't got to it =(
I've been meaning to make it for a long time actually, along with equality/ratio constraint for arbitrary datums such as angles. Still haven't got to it =(
Re: Feature Request: Extend equality restriction in the sketcher.
Sorry for being late, but this topic deserves more than just a short reply.
Consider a lid of a case. The width of a wall of the box is always 10mm. For different sized boxes I want to change the 200mm to some other value, e.g. 20. Then the Sketch can flip (alas, today it doesn't, but a flipped sketch would have the same set of constraints) and a proportional constraint would not help.
I think you uploaded the wrong file, it doesn't have the promised 1/4 length and thus flips here as well, but I get the point. So in these cases a proportional constraint can help. However, it does not solve the flipping completely.jruiz wrote: ↑Sat Apr 18, 2020 3:46 pm Now consider the file proportionalTest.FCStd:
Three of four small horizontal lines have equality constraints and one of them has has a constraint aQuarterOfTotalLength equal to tolalLength/4.
- Now in the sketch proportionalitySketch, modify the constraint tolalLength from 200 mm to 20 (and recompute).
- We see that proportionalitySketch does not flips and we get the desired solution: aQuarterOfTotalLength keeps its value equal to (the current value of) tolalLength/4.
Consider a lid of a case. The width of a wall of the box is always 10mm. For different sized boxes I want to change the 200mm to some other value, e.g. 20. Then the Sketch can flip (alas, today it doesn't, but a flipped sketch would have the same set of constraints) and a proportional constraint would not help.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Feature Request: Extend equality restriction in the sketcher.
It was the file I wanted to send.
What length do you get when you change the value of totalLength constraint from 200 mm to 20 mm? (I get 5 mm here)
Did you recompute the sketch?
The sketch seems to be flipped before the recomputation is made.
I agree with you
I agree with you again
I "knew"/felt that something was missing.
This "porportionality" restriction along does not make the whole work of preventing the flipping of the sketches.
Another restriction, call it by now appending restriction, to cover (I hope) all flanks in total, is needed.
Let me try to explain what I am talking about using your example:
In the sketch of attached file appendingConstraint.FCStdchrisb wrote: ↑Mon Apr 20, 2020 7:19 am The width of a wall of the box is always 10mm. For different sized boxes I want to change the 200mm to some other value, e.g. 20. Then the Sketch can flip (alas, today it doesn't, but a flipped sketch would have the same set of constraints) and a proportional constraint would not help.
There exist an appending constraint betwee totalWidth and partialWidth.
That is totalWidth = partialWidth + 10mm (10mm is what you want to keep as a constant )
So another feature request was born:
Feature request: Appending restriction.
How difficult would it be to implement an Appending restriction between to dimensions La, Lb and a third parameter P, so that La be equal to Lb + P?
La = Lb + P.
PS: Maybe these constraints could be combined in just one, call it linearity restriction ... but it seems not to be the right time to request for it now
- Attachments
-
- appendingConstraint.FCStd
- (6.07 KiB) Downloaded 19 times
Last edited by jruiz on Mon Apr 20, 2020 1:31 pm, edited 1 time in total.
I have uploaded many FreeCAD video tutorials to my YouTube channel