PAPERVISION3D
Exports the model, or selection, from SketchUp to Papervision3D.
Explodes the model, or selection, if it contains components or groups.
Triangulates the model, or selection, if it contains polygons larger than a triangle.
Exports vertices, and faces, to a Papervision3D file.
Note:
Explosion will merge overlapping faces.
Triangulation will take a few minutes for a large model, or a large selection.
Triangulation will not create extremely small faces.
BEFORE

AFTER

CODE
package
{
import org.papervision3d.core.geom.TriangleMesh3D;
import org.papervision3d.core.geom.renderables.Triangle3D;
import org.papervision3d.core.geom.renderables.Vertex3D;
import org.papervision3d.core.math.NumberUV;
import org.papervision3d.core.proto.MaterialObject3D;
public class Box extends TriangleMesh3D
{
private var vs :Array;
private var fs :Array;
public function Box(material:MaterialObject3D=null)
{
super(material, new Array(), new Array());
vs = this.geometry.vertices;
fs = this.geometry.faces;
v(0.0,500.0,500.0);
v(500.0,500.0,0.0);
v(500.0,500.0,500.0);
v(500.0,0.0,500.0);
v(0.0,0.0,0.0);
v(0.0,0.0,500.0);
v(500.0,0.0,0.0);
v(0.0,500.0,0.0);
f(0,1,2,0.0,500.0,500.0,0.0,500.0,500.0);
f(3,4,5,-500.0,500.0,0.0,0.0,0.0,500.0);
f(0,3,5,0.0,500.0,-500.0,0.0,0.0,0.0);
f(4,3,6,0.0,0.0,-500.0,500.0,-500.0,0.0);
f(1,3,2,0.0,500.0,500.0,0.0,500.0,500.0);
f(4,0,5,0.0,0.0,-500.0,500.0,-500.0,0.0);
f(1,4,6,500.0,500.0,0.0,0.0,500.0,0.0);
f(4,1,7,0.0,0.0,500.0,500.0,0.0,500.0);
f(1,0,7,500.0,0.0,0.0,500.0,0.0,0.0);
f(3,0,2,-500.0,0.0,0.0,500.0,-500.0,500.0);
f(3,1,6,500.0,0.0,0.0,500.0,0.0,0.0);
f(0,4,7,-500.0,500.0,0.0,0.0,0.0,500.0);
this.geometry.ready = true;
}
private function v(x:Number, y:Number, z:Number):void
{
vs.push(new Vertex3D(x, y, z));
}
private function f(v0:int, v1:int, v2:int, uv0u:Number, uv0v:Number, uv1u:Number, uv1v:Number, uv2u:Number, uv2v:Number):void
{
fs.push(new Triangle3D(this, [vs[v0], vs[v1], vs[v2]], null, [new NumberUV(uv0u, uv0v), new NumberUV(uv1u, uv1v), new NumberUV(uv2u, uv2v)]));
}
}
}
INSTALLATION
- Download
- Extract
macOS: Hard Drive/Library/Application Support/Google SketchUp #/SketchUp/plugins
Windows: C:\Program Files\Google\Google SketchUp #\Plugins
INSTRUCTIONS
- Open SketchUp
- Click Plugins
- Click Papervision3D