Error in Mirror if contents are not visible

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!
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Error in Mirror if contents are not visible

Post by chrisb »

I have created a complicated body which I have mirrored completely in Part workbench. If no feature is visible in the body, then the mirror fails with the message

Code: Select all

5.6e-08 <App> Document.cpp(3462): Failed to recompute emptyMirror#Part__Mirroring: Cannot mirroR empty shape
Recompute failed! Please check report view.
File is attached.

It used to work in:

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17681 (Git)
Build type: Release
Branch: master
Hash: e94af7ff5e873f263cac51d7d47df68eca183250
Python version: 3.7.3
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)

It is not working in:
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18524 (Git)
Build type: Release
Branch: master
Hash: bea009c1d52b97655dab2d5c0fbddec30989a902
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
Attachments
emptyMirror.FCStd
(11.7 KiB) Downloaded 29 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Error in Mirror if contents are not visible

Post by bejant »

I don't know if this is related or not, but when I open your file I see this in the Report View:
Thread size out of range
Thread size out of range
No extension found of type 'PartGui::ViewProviderAttachExtension'
No extension found of type 'PartGui::ViewProviderAttachExtension'


And "Body (Mirror #1)" has the white-exclamation-point-in-red-circle error icon in the history tree.

OS: Ubuntu 16.04.6 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Re: Error in Mirror if contents are not visible

Post by chrisb »

"No extension found ..." comes from some extension during the 0.19 development cycle.

I have no Idea where the "Thread size" message comes from. I don't see it here. I see it regularly if I use Fasteners. But that's not used here at all.
Do you have Fasteners installed?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Re: Error in Mirror if contents are not visible

Post by chrisb »

I uninstalled fasteners and still don't see the messages.
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: Error in Mirror if contents are not visible

Post by DeepSOIC »

Seems like a bug in Part.getShape, as Shape property of Body still gives the correct shape. Interestingly, the outcome also depends on if Body is in Through or Tip display mode: if in Tip, the mirror works, BUT, the body can't be made visible.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Error in Mirror if contents are not visible

Post by DeepSOIC »

The interesting stuff appears to be happening in _getTopoShape() routine found in PartFeature.cpp.

The problem is, it's :shock: :shock: :shock: :shock: long. And complicated.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Error in Mirror if contents are not visible

Post by realthunder »

PR submitted here.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Error in Mirror if contents are not visible

Post by hammax »

… I remade the "complex body" also in PartWB and this time the original Mirror-Part becomes visible
- without mirroring the PartWB-Body.
- perhaps it was only lonely!

emptyMirr.PNG
emptyMirr.PNG (17.7 KiB) Viewed 1016 times
Attachments
emptyMirror_2.FCStd
(18.91 KiB) Downloaded 17 times
Last edited by hammax on Tue Oct 15, 2019 9:47 am, edited 1 time in total.
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Re: Error in Mirror if contents are not visible

Post by chrisb »

hammax wrote: Tue Oct 15, 2019 5:45 am … I remade the "complex body" also in PartWB and this time the original Mirror-Part becomes visible
Can you upload that file please?
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: Error in Mirror if contents are not visible

Post by DeepSOIC »

realthunder wrote: Tue Oct 15, 2019 4:57 am PR submitted here.
Thanks!!
Post Reply