I have not followed the sketcher development for a longer time. Now I came over an issue, I did not have before. But maybe I have just not observed it before. I defined two vertical length in the sketcher. The sketcher shows them as positive numbers, but in the data tab of the Sketch-data one of the number is negative.
It seems to be dependent on the direction, with which the constrained line is drawn. This issue seems to have no effect, as long as the numbers are not used elsewhere. But if the length with the negative number is used with the expressions in another sketch, then the sign starts to matter. This will result in unsolvable sketches, until there is a negation put into the expression.
The following example shows the different signs in the sketch and the data tab.
Had anyone else the same issue?
Is this the intended behavior?
Ulrich
Sketcher sign issue with Expressions
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Sketcher sign issue with Expressions
- Attachments
-
- Sketch_sign_issue2.png (126.5 KiB) Viewed 1550 times
-
- Sketch_sign_issue1.png (160.33 KiB) Viewed 1550 times
-
- Sketch_sign_issue.fcstd
- (3.17 KiB) Downloaded 34 times
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Sketcher sign issue with Expressions
It was discussed, and it's in an intermediate state AFAIR. Let's see if I can dig out that thread...
Found!
viewtopic.php?f=10&t=12701
Found!
viewtopic.php?f=10&t=12701
-
- Posts: 602
- Joined: Tue Jan 29, 2013 10:35 pm
Re: Sketcher sign issue with Expressions
This is an open issue with the expression integration in sketcher, imo. DeepSOIC has already provided the previous discussion above... I've rebased a proposed fix to latest master at https://github.com/eivindkv/free-cad-co ... ions_fixes that you can try.ulrich1a wrote:I have not followed the sketcher development for a longer time. Now I came over an issue, I did not have before. But maybe I have just not observed it before. I defined two vertical length in the sketcher. The sketcher shows them as positive numbers, but in the data tab of the Sketch-data one of the number is negative.
It seems to be dependent on the direction, with which the constrained line is drawn. This issue seems to have no effect, as long as the numbers are not used elsewhere. But if the length with the negative number is used with the expressions in another sketch, then the sign starts to matter. This will result in unsolvable sketches, until there is a negation put into the expression.
The following example shows the different signs in the sketch and the data tab.
Had anyone else the same issue?
Is this the intended behavior?
This will keep the sign stable, and most likely what we want. Another option is to rearrange the constraint points on creation, to always end up initially with a positive sign. I think the discussion stopped there, because we could not reach a decision on what to do, so I never made a pull request for this patch.
Eivind