Union failure

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!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Union failure

Post by sgrogan »

diep wrote:That is interesting it renders ok for you, as your signature says you use the nearly same FreeCAD 0.16 version as i tried for this as well.
Only difference is linux versus windows.
The file renders properly for me on Win. Using bejant's Refine shape for me, the fusion still fails. Using bejant's file and doing a ForceRecompute makes the fusion fail. Ubuntu is oce 0.17.1, Win is oce 0.17.0. Using a Win developer snapshot (OCCT 7.0) the model renders and the fusion succeeds without doing anything.
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
"fight the good fight"
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Union failure

Post by bejant »

diep wrote:With the openscad referal you mean you loaded it in another program first prior to FreeCAD?
No, I just changed to the OpenSCAD WB to do the Refine Shapes. The Refine Shape in the OpenSCAD WB creates objects that are parametrically linked to the parent objects, so that if previous portions of the model are changed, then the Refine Shapes update. The Part WB > Refine Shape creates a dumb object that is frozen in time and does not update if a previous portion of the model is changed.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Union failure

Post by easyw-fc »

bejant wrote:
diep wrote:With the openscad referal you mean you loaded it in another program first prior to FreeCAD?
No, I just changed to the OpenSCAD WB to do the Refine Shapes. The Refine Shape in the OpenSCAD WB creates objects that are parametrically linked to the parent objects, so that if previous portions of the model are changed, then the Refine Shapes update. The Part WB > Refine Shape creates a dumb object that is frozen in time and does not update if a previous portion of the model is changed.
I missed that! thanks

PS it seems that OpenSCAD has some problems in windows

Code: Select all

Cannot find icon: python
Cannot find icon: python
Traceback (most recent call last):
  File "C:\FreeCAD\Mod\OpenSCAD\OpenSCADFeatures.py", line 234, in execute
    import OpenSCADUtils
  File "C:\FreeCAD\Mod\OpenSCAD\OpenSCADUtils.py", line 33, in <module>
    _encoding = QtGui.QApplication.UnicodeUTF8
<type 'exceptions.NameError'>: name 'QtGui' is not defined
I solved the executing error adding

Code: Select all

import PySide
from PySide import QtGui, QtCore
to OpenSCADUtils.py

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9528 (Git)
Build type: Release
Branch: master
Hash: 4efd3e894a9d3c1954603c60c411d434506d44e7
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
missing-icons.png
missing-icons.png (48.96 KiB) Viewed 1002 times
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Union failure

Post by sgrogan »

easyw-fc wrote:I solved the executing error adding

Code: Select all
import PySide
from PySide import QtGui, QtCore

to OpenSCADUtils.py
I don't need to do this, I do have the missing icons, I have OpenSCAD installed and the path set in FreeCAD Prefs. With OpenSCAD installed you can do boolean operations on meshes in FreeCAD.
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9528 (Git)
Build type: Release
Branch: master
Hash: 4efd3e894a9d3c1954603c60c411d434506d44e7
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
"fight the good fight"
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Union failure

Post by easyw-fc »

sgrogan wrote: I don't need to do this, I do have the missing icons, I have OpenSCAD installed and the path set in FreeCAD Prefs. With OpenSCAD installed you can do boolean operations on meshes in FreeCAD.
command 'OpenSCAD_RemoveSubtree'

Code: Select all

Running the Python command 'OpenSCAD_RemoveSubtree' failed:
Traceback (most recent call last):
  File "C:\FreeCAD\Mod\OpenSCAD\OpenSCADCommands.py", line 241, in Activated
    import OpenSCADUtils,FreeCADGui
  File "C:\FreeCAD\Mod\OpenSCAD\OpenSCADUtils.py", line 35, in <module>
    _encoding = QtGui.QApplication.UnicodeUTF8

name 'QtGui' is not defined
command 'Remove Fusion' is fine

command 'mesh Boolean -> union'

Code: Select all

Traceback (most recent call last):
  File "C:\FreeCAD\Mod\OpenSCAD\OpenSCADCommands.py", line 368, in doboolean
    from OpenSCADUtils import meshoponobjs
  File "C:\FreeCAD\Mod\OpenSCAD\OpenSCADUtils.py", line 35, in <module>
    _encoding = QtGui.QApplication.UnicodeUTF8
NameError: name 'QtGui' is not defined
command 'add openscad element'

Code: Select all

Traceback (most recent call last):
  File "C:\FreeCAD\Mod\OpenSCAD\OpenSCADCommands.py", line 295, in addelement
    import OpenSCADUtils, os
  File "C:\FreeCAD\Mod\OpenSCAD\OpenSCADUtils.py", line 35, in <module>
    _encoding = QtGui.QApplication.UnicodeUTF8
NameError: name 'QtGui' is not defined
please note that I have many releases of FC (0.15,0.16,0.17) not installed but just unzipped and OpenSCAD unzipped too (and configured in preferences)

FC 0.16 and 0.15 don't have this bug
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

OS: Windows 8
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4671 (Git)
Branch: releases/FreeCAD-0-15
Hash: 244b3aef360841646cbfe80a1b225c8b39c8380c
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Post Reply