Arch CutPlane - Error: tuple index out of range

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!
wolfcastle
Posts: 5
Joined: Mon Feb 27, 2017 9:17 pm

Arch CutPlane - Error: tuple index out of range

Postby wolfcastle » Wed Jun 14, 2017 11:09 am

Hello Experts,

I have a slight problem with Arch CutPlane, I just wasted 4 hours getting it to work, but to no avail.

In the attached drawing, when I select in the following order "axle" then "Rectangle001", and follow the instructions here https://www.freecadweb.org/wiki/Arch_CutPlane I get this error:

Traceback (most recent call last):
File "/usr/lib/freecad/Mod/Arch/ArchCutPlane.py", line 109, in previewCutVolume
cutVolume = ArchCommands.getCutVolume(FreeCADGui.Selection.getSelectionEx()[1].SubObjects[0], FreeCADGui.Selection.getSelectionEx()[0].Object.Shape)
IndexError: tuple index out of range
Running the Python command 'Arch_CutPlane' failed:
Traceback (most recent call last):
File "/usr/lib/freecad/Mod/Arch/ArchCutPlane.py", line 69, in Activated
panel=_CutPlaneTaskPanel()
File "/usr/lib/freecad/Mod/Arch/ArchCutPlane.py", line 88, in __init__
self.previewCutVolume(self.combobox.currentIndex())
File "/usr/lib/freecad/Mod/Arch/ArchCutPlane.py", line 109, in previewCutVolume
cutVolume = ArchCommands.getCutVolume(FreeCADGui.Selection.getSelectionEx()[1].SubObjects[0], FreeCADGui.Selection.getSelectionEx()[0].Object.Shape)


I really need this feature, any suggestions?

UPDATE: I tried installing FreeCAD on two more machines, one of them being a 32 bit ubuntu 17.04. The problem persists now on all three machines.

And here is my FreeCAD info:

OS: Ubuntu 16.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6710 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: f8eca0f9311f07c125dd6742a607724c1fa0b77c
Python version: 2.7.12+
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Attachments
sample_1.fcstd
(6.76 KiB) Downloaded 26 times
Last edited by wolfcastle on Wed Jun 14, 2017 1:28 pm, edited 1 time in total.
User avatar
bejant
Posts: 5940
Joined: Thu Jul 11, 2013 3:06 pm

Re: Arch CutPlane - Error: tuple index out of range

Postby bejant » Wed Jun 14, 2017 11:39 am

I can't reproduce your problem, so I don't have any suggestions on how to fix it. The file is attached, it works as expected for me using:

OS: Ubuntu 16.04.2 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6710 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: f8eca0f9311f07c125dd6742a607724c1fa0b77c
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
20170614a.png
20170614a.png (70.65 KiB) Viewed 1397 times
20170614a-016-sample_1.fcstd
(14.71 KiB) Downloaded 20 times
wolfcastle
Posts: 5
Joined: Mon Feb 27, 2017 9:17 pm

Re: Arch CutPlane - Error: tuple index out of range

Postby wolfcastle » Wed Jun 14, 2017 12:08 pm

Dear bejant
bejant wrote:
Wed Jun 14, 2017 11:39 am
it works as expected for me
So can I send my drawing to you, so you can make a CutPlane for me? :D

Seriously, it's not working even with just a solid cylinder and a rectangle. I guess I will have to make a new install of FreeCAD, I see you are using a 32 bit version, whereas I'm using a 64 bit version, something being "out of range" could be caused by differences in compiling for 64 bit. At least that's my best guess at the moment.
User avatar
bejant
Posts: 5940
Joined: Thu Jul 11, 2013 3:06 pm

Re: Arch CutPlane - Error: tuple index out of range

Postby bejant » Wed Jun 14, 2017 1:59 pm

wolfcastle wrote:
Wed Jun 14, 2017 12:08 pm
So can I send my drawing to you, so you can make a CutPlane for me? :D
I can try, if you like.

Maybe someone with a 64 bit version of FreeCAD will try too and we can compare results to see if it is a problem on all 64 bit versions or maybe something happened to your installation.
User avatar
Kunda1
Posts: 5818
Joined: Thu Jan 05, 2017 9:03 pm

Re: Arch CutPlane - Error: tuple index out of range

Postby Kunda1 » Wed Jun 14, 2017 6:33 pm

FYI @wolfcastle opened issue #3082, once issue is diagnosed please notate the ticket. Thanks!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 5818
Joined: Thu Jan 05, 2017 9:03 pm

Re: Arch CutPlane - Error: tuple index out of range

Postby Kunda1 » Wed Jun 14, 2017 6:35 pm

Please take a look how to report bugs to FC via the link in my signature
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
wolfcastle
Posts: 5
Joined: Mon Feb 27, 2017 9:17 pm

Re: Arch CutPlane - Error: tuple index out of range

Postby wolfcastle » Wed Jun 14, 2017 6:58 pm

dear bejant
bejant wrote:
Wed Jun 14, 2017 1:59 pm
I can try, if you like.
Thank you, maybe next time I have an urgent need for it, obviously unless it has been resolved in the mean time.
bejant wrote:
Wed Jun 14, 2017 1:59 pm
Maybe someone with a 64 bit version of FreeCAD will try too and we can compare results to see if it is a problem on all 64 bit versions or maybe something happened to your installation.
As I mentioned in my edit, I can now reproduce the issue on 3 different machines, two Ubuntu 16.04 64bit and one Ubuntu 17.01 32 bit
User avatar
bejant
Posts: 5940
Joined: Thu Jul 11, 2013 3:06 pm

Re: Arch CutPlane - Error: tuple index out of range

Postby bejant » Thu Jun 15, 2017 2:25 am

wolfcastle wrote:
Wed Jun 14, 2017 6:58 pm
Thank you, maybe next time I have an urgent need for it
You're welcome, my offer is simply something to keep in mind but I'm sure other forum regulars will help if I am absent.
wolfcastle wrote:
Wed Jun 14, 2017 6:58 pm
As I mentioned in my edit,
Oops, I missed the edit. I had a bunch of browser tabs open and left the computer several times without refreshing the pages after returning.
eds
Posts: 24
Joined: Mon Feb 20, 2017 2:55 pm

Re: Arch CutPlane - Error: tuple index out of range

Postby eds » Thu Jun 15, 2017 6:19 am

Works as expected on ubuntu 16.04 with FC 0.16 and 0.17

Try installing 0.17 on your PC, and see if it works.
looo
Posts: 2919
Joined: Mon Nov 11, 2013 5:29 pm

Re: Arch CutPlane - Error: tuple index out of range

Postby looo » Thu Jun 15, 2017 8:51 am

I can reproduce a similar error by:
- select cutting object
- select face
- click "cut-plane" button
- click somewhere in the scene to delete selection
- press OK

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/Arch/ArchCutPlane.py", line 103, in accept
    FreeCADGui.doCommand("Arch.cutComponentwithPlane(FreeCADGui.Selection.getSelectionEx()[0],FreeCADGui.Selection.getSelectionEx()[1].SubObjects[0],"+ str(val) +")")
  File "<string>", line 1, in <module>
<type 'exceptions.IndexError'>: list index out of range
So simple do not change selection during this operation should do the job.

ps.: maybe writing a bug report would make sense.
please help with my conda-packaging efforts: https://liberapay.com/looooo/