0
$\begingroup$

I built a simple model with 3D graphics and exported it to a DAE file, The 3D graphics looked good before export, but different and wrong after reimporting them from the DAE file.

Here is some sample code:

northEle = {Blue, Opacity[1], Cuboid[{-2, 2, 0}, {2, 2.1, 2}]};
southEle = {Blue, Opacity[1], Cuboid[{-2, -2, 0}, {2, -2.1, 2}]};
eastEle = {Blue, Opacity[1], Cuboid[{2, -2, 0}, {2.1, 2, 2}]};
westEle = {Blue, Opacity[1],  Cuboid[{-2, -2, 0}, {-2.1, 2, 2}]};
floorEle = {Brown, Opacity[1],  Cuboid[{-2, -2, 0}, {2, 2, 0.1}]};
test = Graphics3D[{northEle, southEle, eastEle, westEle, floorEle}]

This is the image before export

Export[
  "testRoom.dae", 
  Graphics3D[northWallEle, eastWallEle, westWallEle, southWallEle, floorEle]];

Import["testRoom.dae"]

This is the image after Import from exported dae file

$\endgroup$
  • $\begingroup$ Your variables have been renamed. Eg: northEle becomes northWallEle in your Export. Presumably you're exporting old data. $\endgroup$ – aardvark2012 Sep 18 '17 at 7:58
  • 1
    $\begingroup$ Also, I think .dae is for MeshRegions, not Graphics3D. $\endgroup$ – aardvark2012 Sep 18 '17 at 8:00
  • $\begingroup$ @aardvark2012, Yes, When I used MeshRegion, it works. Thanks! $\endgroup$ – user1470393 Sep 18 '17 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.