Plane with hole

Software: Away3D 4.x

Chirieac, Newbie
Posted: 23 March 2013 02:46 PM   Total Posts: 4

Hi,

How can I create a plane with a hole in it? A hole like this

   

Chirieac, Newbie
Posted: 23 March 2013 05:16 PM   Total Posts: 4   [ # 1 ]

I ended up creating a PlaneGeometry with 3 segments along the width and height and deleting the middle faces like this:

var geometry:PlaneGeometry = new PlaneGeometry(10010033);
//
geometry.subGeometries[0].indexData.splice(243);
geometry.subGeometries[0].indexData.splice(243);
geometry.subGeometries[0].updateIndexData(geometry.subGeometries[0].indexData); 


I’ve adjusted the hole size by moving the vertices like this:

geometry.subGeometries[0].vertexData[15] = -40// x
geometry.subGeometries[0].vertexData[17] = -40// z
geometry.subGeometries[0].vertexData[18] 40// x
geometry.subGeometries[0].vertexData[20] = -40// z
geometry.subGeometries[0].vertexData[27] = -40// x
geometry.subGeometries[0].vertexData[29] 40// z
geometry.subGeometries[0].vertexData[30] 40// x
geometry.subGeometries[0].vertexData[32] 40// z
//
geometry.subGeometries[0].vertexData[23] = -40// z
geometry.subGeometries[0].vertexData[26] 40// z 

The resulting plane is attached.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X