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
Posts: 19044
Joined: Tue Mar 17, 2015 9:14 am

Error in Mirror if contents are not visible

Postby chrisb » Sun Oct 13, 2019 10:02 pm

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 17 times
User avatar
bejant
Posts: 5940
Joined: Thu Jul 11, 2013 3:06 pm

Re: Error in Mirror if contents are not visible

Postby bejant » Mon Oct 14, 2019 6:32 pm

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
Posts: 19044
Joined: Tue Mar 17, 2015 9:14 am

Re: Error in Mirror if contents are not visible

Postby chrisb » Mon Oct 14, 2019 8:21 pm

"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?
chrisb
Posts: 19044
Joined: Tue Mar 17, 2015 9:14 am

Re: Error in Mirror if contents are not visible

Postby chrisb » Mon Oct 14, 2019 8:26 pm

I uninstalled fasteners and still don't see the messages.
User avatar
DeepSOIC
Posts: 7076
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Error in Mirror if contents are not visible

Postby DeepSOIC » Mon Oct 14, 2019 9:17 pm

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
Posts: 7076
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Error in Mirror if contents are not visible

Postby DeepSOIC » Mon Oct 14, 2019 9:30 pm

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
Posts: 1214
Joined: Tue Jan 03, 2017 10:55 am

Re: Error in Mirror if contents are not visible

Postby realthunder » Tue Oct 15, 2019 4:57 am

PR submitted here.
Try Assembly3 (latest version 0.10.2) along 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
Posts: 878
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee

Re: Error in Mirror if contents are not visible

Postby hammax » Tue Oct 15, 2019 5:45 am

… 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 296 times
Attachments
emptyMirror_2.FCStd
(18.91 KiB) Downloaded 9 times
Last edited by hammax on Tue Oct 15, 2019 9:47 am, edited 1 time in total.
chrisb
Posts: 19044
Joined: Tue Mar 17, 2015 9:14 am

Re: Error in Mirror if contents are not visible

Postby chrisb » Tue Oct 15, 2019 9:08 am

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?
User avatar
DeepSOIC
Posts: 7076
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Error in Mirror if contents are not visible

Postby DeepSOIC » Tue Oct 15, 2019 12:01 pm

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