Convert sketchup (*.skp) file to STL or OBJ - stl

I'm looking for the solutions to Convert sketchup (*.skp) file to STL or OBJ.
Is there a commandline tool to convert sketchup (*.skp) file to STL or OBJ? I'm looking for the tool supporting both windows and mac.
or
How to convert sketchup (*.skp) file to STL or OBJ in javascript?
Any clue or comment is appreciated.
Thanks,
Jeffrey

AFAIK there is no command line tool to do it. Much less a Javascript tool.
SketchUp itself does have the capability, so you can create a Ruby plugin to do the export when SketchUp is opened. So you can have a .bat file or whatever the Mac equivalent is, and let it run SketchUp with your plugin.
Or you can roll your own conversion tool using the SketchUp SDK. http://www.sketchup.com/intl/en/developer/su-api/ The SDK does not need the SketchUp installed, but on the other hand it does not have any built-in .OBJ export support, so you would need to implement the exporter yourself, only using the SDK for reading the SKP file. This might be quite involved.

SketchUp has an open source STL plugin which is accessible from the Extension Warehouse:
http://extensions.sketchup.com/en/content/sketchup-stl
The STL works for SketchUp Make (which is Free) and SketchUp Pro ($590). SketchUp Pro also includes a number of other export file formats, such as OBJ, 3DS, DAE, FBX, etc....

I know its not programatically, but last version of Sketchup has the option directly to export to OBJ file.
File Menu -> export -> 3D Model -> Then select from the dropdown of extensions the OBJ.

Related

Can we convert 3dm file to stl or obj file using opennurbs c++ sdk

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.

Open three.js json file in blender

I have a json file. I guess it exported with Three js exporter addon. I don't have source of this file, but i want to open it in blender again and convert to another format. Is this possible ?
I installed a lot of exporters(this one for example), but didn't find import from JSON. Three.js exporter after install says:

How to convert STL file in JSON using Python

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.

Can i use xml3d with stl models?

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>

ndk build with Visual studio files

I am building an android app using the native classes. The problem is that there are some cpp files calling OpenCV and the opencv header files calling VC includes that are not provided in jni. So what should I do? create a new opencv folder and change every opencv files there to right paths? or any other ways to config it? because I don't want to change the original opencv folder. that's for VC programming.
<algorithm> is one of the STL headers. You should enable STL support in NDK, as described in docs/CPLUSPLUS-SUPPORT.html document.
pointed out the thing. I need to put those to Application.mk. Thought this file is optional.