Ticket #6000 - Part Design auto-generated Body not placed under existing Part (was: check for bug/awkwardness)

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!
Post Reply
garya
Posts: 403
Joined: Tue Nov 20, 2018 1:00 am
Location: Ovando, MT, USA

Ticket #6000 - Part Design auto-generated Body not placed under existing Part (was: check for bug/awkwardness)

Post by garya »

Wanted to check before filing a bug/request for enhancement; not sure which it is or even if it is...

OS: FreeBSD 11.2-RELEASE-p4
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.0.18.2
Build type: Release
Python version: 3.6.9
Qt version: 5.12.2
Coin version: 3.1.3
OCC version: 7.3.0
Locale: C/Default (C)

When starting a new document, if I click on the "Create a new part and make it active" and then in Part Design WB click on "Create a new body and make it active", the body is appropriately made a sub-component of the already-created Part.

However, if instead of creating the Body, I click on "Create a new sketch", select a plane, and click ok, the process creates a new Body which is NOT contained in the already-existing Part. Is this deliberate? In the absence of an existing body, shouldn't the created Body be a sub-component of the existing Part? I understand that in a complex situation one might create a new sketch with the idea of subsequently creating a new part and moving it there, but that seems an unlikely scenario.

If I don't initially create a Part but instead immediately create a Sketch, I get a Body with no enclosing Part. I understand the reasoning behind this, I think, as the Part is not strictly required.
Last edited by Kunda1 on Sat Dec 03, 2022 5:03 pm, edited 2 times in total.
Reason: Added GH ticket number to thread title
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: check for bug/awkwardness

Post by bejant »

Here FreeCAD does create the Body too and places it under Part.

20191020b.png
20191020b.png (7.12 KiB) Viewed 1439 times
Edited because I was wrong.
Last edited by bejant on Mon Oct 21, 2019 2:40 pm, edited 1 time in total.
vocx
Veteran
Posts: 5205
Joined: Thu Oct 18, 2018 9:18 pm

Re: check for bug/awkwardness

Post by vocx »

garya wrote: Sun Oct 20, 2019 11:34 pm Wanted to check before filing a bug/request for enhancement; not sure which it is or even if it is...
...
You don't have to wait for anything if it's a request. You can always make a request. Whether that is accepted or not is another matter.

I don't quite understand what you mean, but in general, a Std Part is always entirely optional; it's never required, but useful if you are going to do assemblies.

A sketch also doesn't need a PartDesign Body always. Maybe this isn't evident to you but sketches can be used by themselves in other situations, for example, together with Part tools (Part Extrude), or Arch tools (Arch Wall, Arch Window). If you use an Arch Wall, you typically don't need a PartDesign Body, nor a Std Part, so it doesn't make much sense to create either and automatically place one inside the other. It depends on your personal use, and you can always move things inside the other yourself.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
garya
Posts: 403
Joined: Tue Nov 20, 2018 1:00 am
Location: Ovando, MT, USA

Re: check for bug/awkwardness

Post by garya »

I understand the Part is optional.

What seems odd/awkward is that in one scenario the Body is placed under the part, and in the other situation it is placed at the same level as the part:
bejant wrote: Mon Oct 21, 2019 1:37 am Here FreeCAD does create the Body too and places it under Part.
No, it does not. It places the Body at the same level as Part (See your image above).

But I misspoke.

If you create a Part, then create a Body, then create a Sketch, you get the Body under the Part, and the Sketch under the Body:
Part_Body_Sketch.png
Part_Body_Sketch.png (12.64 KiB) Viewed 1432 times
But if you create a Part, then create a Sketch, you get the Body at the same level as the Part, and the Sketch under the Body:
Part_Sketch.png
Part_Sketch.png (11.96 KiB) Viewed 1432 times
It seems to me that if creating a Body places the body under the Part, then creating a Sketch which auto-generates a Body should place that body under the Part as well.
chrisb
Veteran
Posts: 51226
Joined: Tue Mar 17, 2015 9:14 am

Re: check for bug/awkwardness

Post by chrisb »

garya wrote: Mon Oct 21, 2019 3:59 am It seems to me that if creating a Body places the body under the Part, then creating a Sketch which auto-generates a Body should place that body under the Part as well.
I would second that. You had the Part in both cases activated and it should behave in both cases identical. And if the activation of Std Part has any meaning at all the body should in both cases be placed inside.

You did well to ask here in the forum, before you created a tracker ticket. Although we have officially only a guideline for creating bugs it may be even more important to discuss feature requests here before creating a ticket. Users and developers can comment so that an eventually created ticket is optimally prepared for being implemented.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
garya
Posts: 403
Joined: Tue Nov 20, 2018 1:00 am
Location: Ovando, MT, USA

Re: check for bug/awkwardness

Post by garya »

Reported as bug # 0004178
User avatar
Kunda1
Veteran
Posts: 13447
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4178 - Part Design auto-generated Body not placed under existing Part (was: check for bug/awkwardness)

Post by Kunda1 »

Updated thread title
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13447
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #6000 - Part Design auto-generated Body not placed under existing Part (was: check for bug/awkwardness)

Post by Kunda1 »

Updated thread title +
Added screenshot and example file for convenience to issue #6000
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply