I'd really like to use STL models with XML3d. Is there a way to convert back and forth between these formats?
You can convert STL files to XML3D using the Blender exporter for instance:
https://github.com/ksons/xml3d-blender-exporter
Another option is to write a plug-in for STL files that allow to reference STL files from <mesh> and <data> elements:
<mesh src="foo/bar.stl"/>
This would be very similar to the existing plug-ins for MeshLab/JSON and OpenCTM files:
http://xml3d.github.io/xml3d-examples/examples/meshlab/meshlab.html
http://xml3d.github.io/xml3d-examples/examples/openctm/openctm.html
We've just released a new converter that uses the Open Asset Import Library to convert many 3D formats (including STL) to XML3D's asset format:
https://github.com/csvurt/assimp2xml3d
It can't convert from XML3D back to other formats, but this might be something we add in the future.
There is a plug-in for STL file now:
https://github.com/xml3d/xml3d-stl-plugin
It allows using STL files as simple as:
<mesh src="../path/to/model.stl"></mesh>
Related
I am looking for how can we use opennurbs c++ sdk to convert 3dm file format to stl or obj file format. I have already tried looking its documentation but got nothing much helpful.
documentation link [http://developer.rhino3d.com/guides/#opennurbs][1]
another link: [http://wiki.mcneel.com/developer/opennurbs/home][1]
Is it possible to convert 3dm file format to stl or obj file format using some API of opennurbs sdk or any other sdk. If yes then which API or sdk can be used ?
openNURBS by itself only supports Rhino's 3DM file format. The 3DM file format can support both mesh and NURBS geometry, but STL only supports meshes. OBJ can support both.
You can use Rhino to open the 3DM file and save as OBJ or STL. Rhino also includes a robust mesher that can convert the NURBS geometry into a mesh for STL output.
You might also consider Okino's PolyTrans software for doing file conversions automatically.
I need to convert stl file json using python, is there any way to do this using python programming
Here's a project that will help you to convert .stl files to JSON.
Project GitHub
Also, here's a python module called numpy-stl. It offers a wide range of functionalities for directly working on .stl files.
I would like to import JSON(made by three.js) data into Maya.
I found exporter of Maya, but couldn't find importer of Maya.
Is there good way to do it?
There are currently no Three.js JSON importer.
The Three.js JSON is meant to be a runtime format, used by Three.js for rendering in WebGL. Usually, you would export to the JSON format when you want to use it for the web. It is not meant to be a storage format.
There are other more common "interchange" formats like FBX, Collada, or OBJ, that are meant to be for storage and for passing around between different people and software packages.
I'm working on a project where we need to convert .OBJ models into .G3DJ (JSON) format on the fly. I've tried with this code I've founded in google code.
https://code.google.com/p/libgdx-users/wiki/ImportingModelsFromBlender
ObjLoader loader = new ObjLoader();
StillModel model = loader.loadObj(Gdx.files.internal("data/model.obj"), true);
G3dExporter.export(models, Gdx.files.absolute("data/model.g3d"));
But StillModel and G3DExporter cannot be found in libgdx.
Any ideas?
The libgdx-users wiki is not up to date. Converting an OBJ file to G3DJ (or G3DB) can be done using fbx-conv, which is a command line utility (you can call it from code if you like).
Also make sure to update to the nightly build. StillModel is no longer supported (and does not support the G3DJ (JSON) file format).
It is recommended not to use OBJ (although it is still supported). Instead use FBX (converted to G3Dx), which supports more functionality than OBJ.
Thanks for the assist on my previous question.... I was able to complete my project
This time I have a CAD file created with Autodesk that I need to convert to a shape file.
Couple of questons:
An open source application (can't afford ESRI) that can convert the CAD file to a shape file?
Is that a better file format I can use other than the shape file (shp) format?
Any suggestions would be greatly appricated
Regards
Chris
I would also suggest to use OGR but in only works with dwg/dxf version 2000 or prior; you could use Teigha (http://www.opendesign.com/) to convert the files to 2000 version and then you can use OGR.
I've done tons of conversions from dwg to shp what I usualy do is convert the dwg to a dwg version 2000 using Teigha, then convert that dwg-200 to a shape file; once a shapefile you'll see that this file contains all the layer in order to separate each layer into a different shape file I use this command
ogr2ogr new_map_from_layer_X.shp -where "LAYER = 'X'" shape_converted_from_DWG_lines.shp
You should use OGR
Link
It is the main program for converting between geographic formats. It is written in C++ but there are also python bindings. It is compiled and runs on almost every major OS.
Check out what ODA has:
http://www.opendesign.com/