[Features Requests] Sketcher Radius/Diameter presentation

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
chrisb
Posts: 37732
Joined: Tue Mar 17, 2015 9:14 am

Re: [Features Requests] Sketcher Radius/Diameter presentation

Post by chrisb »

I am happy with any solution beyond the purely horizontal line.
And I am not unhappy with the solution we have now :) .
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
bleber
Posts: 68
Joined: Thu Jun 30, 2016 5:12 pm

Re: [Features Requests] Sketcher Radius/Diameter presentation

Post by bleber »

Can Make a diàmetre or radius presentation on non circular object? Kike radius on sketch that need to be revòlvef towards Axis.
chrisb
Posts: 37732
Joined: Tue Mar 17, 2015 9:14 am

Re: [Features Requests] Sketcher Radius/Diameter presentation

Post by chrisb »

bleber wrote: Sun Aug 01, 2021 12:37 am Can Make a diàmetre or radius presentation on non circular object?
No.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Posts: 4287
Joined: Sun May 04, 2014 3:16 pm

Re: [Features Requests] Sketcher Radius/Diameter presentation

Post by abdullah »

Oh that was an interesting read. I will start review of this now. Sorry OpenBrain for the huge delay. Kudo's for the community interaction ;)
abdullah
Posts: 4287
Joined: Sun May 04, 2014 3:16 pm

Re: [Features Requests] Sketcher Radius/Diameter presentation

Post by abdullah »

I encountered a little buggy for the case of external geometry group constraining:
Screenshot_20210923_173903.png
Screenshot_20210923_173903.png (25.11 KiB) Viewed 541 times
Which should be:
Screenshot_20210923_195510.png
Screenshot_20210923_195510.png (38.37 KiB) Viewed 541 times
I have already a fix for that locally (no need to update the PR).

About the parameter name, I have changed them in my local commit to:

Code: Select all

        labelPosition = hGrp->GetFloat("RadiusDiameterConstraintDisplayBaseAngle", 15) * (M_PI / 180); // Get radius/diameter constraint display angle
        labelPositionRandomness = hGrp->GetFloat("RadiusDiameterConstraintDisplayAngleRandomness", 0) * (M_PI / 180); // Get randomness
Believe it or not, it took me a while to understand "Disp" (Disponibility?).

Then I have some minor code naming things. Like changing finishDistanceConstraint to finishDatumConstraint as now it does more than distances, giving it an additional parameter to handle the case with multiple constraints (the bug above), and some extra checking to avoid unconditionally setting/assigning the label position to all constraints. While now other constraints ignore this field, this may change and would lead to unexpected behaviour.

For the rest I think that functionality and code is ok.

Hopefully tomorrow I will test my local correction commit and will merge PR and my local commit with minor fixes.

The important bit I wanted to convey is the change of the name of the parameters, as this will go to the wiki.
openBrain
Posts: 6510
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Features Requests] Sketcher Radius/Diameter presentation

Post by openBrain »

abdullah wrote: Thu Sep 23, 2021 6:07 pm I encountered a little buggy for the case of external geometry group constraining:
Indeed. I remember I didn't think about testing this. :lol:
About the parameter name, I have changed them in my local commit
Believe it or not, it took me a while to understand "Disp" (Disponibility?).
Yes, as a non native English speaker, less vocabulary is less confusing. :) -- I'll look for this word, that is pretty the same as the French one for 'availability'. Maybe a false friend --.
Then I have some minor code naming things. Like changing finishDistanceConstraint to finishDatumConstraint as now it does more than distances...
Sounds great.
The important bit I wanted to convey is the change of the name of the parameters, as this will go to the wiki.
Very good idea, I probably wouldn't have check for an extra commit when documenting. :P
abdullah
Posts: 4287
Joined: Sun May 04, 2014 3:16 pm

Re: [Features Requests] Sketcher Radius/Diameter presentation

Post by abdullah »

There was another thing. This seems to be intended for circles, but not for arcs:
Screenshot_20210924_063312-1.png
Screenshot_20210924_063312-1.png (18.43 KiB) Viewed 427 times
I modified it so that arcs are excluded:
Screenshot_20210924_064103.png
Screenshot_20210924_064103.png (49.66 KiB) Viewed 427 times
abdullah
Posts: 4287
Joined: Sun May 04, 2014 3:16 pm

Re: [Features Requests] Sketcher Radius/Diameter presentation

Post by abdullah »

git commit 873e0977cae84d96153ba6040fe7601a73ce5f1e
openBrain
Posts: 6510
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Features Requests] Sketcher Radius/Diameter presentation

Post by openBrain »

I'll document in the coming hours. ;)
User avatar
M4x
Posts: 792
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: [Features Requests] Sketcher Radius/Diameter presentation

Post by M4x »

Thanks to everybody involved! I've to admit I love free software! :mrgreen:
Post Reply