jmplonka / InventorLoader

Workbench for FreeCAD to loads or import Autodesk (R) Inventor (R) files.
GNU General Public License v2.0
114 stars 17 forks source link

Loading sat file from IdealStandard: Acis.py", could not convert string to float: 'F' #53

Closed varnierg closed 2 years ago

varnierg commented 2 years ago

I'm using the latest version of InventorLoader (22 oct 2021) to load a .sat files of a furniture downloaded from Idealstandard (Link), that I've attached. When I try to load it in freecad 0.19, I get this error (below complete error message):

Acis.py", line 335, in getFloat return float(val), in <class 'ValueError'>: could not convert string to float: 'F'

I've the same error if I import it as native or convert to STEP.

Bye and thank you! IS_Ventuno_T5150_3DPL_NN.zip

Full error

12:23:35  Reading: C:\Users\andrea\Downloads\IS_Ventuno_T5150_3DPL_NN.SAT
12:23:37  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\importerIL.py", line 147, in open
    _open(filename, skip, only, root)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\importerIL.py", line 135, in _open
    reader.create3dModel(root , doc)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\importerSAT.py", line 203, in create3dModel
    importModel(group)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\importerSAT.py", line 164, in importModel
    bodies = resolveNodes(acis)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\importerSAT.py", line 145, in resolveNodes
    node = createNode(entity)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 271, in createNode
    node.set(entity)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 2646, in set
    i = self.setSubtype(entity.chunks, i)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 3657, in setSubtype
    i = self.setBulk(chunks, i + 1)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 3651, in setBulk
    return fkt(chunks, i + prm[1], prm[2])
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 3180, in setExact
    rU, i = getInterval(chunks, i, MIN_INF, MAX_INF, getScale())
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 436, in getInterval
    upper, i = getRange(chunks, i, defMax, scale)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 428, in getRange
    val, i = getFloat(chunks, i)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 335, in getFloat
    return float(val), i
<class 'ValueError'>: could not convert string to float: 'F'
12:30:56  Reading: C:\Users\andrea\Downloads\IS_Ventuno_T5150_3DPL_NN.SAT
12:30:58  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\importerIL.py", line 147, in open
    _open(filename, skip, only, root)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\importerIL.py", line 135, in _open
    reader.create3dModel(root , doc)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\importerSAT.py", line 205, in create3dModel
    convertModel(group, doc.Name)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\importerSAT.py", line 171, in convertModel
    bodies = resolveNodes(acis)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\importerSAT.py", line 145, in resolveNodes
    node = createNode(entity)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 271, in createNode
    node.set(entity)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 2646, in set
    i = self.setSubtype(entity.chunks, i)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 3657, in setSubtype
    i = self.setBulk(chunks, i + 1)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 3651, in setBulk
    return fkt(chunks, i + prm[1], prm[2])
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 3180, in setExact
    rU, i = getInterval(chunks, i, MIN_INF, MAX_INF, getScale())
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 436, in getInterval
    upper, i = getRange(chunks, i, defMax, scale)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 428, in getRange
    val, i = getFloat(chunks, i)
  File "C:\Users\andrea\AppData\Roaming\FreeCAD\Mod\InventorLoader\Acis.py", line 335, in getFloat
    return float(val), i
<class 'ValueError'>: could not convert string to float: 'F'
jmplonka commented 2 years ago

Thank you for sharing the example. Can you please check if it is working now?

varnierg commented 2 years ago

yes, it's working, thanks!

On Fri, Jan 21, 2022 at 11:18 AM jmplonka @.***> wrote:

Thank you for sharing the example. Can you please check if it is working now?

— Reply to this email directly, view it on GitHub https://github.com/jmplonka/InventorLoader/issues/53#issuecomment-1018370519, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGGHFVTMWA4Q4QDHMD4I4GDUXEXHJANCNFSM5LRYIUQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>