[BUG][0.20] "Open sketch in Section View mode" preference has no effect

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
chrisb
Veteran
Posts: 53903
Joined: Tue Mar 17, 2015 9:14 am

Re: [BUG][0.20] "Open sketch in Section View mode" preference has no effect

Post by chrisb »

openBrain wrote: Mon Jan 24, 2022 4:51 pm It means that you can have an existing sketch, not in edit mode, where View/Section View is 'true', and when you edit this sketch the section view isn't applied ?
Yes, that's the case here.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Lupin
Posts: 76
Joined: Sat Mar 13, 2021 10:55 am

Re: [BUG][0.20] "Open sketch in Section View mode" preference has no effect

Post by Lupin »

openBrain wrote: Mon Jan 24, 2022 4:51 pm It means that you can have an existing sketch, not in edit mode, where View/Section View is 'true', and when you edit this sketch the section view isn't applied ?
Yes, exactly that.

Also changing the section view while editing a sketch (hotkey Q, S), the section is applied (as you can see in my screenshots), but it does not change the "Section View" property of the sketch. Should the property update immediately or after closing the sketch?

It's as if the property and the sketcher option are setting two different parameters (with the latter not being saved to the sketch).
Last edited by Lupin on Mon Jan 24, 2022 5:38 pm, edited 1 time in total.
chrisb
Veteran
Posts: 53903
Joined: Tue Mar 17, 2015 9:14 am

Re: [BUG][0.20] "Open sketch in Section View mode" preference has no effect

Post by chrisb »

chrisb wrote: Mon Jan 24, 2022 5:09 pm Yes, that's the case here.
I forgot: I can well switch to section view if I am in Sketcher.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
kisolre
Veteran
Posts: 4159
Joined: Wed Nov 21, 2018 1:13 pm

Re: [BUG][0.20] "Open sketch in Section View mode" preference has no effect

Post by kisolre »

openBrain wrote: Mon Jan 24, 2022 4:51 pm It means that you can have an existing sketch, not in edit mode, where View/Section View is 'true', and when you edit this sketch the section view isn't applied ?
This also works here.
kisolre
Veteran
Posts: 4159
Joined: Wed Nov 21, 2018 1:13 pm

Re: [BUG][0.20] "Open sketch in Section View mode" preference has no effect

Post by kisolre »

Lupin wrote: Mon Jan 24, 2022 5:25 pm Also changing the section view while editing a sketch (hotkey Q, S), the section is applied (as you can see in my screenshots), but it does not change the "Section View" property of the sketch.
As it should not IMO. If you know that you need that for a specific sketch or for them all there are already mechanisms for that.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [BUG][0.20] "Open sketch in Section View mode" preference has no effect

Post by openBrain »

Lupin wrote: Mon Jan 24, 2022 5:25 pm Yes, exactly that.

Also changing the section view while editing a sketch (hotkey Q, S), the section is applied (as you can see in my screenshots), but it does not change the "Section View" property of the sketch. Should the property update immediately or after closing the sketch?

It's as if the property and the sketcher option are setting two different parameters (with the latter not being saved to the sketch).
This is really weird. Did you tried to disable add-ons? I absolutely can't reproduce this.
Lupin
Posts: 76
Joined: Sat Mar 13, 2021 10:55 am

Re: [BUG][0.20] "Open sketch in Section View mode" preference has no effect

Post by Lupin »

openBrain wrote: Mon Jan 24, 2022 6:00 pm This is really weird. Did you tried to disable add-ons? I absolutely can't reproduce this.
This are all the addons I have installed:
Zwischenablage-1.png
Zwischenablage-1.png (22.75 KiB) Viewed 1116 times

Disabling/uninstalling them did not change the section view problem.
chrisb
Veteran
Posts: 53903
Joined: Tue Mar 17, 2015 9:14 am

Re: [BUG][0.20] "Open sketch in Section View mode" preference has no effect

Post by chrisb »

If I set the environment variables
FREECAD_USER_HOME
FREECAD_USER_DATA
FREECAD_USER_TEMP
to a completely new directory, and create a new such model, then automatic section view works. It still fails if a sketch is opened that was written with my default directory and config in use,

So it must be something in the files.
The file SectionViewVanillaFCStd works as expected and was created in a vanilla config directory.
The file sectionView.FCStd doesn not work properly.
Attachments
sectionView.FCStd
(7.68 KiB) Downloaded 18 times
sectionViewVanilla.FCStd
(10.25 KiB) Downloaded 19 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [BUG][0.20] "Open sketch in Section View mode" preference has no effect

Post by openBrain »

chrisb wrote: Tue Jan 25, 2022 12:21 am If I set the environment variables
FREECAD_USER_HOME
FREECAD_USER_DATA
FREECAD_USER_TEMP
to a completely new directory, and create a new such model, then automatic section view works. It still fails if a sketch is opened that was written with my default directory and config in use,

So it must be something in the files.
The file SectionViewVanillaFCStd works as expected and was created in a vanilla config directory.
The file sectionView.FCStd doesn not work properly.
Congrats for this. Now I have a clue. If View/ShowSupport of the sketch is 'false', then the section doesn't work.
I'll dig based on that. ;)
Also in your case it looks like using a PartDesign/Primitive plays a role. Will narrow it down.


EDIT : After some test, it looks like having View/ShowLinks to 'false' creates the issue. EDIT2 : confirmed on different situations.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [BUG][0.20] "Open sketch in Section View mode" preference has no effect

Post by openBrain »

OK, I let this cool down because I was expecting a painful analysis.
This probably was a good idea, because with fresh eyes it took to me 10 seconds to find the problem.
But now admittedly, I feel like the worst coder ever. :lol: 2 spaces got my head. :mrgreen:

Fixed in https://github.com/FreeCAD/FreeCAD/pull/5438
Post Reply