Hiya,
Thanks for your response Fabrice. I have tried it out in the Main
code and it seems to work fine. However I am still haveing problems
when I try creating a new Class outside the main code using the
LatheExtrusion method. I think it is simply down to my lack of
knowledge about class structures and which classes extend others. At
the moment, calling this Class results in a blank screen, although the
end trace is called, so the Class is being called and run through.
Here is my cut down version of the code using the new profile:
[code]
package {
import flash.display.*;
import flash.geom.Vector3D;
import away3d.arcane;
import away3d.extrusions.*;
import away3d.materials.*;
import away3d.core.utils.*;
import away3d.core.base.*;
public class RoundTube extends Object3D {
public function RoundTube(radius:Number, thickness:Number,
depth:Number, init:Object = null):void {
super(init);
drawRoundTube(radius, thickness, depth);
}
//draw round tube
public function drawRoundTube(radius:Number, thickness:Number,
depth:Number):void {
var profile:Array = [
new Vector3D(-radius, depth, 0),
new Vector3D(-radius, 0, 0)
];
var roundTube:LatheExtrusion = new
LatheExtrusion(profile);
roundTube.subdivision = 18;
roundTube.thickness = thickness;
roundTube.centerMesh = false;
roundTube.revolutions = 1;
roundTube.bothsides = false;
//flips the model over
roundTube.rotationX = -90;
var wMaterial:WireColorMaterial = new
WireColorMaterial(0x373737);
wMaterial.wireColor = 0x373737;
roundTube.material = wMaterial;
//add to holder
//addChild(roundTube);
trace("model complete");
}
}
}
[/code]
On Apr 1, 11:55 am, Fabrice3D <[email protected]> wrote:
> You think too complex!
> A single straight line, (PathSegment or PathCommand for 3.6)as profile is
> enough, such as -100,0,0 0,0,0 100, 0,0
> Check the Broomstick example class, I've pushed few rings in there, inclusive
> one with thickness which is exactly what you want.
>
> Even if slightly different from 3.x engine version, the profile principle is
> exactly the same.
>
> Fabrice
>