News:

Due to heavy spamming attempts on this forum, automatic registration has been disabled. We will approve registration requests as quickly as possible (unless you're a spammer of course :) )

Main Menu

DAE Files nicht Importierbar

Started by Uwe Gehlich, January 16, 2017, 09:44:50 PM

Previous topic - Next topic

Uwe Gehlich

Hallo zusammen,

Ich hab da ein Problem.
Ich Exportiere meinen Bauplan durch Anyrail 6 in das DAE format für Sketchup.
Wenn ich allerdings die Datei in Sketchup laden will meldet mir Sketchup Import nicht möglich.

Was mache ich Falsch

Danke
Uwe

p.s.: Ich hab jetzt mal den gleichen Gleisplan in Any 5 erstellt und als DAE gespeichert. Hier funktioniert es. Kann es sein, das die Export Funktion von Anyrail 6 ein Problem mit DAE files hat?

David

Wir haben die DAE export weiter standardisiert, aber es sieht aus Sketchup kann nichts damit.
Leider gibt Sketchup keine weitere Info.

Wenn Sie es mit Meshlab oder FreeCAD versuchen funktioniert es ohne Probleme.
David Hoogvorst. Founder and Owner of DRail Software. Creator of AnyRail.

emthornber

(Apologies for the English)

DAE files exported by AnyRail cannot be read by FreeCAD (pyCollada package)

The error report comes from the code that reads the triangle sets.

<quote>
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Applications/FreeCAD 2.app/Contents/Mod/Arch/importDAE.py", line 98, in insert
    read(filename)
  File "/Applications/FreeCAD 2.app/Contents/Mod/Arch/importDAE.py", line 115, in read
    col = collada.Collada(filename, ignore=[collada.DaeUnsupportedError])
  File "/Applications/FreeCAD 2.app/Contents/lib/python2.7/site-packages/collada/__init__.py", line 211, in __init__
    self._loadGeometry()
  File "/Applications/FreeCAD 2.app/Contents/lib/python2.7/site-packages/collada/__init__.py", line 290, in _loadGeometry
    G = geometry.Geometry.load(self, {}, geomnode)
  File "/Applications/FreeCAD 2.app/Contents/lib/python2.7/site-packages/collada/geometry.py", line 215, in load
    _primitives.append( triangleset.TriangleSet.load( collada, sourcebyid, subnode ) )
  File "/Applications/FreeCAD 2.app/Contents/lib/python2.7/site-packages/collada/triangleset.py", line 227, in load
    triset = TriangleSet(source_array, node.get('material'), index, node)
  File "/Applications/FreeCAD 2.app/Contents/lib/python2.7/site-packages/collada/triangleset.py", line 97, in __init__
    self.index.shape = (-1, 3, self.nindices)
<type 'exceptions.ValueError'>: cannot reshape array of size 1 into shape (3,3)
</quote>

I shall dig further.

HTH
--
MarkT

David

We are working on a new export module, but it may take a while before we can release it.
David Hoogvorst. Founder and Owner of DRail Software. Creator of AnyRail.

emthornber

If I commented-out all the triangle sections that have a count of zero then the DAE file loads into FreeCAD.  Still doesn't import into Sketch tho'  :( (perhaps Sketch doesn't ignore comments)

eg
            <triangles count="0" material="mat_symb_02B5E3C4_3025">
               <input semantic="VERTEX" source="#_NC_mesh02B5E3C4-Vtx" offset="0" />
               <input semantic="TEXCOORD" source="#_NC_mesh02B5E3C4-TexCoord0" offset="1" set="0" />
               <input semantic="NORMAL" source="#_NC_mesh02B5E3C4-Normal" offset="2" />
               <p>               </p>
            </triangles>

Next thing to try is a count of zero but an empty '<p></p>'

HTH
--
MarkT

emthornber

Changing <p>[[:space:]]+</p> to <p></p> cures the problem on FreeCAD.

emthornber

Sketchup will import the DAE file with XML as-is if it is converted from UTF16 to UTF8

`iconv -f UTF-16 -t UTF-8 in > out`