rename createLinearNurbs to createLinearCurve

This commit is contained in:
Val Erastov 2018-03-09 19:10:39 -08:00
parent a19c2fa904
commit 5cc9db2d61
5 changed files with 7 additions and 7 deletions

View file

@ -54,7 +54,7 @@ export default class BrepBuilder {
let he = a.edgeFor(b);
if (he === null) {
if (!curve) {
curve = BrepCurve.createLinearNurbs(a.point, b.point);
curve = BrepCurve.createLinearCurve(a.point, b.point);
}
const e = new Edge(curve, a, b);
he = e.halfEdge1;

View file

@ -40,8 +40,8 @@ export function createPrism(basePoints, height) {
for (let i = 0; i < basePoints.length; i++) {
let j = (i + 1) % basePoints.length;
basePath.push(BrepCurve.createLinearNurbs(basePoints[i], basePoints[j]));
lidPath.push(BrepCurve.createLinearNurbs(lidPoints[i], lidPoints[j]));
basePath.push(BrepCurve.createLinearCurve(basePoints[i], basePoints[j]));
lidPath.push(BrepCurve.createLinearCurve(lidPoints[i], lidPoints[j]));
}
return enclose(basePath, lidPath, baseSurface, lidSurface);
}

View file

@ -181,7 +181,7 @@ function degree1OptTessellator(curve, min, max, tessTol, scale) {
return curveTess(curve, min, max, tessTol, scale);
}
BrepCurve.createLinearNurbs = function(a, b) {
BrepCurve.createLinearCurve = function(a, b) {
let line = verb.geom.NurbsCurve.byKnotsControlPointsWeights( 1, [0,0,1,1], [a.data(), b.data()]);
return new BrepCurve(new NurbsCurve(line));
};

View file

@ -12,7 +12,7 @@ export class Ray {
}
updateCurve() {
this.curve = BrepCurve.createLinearNurbs(this.pt, this.pt.plus(this.dir.multiply(this.reachableDistance)));
this.curve = BrepCurve.createLinearCurve(this.pt, this.pt.plus(this.dir.multiply(this.reachableDistance)));
}
pertrub() {

View file

@ -128,11 +128,11 @@ function createEnclosure(tpi, a, b, c) {
}
function createEdge(tpi, a, b) {
return new tpi.brep.topo.Edge(tpi.brep.geom.BrepCurve.createLinearNurbs(a.point, b.point), a, b).halfEdge1;
return new tpi.brep.topo.Edge(tpi.brep.geom.BrepCurve.createLinearCurve(a.point, b.point), a, b).halfEdge1;
}
function createCurve(tpi, a, b) {
return tpi.brep.geom.BrepCurve.createLinearNurbs(pt(tpi,a), pt(tpi,b));
return tpi.brep.geom.BrepCurve.createLinearCurve(pt(tpi,a), pt(tpi,b));
}
const pt = (tpi, arr) => new tpi.brep.geom.Point().set3(arr);