Extruding Sketch in Part workbench

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!
Post Reply
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Extruding Sketch in Part workbench

Post by Joel_graff »

I don't know if it's ever been noted, but in the part workbench, I noticed what I would call an unexpected behavior when using the extrude tool on a sketch.

If I enter the length to extrude and click apply in the task panel, it naturally extrudes the sketch. However, if I then click "OK", the sketch is extruded again. It makes sense that either button would perform an extrusion, but if an extrusion has been performed once already, then it shouldn't happen again. Thus, if I click "Apply" and create an extrusion, clicking "OK" should not create a second one.

Maybe this is intended behavior, but it had me confused why I kept getting two extrusions every time I extruded a sketch :)
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Extruding Sketch in Part workbench

Post by NormandC »

Joel_graff wrote: Thu Apr 19, 2018 7:56 pm Thus, if I click "Apply" and create an extrusion, clicking "OK" should not create a second one.
It's been like this for ages. I learned not to click on Apply when using Extrude. ;)

I guess it's because clicking on Apply keeps it active to let you select another 2D profile/face to extrude. But the sketch is still selected, so clicking OK creates a new Extrude. The Close button should be used instead.
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Extruding Sketch in Part workbench

Post by Joel_graff »

NormandC wrote: Fri Apr 20, 2018 2:07 am I guess it's because clicking on Apply resets the tool and keeps it active to let you select another 2D profile/face to extrude.
That makes sense I suppose.

How about a feature request that does the following:

1. Change the "Apply" button to read "Extrude"
2. Change the "Ok" button to read "Done"
3. Disable any extrusion when clicking Ok / Done.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Extruding Sketch in Part workbench

Post by NormandC »

What about the Close button?
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Extruding Sketch in Part workbench

Post by Joel_graff »

NormandC wrote: Fri Apr 20, 2018 2:13 am What about the Close button?
I was just thinking about that, then I saw your post :lol:

Hmmm.. What if it went away entirely?

Better yet - have only two buttons - "Extrude" and "Close". Seems like that would be less confusing about what goes on under the hood.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Extruding Sketch in Part workbench

Post by DeepSOIC »

When I was coding the new extrusion dialog, I didn't change this behavior, even though I wanted to. I was afraid that some might be relying on that batch-extrude capability. E.g. it may be useful to even extrude one sketch to a few different lengths, for the columns to be dragged apart later on.

Getting rid of OK button is adding an extra click for me, as I almost exclusively extrude once.
Maybe a "continue" checkbox like in Draft will improve it? And Apply button then re-purposed to display a preview.
chrisb
Veteran
Posts: 54155
Joined: Tue Mar 17, 2015 9:14 am

Re: Extruding Sketch in Part workbench

Post by chrisb »

The text "Apply" on the button is unlucky, because this usually has the meaning of "apply to the same objects if it exists or create a new one". That's how I know it from other applications or e.g. from the Path Workbench.
An minimally invasive improvement would be to change the text on the button to show initially "Extrude", and after hitting it change the text to "Extrude another" or similar.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Extruding Sketch in Part workbench

Post by Joel_graff »

chrisb wrote: Fri Apr 20, 2018 3:47 pm The text "Apply" on the button is unlucky, because this usually has the meaning of "apply to the same objects if it exists or create a new one". That's how I know it from other applications or e.g. from the Path Workbench.
An minimally invasive improvement would be to change the text on the button to show initially "Extrude", and after hitting it change the text to "Extrude another" or similar.
I see your point about the extra click. What if clicking done/ok will trigger an extrusion only if one has not already been done? Otherwise, nothing is done. That would accommodate your one-click workflow while eliminating duplicating an extrusion that's already occurred.

The only better solution might be to enable / disable extrusion based on whether or not parameters in the panel had been changed since the last extrusion (if any).
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
chrisb
Veteran
Posts: 54155
Joined: Tue Mar 17, 2015 9:14 am

Re: Extruding Sketch in Part workbench

Post by chrisb »

Joel_graff wrote: Fri Apr 20, 2018 6:47 pm What if clicking done/ok will trigger an extrusion only if one has not already been done? Otherwise, nothing is done. That would accommodate your one-click workflow while eliminating duplicating an extrusion that's already occurred.

The only better solution might be to enable / disable extrusion based on whether or not parameters in the panel had been changed since the last extrusion (if any).
First paragraph yes, second paragraph rather no. A common use case is to hit Apply, see what happens, change the parameters and click Apply again, assuming that the previously generated object would be changed.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Extruding Sketch in Part workbench

Post by Joel_graff »

chrisb wrote: Fri Apr 20, 2018 8:46 pm A common use case is to hit Apply, see what happens, change the parameters and click Apply again, assuming that the previously generated object would be changed.
Right. No reason to change the behavior for Apply (or Extrude if it gets renamed). I think I'd only disable extrusion for Done / OK, on the condition that no parameters had been changed since the panel had been opened or the last time the Apply / Extrude button was clicked. This would eliminate a second, identical extrusion being created when closing out the panel.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Post Reply