expose creation bound surface from 2d points

This commit is contained in:
Val Erastov 2018-04-28 21:15:24 -07:00
parent 8b8142db76
commit 838b1041fa

View file

@ -98,8 +98,12 @@ export function createBoundingSurface(points, plane) {
plane = new Plane(normal, w);
}
let to2D = plane.get2DTransformation();
let points2d = points.map(p => to2D.apply(p));
return createBoundingSurfaceFrom2DPoints(points2d, plane);
}
export function createBoundingSurfaceFrom2DPoints(points2d, plane) {
let bBox = new BBox();
points2d.forEach(p => bBox.checkPoint(p));
@ -117,4 +121,4 @@ export function createBoundingSurface(points, plane) {
// __DEBUG__.AddSurfaceNormal(nurbs);
return new BrepSurface(nurbs);
}
}