mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 18:02:50 +01:00
brep / fix nurbs degree 2 for planes
This commit is contained in:
parent
7aea6bd872
commit
b4bd21c4af
1 changed files with 9 additions and 3 deletions
|
|
@ -102,10 +102,16 @@ export function createBoundingNurbs(points, plane) {
|
|||
|
||||
let to3D = plane.get3DTransformation();
|
||||
let polygon = bBox.toPolygon();
|
||||
polygon = polygon.map(p => to3D._apply(p));
|
||||
polygon = polygon.map(p => to3D._apply(p).data());
|
||||
|
||||
const nurbs = new NurbsSurface(new verb.geom.ExtrudedSurface(new verb.geom.Line(
|
||||
polygon[0].data(), polygon[1].data()), polygon[2].minus(polygon[1]).data()));
|
||||
let planeNurbs = verb.geom.NurbsSurface.byKnotsControlPointsWeights( 1, 1, [0,0,1,1], [0,0,1,1],
|
||||
[ [ polygon[3], polygon[2]] ,
|
||||
[ polygon[0], polygon[1] ] ] );
|
||||
|
||||
const nurbs = new NurbsSurface(planeNurbs);
|
||||
|
||||
__DEBUG__.AddNurbs(nurbs);
|
||||
__DEBUG__.AddSurfaceNormal(nurbs);
|
||||
|
||||
return nurbs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue