update references to Vector from the 'math' module

This commit is contained in:
Val Erastov 2018-01-03 19:59:10 -08:00
parent bbbdf2f9db
commit ef9e210f49
45 changed files with 46 additions and 49 deletions

View file

@ -1,4 +1,4 @@
import Vector from '../math/vector'
import Vector from 'math/vector';
import BBox from '../math/bbox'
import {HashTable} from '../utils/hashmap'
import {Graph} from '../math/graph'

View file

@ -1,6 +1,6 @@
import {Matrix3, BasisForPlane, ORIGIN} from '../../../math/l3space'
import * as math from '../../../math/math'
import Vector from '../../../math/vector'
import Vector from 'math/vector';
import {enclose, iterateSegments} from '../../../brep/brep-enclose'
import * as stitching from '../../../brep/stitching'
import {Loop} from '../../../brep/topo/loop'

View file

@ -2,7 +2,7 @@ import {CURRENT_SELECTION as S} from './wizard'
import {PreviewWizard, SketchBasedPreviewer} from './preview-wizard'
import {getEncloseDetails} from '../cut-extrude'
import {TriangulatePolygons} from '../../../tess/triangulation'
import Vector from '../../../../math/vector'
import Vector from 'math/vector';
import {curveTessParams} from "../../../../brep/geom/impl/curve/curve-tess";

View file

