A2plus: After "Add shape from external file" - Out Of Enum Range: 35 - while shape in source file seems ok

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!
Post Reply
lutz_dd
Posts: 92
Joined: Thu Jul 31, 2014 5:10 am

A2plus: After "Add shape from external file" - Out Of Enum Range: 35 - while shape in source file seems ok

Post by lutz_dd »

It try to add a shape (fusion, Oeffnung___Fusion005) from an external file (attached FCStd-file) using A2plus.
The shape (fusion) in the source file is checked as OK. But after instantiation in the parent the checker returns "Out Of Enum Range: 35" ... see attached screenshot.

screenshot:
'35' is obviously an error as the range of the check in TaskCheckGeometry.cpp returns a fail if outside 0...33.
Whatever the enum means ... maybe its related to the insertion?

I tried ... https://forum.freecadweb.org/viewtopic. ... 82#p464882
and the copy of the shape with fix(...) seems to solve the issue.

Code: Select all

>>> Gui.Selection.getSelection()[0]
<Part::PartFeature>
>>> Gui.Selection.getSelection()[0].Shape
<Solid object at 00000000242B3FF0>
>>> s=Gui.Selection.getSelection()[0].Shape.copy()
>>> s.fix(0.01,0.01,0.01)
True
>>> s.fix(0.001,0.001,0.001)
True
>>> s.fix(0.0001,0.0001,0.0001)
True
>>> Part.show(s)
>>> help(Part.show)
Help on built-in function show:

show(...) method of builtins.tuple instance
    show(shape,[string]) -- Add the shape to the active document or create one if no document exists.

>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('rasenbot','Shape')
>>> Gui.runCommand('Part_CheckGeometry',0)
---

OS: Windows 7 SP 1 (6.1)
Word size of FreeCAD: 64-bit
Version: 0.20.25645 (Git)
Build type: Release
Branch: master
Hash: 37d9757399b4c2ec30318eb88d7cd7c508246345
Python version: 3.8.10
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: German/Germany (de_DE)
Attachments
FrontRadBallBearingHolder.FCStd
(63.86 KiB) Downloaded 26 times
freecad_out_of_enum_range.png
freecad_out_of_enum_range.png (159.21 KiB) Viewed 768 times
lutz_dd
Posts: 92
Joined: Thu Jul 31, 2014 5:10 am

Re: A2plus: After "Add shape from external file" - Out Of Enum Range: 35 - while shape in source file seems ok

Post by lutz_dd »

There are 2 more shapes from a different external file called. This is one has just a Cube as shape and checks OK.
- The inserted Cubes (2x) can be combined to a fusion.
- The Oeffnung___Fusion005 can not be combined to a fusion. The fusion is marked with the error flag.
BUT
- Cut( Cut( Fusion(Cube_001,Cube_002),Oeffnung___Fusion005_0001),Oeffnung___Fusion005_0002)
works and the check returns OK. This is somehow surprising.
lutz_dd
Posts: 92
Joined: Thu Jul 31, 2014 5:10 am

Re: A2plus: After "Add shape from external file" - Out Of Enum Range: 35 - while shape in source file seems ok

Post by lutz_dd »

Still fighting for a solution. Anybody knows the source of the magic numbers?
Post Reply