zturtleman / mm3d

Maverick Model 3D is a 3D model editor and animator for games.
https://clover.moe/mm3d
GNU General Public License v2.0
110 stars 22 forks source link

Export to WRML/WRL (for Kicad models) #194

Open dvhx opened 3 months ago

dvhx commented 3 months ago

It would be really handy to have export to WRML format. It it very similar to OBJ. Import is not needed, only export. Here are two cubes:

#VRML V2.0 utf8
#Exported from Wings 3D 2.2.9
DEF ungrouped Transform {
  children [
    Shape {
      appearance Appearance {
        material DEF default Material {
          diffuseColor 0.7898538076923077 0.8133333333333334 0.6940444444444445
          emissiveColor 0.0 0.0 0.0
          specularColor 0.1689853807692308 0.17133333333333334 0.15940444444444446
          ambientIntensity 1.0
          transparency 0.0
          shininess 0.19999999999999996
        }
      }
      geometry IndexedFaceSet {
        coord Coordinate { point [
          -8.475675 -6.918919 10.897297,
          13.318919 -6.918919 10.897297,
          -8.475675 12.454054 10.897297,
          13.318919 12.454054 10.897297,
          13.318919 -6.918919 -10.897297,
          -8.475675 -6.918919 -10.897297,
          13.318919 12.454054 -10.897297,
          -8.475675 12.454054 -10.897297,
          8.12973 0.0 4.324324,
          16.778378 0.0 4.324324,
          8.12973 18.854054 4.324324,
          16.778378 18.854054 4.324324,
          16.778378 0.0 -4.324324,
          8.12973 0.0 -4.324324,
          16.778378 18.854054 -4.324324,
          8.12973 18.854054 -4.324324 ] }
        coordIndex [
          0, 1, 2, -1,
          0, 2, 5, -1,
          0, 5, 1, -1,
          1, 3, 2, -1,
          1, 4, 6, -1,
          1, 5, 4, -1,
          1, 6, 3, -1,
          2, 3, 6, -1,
          2, 6, 7, -1,
          2, 7, 5, -1,
          4, 5, 6, -1,
          5, 7, 6, -1,
          8, 9, 10, -1,
          8, 10, 13, -1,
          8, 13, 9, -1,
          9, 11, 10, -1,
          9, 12, 14, -1,
          9, 13, 12, -1,
          9, 14, 11, -1,
          10, 11, 14, -1,
          10, 14, 15, -1,
          10, 15, 13, -1,
          12, 13, 14, -1,
          13, 15, 14, -1 ]
      }
    }
  ]
}