@ -1,7 +1,7 @@
import {PreviewWizard, IMAGINARY_SURFACE_MATERIAL} from './preview-wizard'
import {CURRENT_SELECTION as S} from './wizard'
import {AXIS, IDENTITY_BASIS, STANDARD_BASES} from '../../../../math/l3space'
import Vector from '../../../../math/vector'
import Vector from 'math/vector';
const METADATA = [
['orientation', 'choice', 'XY', {options: ['XY', 'XZ', 'ZY']}],

View file

@ -3,7 +3,7 @@ import {PreviewWizard, SketchBasedNurbsPreviewer } from './preview-wizard'
import {TriangulatePolygons} from '../../../tess/triangulation'
import {revolveToWallNurbs} from '../../../../brep/brep-builder'
import {evalPivot} from '../revolve'
import Vector from '../../../../math/vector'
import Vector from 'math/vector';
const METADATA = [
['angle' , 'number', 5, {min: -360, max: 360, step: 10}],

View file

@ -1,5 +1,5 @@
import {Matrix3} from '../../../math/l3space'
import Vector from '../../../math/vector'
import Vector from 'math/vector';
import * as math from '../../../math/math'
import {createShared} from '../../cad-utils'

View file

@ -1,7 +1,7 @@
import * as tk from '../../../../ui/toolkit.js'
import * as workbench from '../workbench'
import * as cad_utils from '../../../cad-utils'
import Vector from '../../../../math/vector'
import Vector from 'math/vector';
import {Matrix3, ORIGIN} from '../../../../math/l3space'
import {OpWizard, IMAGINE_MATERIAL, BASE_MATERIAL} from './wizard-commons'

View file

@ -1,7 +1,7 @@
import * as tk from '../../../../ui/toolkit.js'
import * as workbench from '../workbench'
import * as cad_utils from '../../../cad-utils'
import Vector from '../../../../math/vector'
import Vector from 'math/vector';
import {Wizard} from './wizard-commons'
import {LoadSTLFromURL} from '../../../io'

View file

@ -1,7 +1,7 @@
import * as tk from '../../../../ui/toolkit.js'
import * as workbench from '../workbench'
import * as cad_utils from '../../../cad-utils'
import Vector from '../../../../math/vector'
import Vector from 'math/vector';
import {Matrix3, ORIGIN} from '../../../../math/l3space'
import {revolveToTriangles} from '../revolve'
import {OpWizard, IMAGINARY_SURFACE_MATERIAL, } from './wizard-commons'

View file

@ -1,4 +1,4 @@
import Vector from '../../../math/vector'
import Vector from 'math/vector';
import * as cad_utils from '../../cad-utils'
import * as math from '../../../math/math'
import {LUT} from '../../../math/bezier-cubic'

View file

@ -1,6 +1,6 @@
import * as sm from './sketch-model'
import {Matrix3, AXIS, ORIGIN} from '../../../math/l3space'
import Vector from '../../../math/vector'
import Vector from 'math/vector';
import {Graph} from '../../../math/graph'
import * as math from '../../../math/math'
import {HashTable} from '../../../utils/hashmap'

View file

@ -2,7 +2,7 @@ import {checkForSelectedFaces} from './actions/action-helpers'
import {nurbsToThreeGeom, triangulateToThree} from './scene/brep-scene-object'
import {createSolidMaterial} from './scene/scene-object'
import DPR from '../utils/dpr'
import Vector from "../math/vector";
import Vector from 'math/vector';
import {NurbsCurve} from "../brep/geom/impl/nurbs";
import * as ui from '../ui/ui';

View file

@ -1,4 +1,4 @@
import Vector from '../math/vector'
import Vector from 'math/vector';
import * as cad_utils from './cad-utils'
import * as math from '../math/math'
import {Matrix3, AXIS, ORIGIN} from '../math/l3space'

View file

@ -1,3 +1,4 @@
import './scene/vector-three-ench'
import {Bus} from '../ui/toolkit'
import {Viewer} from './viewer'
import {UI} from './ui/ctrl'
@ -6,7 +7,7 @@ import ControlBar from './ui/control-bar'
import {InputManager} from './ui/input-manager'
import {ActionManager} from './actions/actions'
import * as AllActions from './actions/all-actions'
import Vector from '../math/vector'
import Vector from 'math/vector';
import {Matrix3, AXIS, ORIGIN, IDENTITY_BASIS} from '../math/l3space'
import {Craft} from './craft/craft'
import {ReadSketch} from './craft/sketch/sketch-reader'

View file

@ -1,4 +1,4 @@
import Vector from '../../math/vector'
import Vector from 'math/vector';
import {EDGE_AUX, FACE_CHUNK} from '../../brep/stitching'
import {normalOfCCWSeq} from '../cad-utils'
import {TriangulateFace} from '../tess/triangulation'

View file

@ -1,5 +1,5 @@
import {HashTable} from '../../utils/hashmap'
import Vector from '../../math/vector'
import Vector from 'math/vector';
import Counters from '../counters'
import {findOutline, segmentsToPaths, reconstructSketchBounds} from '../craft/mesh/workbench'
import {Matrix3, AXIS} from '../../math/l3space'

View file

@ -1,4 +1,4 @@
import Vector from '../../math/vector'
import Vector from 'math/vector';
import {STANDARD_BASES} from '../../math/l3space'
import {Plane} from '../../brep/geom/impl/plane'
import {SceneSolid, SceneFace} from './scene-object'

View file

@ -1,5 +1,5 @@
import {HashTable} from '../../utils/hashmap'
import Vector from '../../math/vector'
import Vector from 'math/vector';
import Counters from '../counters'
import {Matrix3, BasisForPlane} from '../../math/l3space'
import {isCurveClass} from '../cad-utils'

View file

@ -1,9 +1,5 @@
import Vector from 'math/vector'
console.log(new Vector().fromData)
import Vector from 'math/vector';
Vector.prototype.three = function() {
return new THREE.Vector3(this.x, this.y, this.z);
};
export default Vector;

View file

@ -1,4 +1,4 @@
import Vector from "../../math/vector";
import Vector from 'math/vector';
import ClipperLib from 'clipper-lib';
import libtess from 'libtess'

View file

@ -1,7 +1,7 @@
import libtess from 'libtess'
import {Point} from '../../brep/geom/point'
import {Vertex} from '../../brep/topo/vertex'
import Vector from "../../math/vector";
import Vector from 'math/vector';
function initTesselator() {
// function called for each vertex of tesselator output

View file

@ -2,7 +2,7 @@ import {BasisForPlane, Matrix3} from '../../../math/l3space'
import * as math from '../../../math/math'
import {Point} from '../point'
import {Surface} from "../surface";
import Vector from "../../../math/vector";
import Vector from 'math/vector';
import * as ext from "./nurbs-ext";
import {EPSILON, eqEps, eqSqTol, TOLERANCE, TOLERANCE_SQ, ueq, veq, veq3, veqNeg} from "../tolerance";
import curveIntersect from "./curve/curves-isec";

View file

@ -1,3 +1,3 @@
import Vector from '../../math/vector'
import Vector from 'math/vector';
export const Point = Vector;

View file

@ -1,4 +1,4 @@
import Vector from '../math/vector'
import Vector from 'math/vector';
class Tree {

View file

@ -1,6 +1,6 @@
import {Face} from '../topo/face';
import {Vertex} from '../topo/vertex';
import Vector from '../../math/vector';
import Vector from 'math/vector';
import {isCCW} from '../../math/math';
import PIP from '../../3d/tess/pip';

View file

@ -1,4 +1,4 @@
import Vector from './vector'
import Vector from 'math/vector';
export default class BBox {

View file

@ -1,4 +1,4 @@
import Vector from './vector'
import Vector from 'math/vector';
import * as math from './math'
export function LUT(a, b, cp1, cp2, scale) {

View file

@ -1,4 +1,4 @@
import Vector from './vector';
import Vector from 'math/vector';
var ORIGIN = new Vector(0, 0, 0);

View file

@ -1,4 +1,4 @@
import Vector from './vector'
import Vector from 'math/vector';
import BBox from './bbox'
export const TOLERANCE = 1E-6;

View file

@ -11,7 +11,7 @@ import {BezierCurve} from './shapes/bezier-curve'
import {HDimension, VDimension, Dimension, DiameterDimension} from './shapes/dim'
import {Constraints} from './parametric'
import {HashTable} from '../utils/hashmap'
import Vector from '../math/vector'
import Vector from 'math/vector';
const Types = {
END_POINT : 'TCAD.TWO.EndPoint',

View file

@ -2,7 +2,7 @@ import * as utils from '../utils/utils'
import {Ref} from './shapes/ref'
import {Param, prepare} from './constr/solver'
import {createByConstraintName} from './constr/constraints'
import Vector from '../math/vector'
import Vector from 'math/vector';
import * as math from '../math/math'
import * as fetch from './fetchers'

View file

@ -1,6 +1,6 @@
import * as utils from '../../utils/utils';
import * as math from '../../math/math';
import Vector from '../../math/vector'
import Vector from 'math/vector';
import {Ref} from './ref'
import {Constraints} from '../parametric'
import {SketchObject} from './sketch-object'

View file

@ -1,6 +1,6 @@
import * as utils from '../../utils/utils'
import * as math from '../../math/math'
import Vector from '../../math/vector'
import Vector from 'math/vector';
import {SketchObject} from './sketch-object'
class LinearDimension extends SketchObject {

View file

@ -1,7 +1,7 @@
import {SketchObject} from './sketch-object'
import {DrawPoint} from './draw-utils'
import {Generator} from '../id-generator'
import Vector from '../../math/vector'
import Vector from 'math/vector';
export class EndPoint extends SketchObject {

View file

@ -1,5 +1,5 @@
import {SketchObject} from './sketch-object'
import Vector from '../../math/vector'
import Vector from 'math/vector';
import {Constraints} from '../parametric'
import * as math from '../../math/math'

View file

@ -1,7 +1,7 @@
import {Arc} from '../shapes/arc'
import {EndPoint} from '../shapes/point'
import {Tool} from './tool'
import Vector from '../../math/vector'
import Vector from 'math/vector';
import * as math from '../../math/math';
export class AddArcTool extends Tool {

View file

@ -2,7 +2,7 @@ import {Tool} from './tool'
import {EndPoint} from '../shapes/point'
import {BezierCurve} from '../shapes/bezier-curve'
import {Constraints} from '../parametric'
import Vector from '../../math/vector'
import Vector from 'math/vector';
import * as math from '../../math/math'
export class BezierCurveTool extends Tool {

View file

@ -1,5 +1,5 @@
import {HDimension, VDimension, Dimension, DiameterDimension} from '../shapes/dim'
import Vector from '../../math/vector'
import Vector from 'math/vector';
import {EndPoint} from '../shapes/point'
import {Tool} from './tool'

View file

@ -2,7 +2,7 @@ import {Tool} from './tool'
import {EndPoint} from '../shapes/point'
import {Ellipse} from '../shapes/ellipse'
import {EllipticalArc} from '../shapes/elliptical-arc'
import Vector from '../../math/vector'
import Vector from 'math/vector';
export const STATE_POINT1 = 0;
export const STATE_POINT2 = 1;

View file

@ -1,4 +1,4 @@
import Vector from '../../math/vector'
import Vector from 'math/vector';
import {Styles} from '../styles'
import * as fetch from '../fetchers'
import * as math from '../../math/math'

View file

@ -1,7 +1,7 @@
import {LoopPickTool} from './loop-pick'
import {Constraints} from '../parametric'
import * as math from '../../math/math';
import Vector from '../../math/vector';
import Vector from 'math/vector';
import {swap} from '../../utils/utils'
import {EndPoint} from '../shapes/point'
import {Arc} from '../shapes/arc'

View file

@ -11,7 +11,7 @@ import {EndPoint} from './shapes/point'
import {Point} from './shapes/primitives'
import {ReferencePoint} from './shapes/reference-point'
import {BasisOrigin} from './shapes/basis-origin'
import Vector from '../math/vector'
import Vector from 'math/vector';
import * as draw_utils from './shapes/draw-utils'
import * as math from '../math/math'

View file

@ -1,7 +1,7 @@
import * as test from '../test'
import * as sketcher_utils from '../utils/sketcher-utils'
import {TestMouseEvent} from '../utils/mouse-event'
import Vector from '../../app/math/vector';
import Vector from 'math/vector';
export default {
testRefreshHappensOnce: function (env) {

View file

@ -2,7 +2,7 @@ import * as test from '../test'
import * as sketcher_utils from '../utils/sketcher-utils'
import * as keyboard from '../utils/keyboard'
import {TestMouseEvent} from '../utils/mouse-event'
import Vector from '../../app/math/vector';
import Vector from 'math/vector';
export default {
testSegmentWizard: function(env) {

View file

@ -1,5 +1,5 @@
import {TestMouseEvent} from './mouse-event'
import Vector from '../../app/math/vector';
import Vector from 'math/vector';
export function toModel(app, x, y) {
return app.viewer._screenToModel(x, y);