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

Post by wolfcastle »

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 121 times
Last edited by wolfcastle on Wed Jun 14, 2017 1:28 pm, edited 1 time in total.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

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

Post by bejant »

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 2985 times
20170614a-016-sample_1.fcstd
(14.71 KiB) Downloaded 113 times
wolfcastle
Posts: 5
Joined: Mon Feb 27, 2017 9:17 pm

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

Post by wolfcastle »

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
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

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

Post by bejant »

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
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

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

Post by Kunda1 »

FYI @wolfcastle opened issue #3082, once issue is diagnosed please notate the ticket. Thanks!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

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

Post by Kunda1 »

Please take a look how to report bugs to FC via the link in my signature
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
wolfcastle
Posts: 5
Joined: Mon Feb 27, 2017 9:17 pm

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

Post by wolfcastle »

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
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

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

Post by bejant »

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

Post by eds »

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.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

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

Post by looo »

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.
Post Reply