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


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?


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.


(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.

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

I shall dig further.



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.


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)

            <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>

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



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


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`