LinearExtrude closePath issue?

Software: Away3D 4.x

teckel, Newbie
Posted: 14 October 2011 11:41 AM   Total Posts: 11

I try the LinearExtrude class with the closePath set to true but no top and bottom face appear..

Is there an issue with LinearExtrude?

Here is my code

public function PlayCard(){
   
        super
();
 
_mat = new ColorMaterial(0xaaee55)
 
_card = new LinearExtrude(_mat,buildPath(),LinearExtrude.Z_AXIS,50,3,true,0,1,null,true,false,"",true)
   
addChild(_card)
   
  
}
  
protected function buildPath ():Vector.<Vector3D{

 _vector 
= new Vector.<Vector3D>;
 
_vector.push(new Vector3D(0,5,0))
 
_vector.push(new Vector3D(5,0,0))
 
_vector.push(new Vector3D(50,0,0))
 
_vector.push(new Vector3D(55,5,0))
 
_vector.push(new Vector3D(55,80,0))
        
_vector.push(new Vector3D(50,85,0))
 
_vector.push(new Vector3D(5,85,0))
 
_vector.push(new Vector3D(0,80,0))
 
_vector.push(new Vector3D(0,5,0))
    
 return 
_vector
  

And the result here

   

Avatar
Fabrice Closier, Administrator
Posted: 17 October 2011 08:15 AM   Total Posts: 1265   [ # 1 ]

I may be wrong, but I think you might missunderstand “closePath”.
No faces are added to the ‘close’ the shape. It simply joins the last to the first coordinates of a path if there is more than one segment.

If you wish to close the shape, you need to pass the start and end vector3d’s to the DelaunayMesh class.

As a side note, that’s why I’ve added a getter for last rotated profile values in LatheExtrude. I do plan add similar getters to all extrusions classes in order to ease the build of complex shapes using this package.

   

teckel, Newbie
Posted: 17 October 2011 08:21 AM   Total Posts: 11   [ # 2 ]

Thank i’ll try it later.

But you’re right.

In the past i was used 3ds max. And the extrude modifier have an option called closePath.This option draw mesh at start and end of the extrusion path.

   

Avatar
Fabrice Closier, Administrator
Posted: 17 October 2011 09:52 AM   Total Posts: 1265   [ # 3 ]

Also keep in mind that DelaunayMesh considers a “cloud of points”, its not aware of any contour information. An earclipping or path input is something I want to add at some point in future. So one trick you could do in case you would run into a closing shape that goes outside your profile, is to use a skinExtrude to a single point instead. Then use the newly added tools/utils.Projector to correct the uv’s. The geometry definition would be then less nice, but visually, no eye could see the difference.
You also could first run the Delaunay code, and spend a few minutes to locate the extra faces indices and remove them…

   

teckel, Newbie
Posted: 18 October 2011 09:27 AM   Total Posts: 11   [ # 4 ]

Thank Fabrice,

Delaunay Mesh work just fine!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X