The a2s command utilizes assimp
to convert 3d mesh files to SketchUp files.
See here for a list of formats supported by assimp.
This is a basic converter which relies completely on the capabilities of
assimp
for the conversion. If assimp
can not handle the conversion, no
further attempt is made. Many formats result in poor or unexpected models.
Textures are not imported for any format. Scale is fixed and set to a larger value to
over-come SketchUp's "small geometry" limitation.
.stl
, .ply
, and .obj
files generally convert well, which was the original goal of the code.
.dxf
files do not typically convert well if at all. The exceptions appear to
be dxf's exported using 3DFACE
entities, and PolyFaceMesh variant of
POLYLINE
entiites.
On the command line...
> a2s input-file.ext
Creates a file named input-file.ext.skp
in the same folder.
See the Release page for the latest download. Unzip the files, then move them to a directory in your %PATH%.
- cmake
premake5use cmake.- SketchUp SDK
- A local clone of the
assimp
repository. assimp - GNU
g++
compiler tools, bin utils, andmake
for Windows. See Note.
- set the
ASSIMP_SRC
variable in thebuild-assimp.bat
file to your assimp source directory. - run the
build-assimp.bat
file. This may take a few minutes. - set the
SKETCHUP_SDK
andASSIMP
variable in theMakefile
- run
make
Once built, copy the a2s.exe
file and the following 2 dll
files to a folder on your %PATH%
- SketchUpAPI.dll
- SketchUpCommonPreferences.dll
I use scoop to maintain the required dev tools on Windows.
a2s defaults to using a SketchUp 8 file. Edit the main.cpp
file if you want to change the default.