Structure toolbar and datums

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!
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Structure toolbar and datums

Postby triplus » Sat Jan 25, 2020 9:47 pm

Structure.png
Structure.png (21.7 KiB) Viewed 388 times
Thinking about possible future FreeCAD development direction.
  • Should datum features be added to the structure toolbar.
  • Should the error message be omitted.
  • Who is capable and prepared to do it.
Please share your opinion.
vocx
Posts: 3344
Joined: Thu Oct 18, 2018 9:18 pm

Re: Structure toolbar and datums

Postby vocx » Sun Jan 26, 2020 1:29 am

triplus wrote:
Sat Jan 25, 2020 9:47 pm
...
[*]Should the error message be omitted.
[*]Who is capable and prepared to do it.[/list]
I think this has been mentioned several times. There is no limitation about the datum objects being outside of a PartDesign Body. It's just that they were developed together with the re-work of the PartDesign Workbench in 0.17, so at that time they were envisioned to work inside the Body.

Now with an improved Std_Part, with the new App Link and Assembly4, it seems that it really makes sense that the datum objects are a general structural element available in every workbench.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
chrisb
Posts: 22532
Joined: Tue Mar 17, 2015 9:14 am

Re: Structure toolbar and datums

Postby chrisb » Sun Jan 26, 2020 6:32 am

Here are some macros for creation of datum geometry outside of PartDesign: https://forum.freecadweb.org/viewtopic. ... 40#p304740.
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: Structure toolbar and datums

Postby triplus » Sat Feb 01, 2020 6:25 pm

adrianinsaval
Posts: 166
Joined: Thu Apr 05, 2018 5:15 pm

Re: Structure toolbar and datums

Postby adrianinsaval » Sat Feb 01, 2020 11:10 pm

triplus wrote:
Sat Jan 25, 2020 9:47 pm
  • Should datum features be added to the structure toolbar.
  • Should the error message be omitted.
I believe they should! Hope someone does it, sadly I don't know enough python/C++ or I would have done it.
User avatar
Zolko
Posts: 726
Joined: Mon Dec 17, 2018 10:02 am

Re: Structure toolbar and datums

Postby Zolko » Sun Feb 02, 2020 11:31 am

triplus wrote:
Sat Jan 25, 2020 9:47 pm
  • Should datum features be added to the structure toolbar.
  • Should the error message be omitted.
  • Who is capable and prepared to do it.
1) yes

2) yes

3) me: it's already available in Assembly4, the only question is how you want this function to behave. In Assembly4, if an App::Part is selected, then the datum object is created inside that particular App::Part container. It would be easy to add the same functionality for Body containers. If nothing is selected, or if something else than a Part or Body is selected, the datum is created at the root of the document.

4) While we're at it: shouldn't here also be a possibility to create FeaturePython objects, like the Variables thing in Assembly4 ? Many people seem to like that feature, it's like a spreadsheet but simpler. It can hold variable values, but also helper functions, calculations, placements, text...
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: Structure toolbar and datums

Postby triplus » Sun Feb 02, 2020 2:52 pm

Zolko wrote:
Sun Feb 02, 2020 11:31 am
3) me: it's already available in Assembly4, the only question is how you want this function to behave. In Assembly4, if an App::Part is selected, then the datum object is created inside that particular App::Part container. It would be easy to add the same functionality for Body containers. If nothing is selected, or if something else than a Part or Body is selected, the datum is created at the root of the document.
This are i guess implementation details, once we get a brave enough developer on board. Likely hierarchy being active Body -> active Part -> global CS. Unless something is selected, that automatically takes priority.
While we're at it: shouldn't here also be a possibility to create FeaturePython objects, like the Variables thing in Assembly4 ? Many people seem to like that feature, it's like a spreadsheet but simpler. It can hold variable values, but also helper functions, calculations, placements, text...
Better to discuss this elsewhere. For now this thread should stay on the subject and more in the lines of "+1" or "-1", with a bit of personal opinion and details involved. On why something would or wouldn't make sense for somebody, regarding the initial proposition. The rest is out of scope, for now.
User avatar
Zolko
Posts: 726
Joined: Mon Dec 17, 2018 10:02 am

Re: Structure toolbar and datums

Postby Zolko » Sun Feb 02, 2020 8:31 pm

Zolko wrote:
Sun Feb 02, 2020 11:31 am
triplus wrote:
Sat Jan 25, 2020 9:47 pm
  • Who is capable and prepared to do it.
3) me: it's already available in Assembly4
I was too fast: the Structure toolbar is coded in C++ not Python, I won't be able to add those functions there. Sorry
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: Structure toolbar and datums

Postby triplus » Sun Feb 02, 2020 9:16 pm

No problem and thanks for trying.

P.S. Best to do that in the next development cycle anyway.