New "Structures" Toolbar

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!
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

New "Structures" Toolbar

Post by Zolko »

Hello,

there is a general toolbar available in core FreeCAD (meaning: in all workbenches) called "Structure" and which allows to create "some" of core FreeCAD's structures: Std_Part, Std_Group, Std_Link, and Link_Group. I find this sub-optimal to say the least, unfortunately it is defined in C++ and I haven't been able to change it.

So I propose a new "Structures" toolbar, made in Python, and also available in core FreeCAD (all workbenches) and which would create the following core structures:
  • Part
  • Body
  • Sketch
  • Datum Point
  • Datum Axis
  • Datum Plane
  • Datum LCS
See proposal (I added an Asm4 assembly for demonstration): This proposal has 2 sides: make the "Structures" toolbar in python and not C++, and add core structures to it.

StructuresToolbar.png
StructuresToolbar.png (26.53 KiB) Viewed 921 times


Incidentally, we could also change the icons of datum objects, I think that the original icons are not very explicit and look more like regular line/rectangle:

DatumsIcons.png
DatumsIcons.png (9.98 KiB) Viewed 921 times
try the Assembly4 workbench for FreCAD — tutorials here and here
thyssentishman
Posts: 84
Joined: Mon May 16, 2022 10:35 am

Re: New "Structures" Toolbar

Post by thyssentishman »

Hi @Zolko ,
Zolko wrote: Thu Jul 07, 2022 6:43 am So I propose a new "Structures" toolbar
I second the proposal, as I also believe that these tools belong together. However I would maybe keep PartDesign_NewSketch out since there are more Sketch related tools (e.g. Sketcher_EditSketch or Sketcher_MapSketch) that would be left out "uncategorized". My suggestion is the following:
  • Assembly (Future default assembly?)
  • Part
  • Body
  • Group
  • Datum Point
  • Datum Axis
  • Datum Plane
  • Datum LCS
Regarding Std_Link, and Link_Group, aren't these meant to be used in assemblies? If yes, I think they should be excluded from FreeCAD's core structures and assigned only to an Assembly WB toolbar.

Lastly what about the ShapeBinder tools and PartDesign_Clone? These would also be left out "uncategorized". Personally I barely use these and think that they could be made accessible exclusively through the menu (like e.g. Sprocket or Involute Gear).

What do you think?

Kind regards,
Johannes
User avatar
obelisk79
Veteran
Posts: 1090
Joined: Thu Sep 24, 2020 9:01 pm

Re: New "Structures" Toolbar

Post by obelisk79 »

I think a change like this might be good, but it *should* result in some other considerations as cascading effects.

First, I would suggest condensing this specific proposal further as toolbars in FreeCAD collectively are already quite large.

Place all datum objects into a dropdown menu button in the following order:
Datum Plane
Datum LCS
Datum Axis
Datum Point

Also, as a byproduct of this change, should the "Part Design Helper" toolbar also be revisited? Remove New Body, and the datum object icons as they become redundant. Also, I think consideration should be made about whether or not the "Edit Sketch" icon provides common utility. I never paid its existence any attention until just now as I normally double-click a sketch in the tree to enter edit mode, but my habits may be odd in that regard. I think it may be a worthy discussion point.

Should consideration also be made to take Sketch, Map Sketch, Shape Binder, Subshape binder and clone into a global toolbar instead of a part design toolbar? Does this add consistency, convenience or functional value?
User avatar
dprojects
Posts: 722
Joined: Mon Mar 06, 2017 6:02 pm
Location: Poland
Contact:

Re: New "Structures" Toolbar

Post by dprojects »

At Woodworking workbench I have something like Cube | Part | Body | Sketch | Pad
If someone want to create Pad just should click Part too I guess? Because if you want to make array on Pad or LinkGroup this will grab the Pad content outside the Body. If you do it on Part everything will be fine.

However I have option Cube -> Pad directly. If you click any Cube you can change it directly to Pad with single click. So the 4 icons is just one icon.

The Datum plane I have before MultiTransform and Mirror because it is used only in such cases by me.

Image

Thanks
Darek
github.com/dprojects

workbench for woodworking is available at: github.com/dprojects/Woodworking
drmacro
Veteran
Posts: 8982
Joined: Sun Mar 02, 2014 4:35 pm

Re: New "Structures" Toolbar

Post by drmacro »

The Std_Part being on the left and new Body to the right has always been a point of confusion for new users.

It is normal to think that the location implies some sort of precedent of workflow. Many assume the required workflow is to create a Std_Part, then a Body, then sketch/Pad/Pocket/etc. This is fine for those who know the Std_Part is not required and is fine if you have specific need (i.e. quasi assembly).

My point is, the structures toolbar and associated things mentioned here need a more global think through to make it more sensible. This may also imply a more global think through of the base ui.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: New "Structures" Toolbar

Post by adrianinsaval »

I'm not sure if datum objects fit into the structure toolbar, I agree they should be global but for this they have to be moved from Part Design into Part so you can't avoid touching c++ if you want this, probably better on a toolbar of their own. The arbitrary change to python suggestion doesn't make sense to me.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: New "Structures" Toolbar

Post by Zolko »

thyssentishman wrote: Thu Jul 07, 2022 7:30 am However I would maybe keep PartDesign_NewSketch out since there are more Sketch related tools
Sketch is independent from PartDesign, I use them all the time in Std_Parts (as master-sketches for assemblies)

obelisk79 wrote: Thu Jul 07, 2022 9:36 am Place all datum objects into a dropdown menu button in the following order:
Datum Plane
Datum LCS
Datum Axis
Datum Point
yes, that's what Assembly4 does

Should consideration also be made to take Sketch, Map Sketch, Shape Binder, Subshape binder and clone
these are not stand-alone objects so wouldn't belong to a "Structures" toolbar

adrianinsaval wrote: Thu Jul 07, 2022 12:22 pm datum objects [...] have to be moved from Part Design into Part so you can't avoid touching c++ if you want this
Assembly4 does that already, all in python

There are 2 distinct questions here:
  • 1) should the "Structure" toolbar be a python toolbar (and not C++), and how to implement it
  • 2) what objects should be included in this toolbar
I don't know how to do (1), but once (1) is done then it's easy to change (2).
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: New "Structures" Toolbar

Post by adrianinsaval »

Sorry I didn't mean that it's not possible, I meant it won't be accepted, the core can't have a dependency on part design, only Part seems to be accepted. Making datum objects global has been discussed before and wmayer had said they can't be as long as they are in PD.

I agree it would be nice to have subshapebinders globally too.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: New "Structures" Toolbar

Post by Zolko »

adrianinsaval wrote: Thu Jul 07, 2022 1:27 pm Making datum objects global has been discussed before and wmayer had said they can't be as long as they are in PD.
OK, that gives an objective for v0.21 then !
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: New "Structures" Toolbar

Post by adrianinsaval »

Zolko wrote: Thu Jul 07, 2022 12:52 pm
  • 1) should the "Structure" toolbar be a python toolbar (and not C++), and how to implement it
IMO there is no need, this toolbar shouldn't be modified constantly so I don't think encouraging contribution via an easier language is needed, also mixing c++ and python can be complicated I believe so I'm not sure if it even brings real simplification at all.
I don't know how to do (1), but once (1) is done then it's easy to change (2).
It's easy to add to the toolbar, but like I said there seem to be other considerations to make it acceptable.
Post Reply