Bug: how to lose your origin

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
MIngB
Posts: 30
Joined: Sat Jan 28, 2017 5:01 pm

Bug: how to lose your origin

Post by MIngB »

In my drawings is an quite annoying Origin problem.
Sometimes Origins where not where they should be and disappeared by chance.
OriginBug.png
OriginBug.png (11.86 KiB) Viewed 1695 times
I finally tracked it down to:

Case: Lose Origin

- create a Body with a Box
- toggle Body inactive
- hold CTRL and mark Body and Box (not Origin)
- press CTRL-C and CTRL-V
- delete new created Body001
- enjoy your Body without an origin

Case: Lose Origin content

- create a Body with a Box
- toggle Body inactive
- hold CTRL and mark Body, Box and Origin
- press CTRL-C and CTRL-V
- delete new created Body001
- enjoy your first Body with an empty origin


Is there a way to migrate my (quite big) drawings to give each Body an own Origin?


OS: Gentoo/Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15609 (Git)
Build type: Debug
Branch: (HEAD detached at a14af0f2b)
Hash: a14af0f2bd26f980d71be80a799ee48127bc7619
Python version: 3.6.5
Qt version: 5.11.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Attachments
PartDesign_CP4_Bug.FCStd
(10.19 KiB) Downloaded 44 times
freedman
Veteran
Posts: 3361
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Bug: how to lose your origin

Post by freedman »

Is there a way to migrate my (quite big) drawings to give each Body an own Origin?
Do you mean that you don't have origins for each body in your big drawing? Image attached, what you should get with every Body created.
Attachments
body1.JPG
body1.JPG (15.1 KiB) Viewed 1684 times
MIngB
Posts: 30
Joined: Sat Jan 28, 2017 5:01 pm

Re: Bug: how to lose your origin

Post by MIngB »

Just open the attached file in my first post and delete Body001.

Than you should have an Origin without geoFeatures...

I'm diving into the code right now..

doing copies like i described you get:

Code: Select all

    <Objects Count="12">
        <Object type="PartDesign::Body" name="Body" />
        <Object type="App::Origin" name="Origin" />
        <Object type="App::Line" name="X_Axis" />
        <Object type="App::Line" name="Y_Axis" />
        <Object type="App::Line" name="Z_Axis" />
        <Object type="App::Plane" name="XY_Plane" />
        <Object type="App::Plane" name="XZ_Plane" />
        <Object type="App::Plane" name="YZ_Plane" />
        <Object type="PartDesign::AdditiveBox" name="Box" />
        <Object type="PartDesign::AdditiveBox" name="Box001" />
        <Object type="App::Origin" name="Origin001" />
        <Object type="PartDesign::Body" name="Body001" />
    </Objects>
instead of

Code: Select all

    <Objects Count="18">
        <Object type="PartDesign::Body" name="Body" />
        <Object type="App::Origin" name="Origin" />
        <Object type="App::Line" name="X_Axis" />
        <Object type="App::Line" name="Y_Axis" />
        <Object type="App::Line" name="Z_Axis" />
        <Object type="App::Plane" name="XY_Plane" />
        <Object type="App::Plane" name="XZ_Plane" />
        <Object type="App::Plane" name="YZ_Plane" />
        <Object type="PartDesign::AdditiveBox" name="Box" />
        <Object type="PartDesign::Body" name="Body001" />
        <Object type="App::Origin" name="Origin001" />
        <Object type="App::Line" name="X_Axis001" />
        <Object type="App::Line" name="Y_Axis001" />
        <Object type="App::Line" name="Z_Axis001" />
        <Object type="App::Plane" name="XY_Plane001" />
        <Object type="App::Plane" name="XZ_Plane001" />
        <Object type="App::Plane" name="YZ_Plane001" />
        <Object type="PartDesign::AdditiveBox" name="Box001" />
    </Objects>
which shows, that GeoFeatures of Origin and Origin001 are shared in the first case.
These seem to be deleted by deleting Box001

Copying as I described in my first post you could also share the same Origin...

I believe there is something to improve on Copying Bodies as well as deleting Bodies eg. Origins -> There should be a check if they are shared
chrisb
Veteran
Posts: 53285
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug: how to lose your origin

Post by chrisb »

I had seen this recently: a body with a missing plane, and I had no idea how this could have happened. So it's good to see a way to reproduce. Would you create a ticket with a link to this discussion and vice versa?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
MIngB
Posts: 30
Joined: Sat Jan 28, 2017 5:01 pm

Re: Bug: how to lose your origin

Post by MIngB »

Bug reported in Mantis
chrisb
Veteran
Posts: 53285
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug: how to lose your origin

Post by chrisb »

Thank you.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Bug: how to lose your origin

Post by DeepSOIC »

The problem is, copying bodies (as well as Parts and Groups) isn't well supported yet. You'll likely encounter a lot of weirdness around that.
Post Reply