I can’t get there correct bounding box for planeGeometry and latheGeometry. For boxGeometry and cylinderGeometry bounding box works well, but for latheGeometry bounding box coordinates is 0. I can’t find any idea how to fix it.
var geo = new LatheGeometry( points, 10 );
geo.computeBoundingBox();
console.log ( geo.boundingBox )
it’s a bit of an obvious question but the only one that may be relative to the resulting bounding box being 0,0,0… your points is an array of vector2’s right? any chance you can share how you’re creating that array?
also, in the documentation it’s stated that
points — Array of Vector2s. The x-coordinate of each point must be greater than zero.
although it also goes on to say…
Default is an array with (0,-0.5), (0.5,0) and (0,0.5) which creates a simple diamond shape.
var p = new Shape();
p.moveTo ( 0.001, 0 );
p.lineTo ( 40, 0 );
p.lineTo ( 40, 10 );
p.lineTo ( 50, 10 );
p.lineTo ( 50, 0 );
var points = p.getPoints();
var geo = new LatheGeometry( points, 10 );
geo.computeBoundingBox();
console.log ( geo.boundingBox )
After changing first point from 0 to 0.001 a have a different result, but still wrong. The min values calculated right, but max values the same of min. A similar result can be obtained for PlaneGeometry
Unfortunately, I cannot reproduce your result. Using the same code, I get different min and max. Could you try to make an online demo (on CodePen or other system)?