diff --git a/web/app/math/math.js b/modules/math/commons.js similarity index 98% rename from web/app/math/math.js rename to modules/math/commons.js index d3a7f05f..4ca7a890 100644 --- a/web/app/math/math.js +++ b/modules/math/commons.js @@ -1,8 +1,8 @@ import Vector from 'math/vector'; -import BBox from './bbox' +import BBox from '../../web/app/math/bbox' import * as vec from 'math/vec'; import {perp2d} from "math/vec"; -import {eqTol} from "../brep/geom/tolerance"; +import {eqTol} from "../../web/app/brep/geom/tolerance"; export const TOLERANCE = 1E-6; export const TOLERANCE_SQ = TOLERANCE * TOLERANCE; diff --git a/modules/math/vector.ts b/modules/math/vector.ts index b469625c..cb9b50ff 100644 --- a/modules/math/vector.ts +++ b/modules/math/vector.ts @@ -1,4 +1,4 @@ -import {clamp} from "../../web/app/math/math"; +import {clamp} from "math/commons"; export default class Vector { diff --git a/modules/scene/objects/meshLine.js b/modules/scene/objects/meshLine.js index 92342879..47223be8 100644 --- a/modules/scene/objects/meshLine.js +++ b/modules/scene/objects/meshLine.js @@ -1,5 +1,5 @@ import * as vec from 'math/vec'; -import {perpendicularVector} from '../../../web/app/math/math'; +import {perpendicularVector} from '../../math/commons'; import {Face3, Geometry, Vector3} from 'three'; export function createMeshLineGeometry(points, width) { diff --git a/test/coreTests/subjects/sketcherTPI.js b/test/coreTests/subjects/sketcherTPI.js index 6a7da9b6..2babc135 100644 --- a/test/coreTests/subjects/sketcherTPI.js +++ b/test/coreTests/subjects/sketcherTPI.js @@ -1,6 +1,6 @@ import * as sketcher_utils from '../utils/sketcherUtils' import {genSerpinskiImpl} from '../../../web/app/utils/genSerpinski'; -import {distance} from '../../../web/app/math/math'; +import {distance} from 'math/commons'; export function createSubjectFromInPlaceSketcher(ctx) { return createSketcherTPI(ctx.services.sketcher.inPlaceEditor.sketcherAppContext); diff --git a/web/app/brep/brep-enclose.js b/web/app/brep/brep-enclose.js index e72b8baa..09ee2702 100644 --- a/web/app/brep/brep-enclose.js +++ b/web/app/brep/brep-enclose.js @@ -5,7 +5,7 @@ import BrepCurve from './geom/curves/brepCurve'; import {Plane} from './geom/impl/plane'; import {BasisForPlane} from 'math/l3space'; import * as cad_utils from '../cad/cad-utils'; -import * as math from '../math/math'; +import * as math from '../../../modules/math/commons'; import {createBoundingSurface} from './brep-builder'; import NurbsSurface from './geom/surfaces/nurbsSurface'; import {BrepSurface} from './geom/surfaces/brepSurface'; diff --git a/web/app/brep/debug/debugger/utils.jsx b/web/app/brep/debug/debugger/utils.jsx index 46df428c..44db4cf3 100644 --- a/web/app/brep/debug/debugger/utils.jsx +++ b/web/app/brep/debug/debugger/utils.jsx @@ -3,7 +3,7 @@ import { AQUA, BLACK, BLUE, cycleColor, DETECTED_EDGE, DISCARDED_EDGE, GREEN, RED, SALMON, WHITE, YELLOW } from "./colors"; -import {distanceAB3} from "../../../math/math"; +import {distanceAB3} from "../../../../../modules/math/commons"; import Section from "./section"; export function getFacesViewObjects(group3d, category, context, out, faces) { diff --git a/web/app/brep/geom/curves/brepCurve.ts b/web/app/brep/geom/curves/brepCurve.ts index c8a65afb..9e7de511 100644 --- a/web/app/brep/geom/curves/brepCurve.ts +++ b/web/app/brep/geom/curves/brepCurve.ts @@ -1,6 +1,6 @@ import NurbsCurve from "./nurbsCurve"; import {Vec3} from 'math/l3space' -import {areEqual} from '../../../math/math' +import {areEqual} from 'math/commons' import {eqSqTol, ueq, veq, veq3, veqNeg} from "../tolerance"; import curveIntersect from "../impl/curve/curves-isec"; diff --git a/web/app/brep/geom/curves/frenetFrame.js b/web/app/brep/geom/curves/frenetFrame.js index 10eee36a..849ac81b 100644 --- a/web/app/brep/geom/curves/frenetFrame.js +++ b/web/app/brep/geom/curves/frenetFrame.js @@ -1,5 +1,5 @@ import * as vec from 'math/vec'; -import {perpendicularVector} from '../../../math/math'; +import {perpendicularVector} from '../../../../../modules/math/commons'; export function frenetFrame(D1, D2) { let T = vec.normalize(D1); diff --git a/web/app/brep/geom/impl/curve/curves-isec.js b/web/app/brep/geom/impl/curve/curves-isec.js index d5c4e7d4..21bb3f4e 100644 --- a/web/app/brep/geom/impl/curve/curves-isec.js +++ b/web/app/brep/geom/impl/curve/curves-isec.js @@ -1,6 +1,6 @@ import * as vec from "math/vec"; import {TOLERANCE, TOLERANCE_SQ} from '../../tolerance'; -import * as math from '../../../../math/math' +import * as math from '../../../../../../modules/math/commons' import {fmin_bfgs} from "../../../../math/optim"; export default function curveIntersect(curve1, curve2, isecRange1, isecRange2, tesselator) { diff --git a/web/app/brep/geom/impl/nurbs-ext.ts b/web/app/brep/geom/impl/nurbs-ext.ts index fadbef89..5bb89888 100644 --- a/web/app/brep/geom/impl/nurbs-ext.ts +++ b/web/app/brep/geom/impl/nurbs-ext.ts @@ -1,5 +1,5 @@ import * as vec from "math/vec"; -import * as math from '../../../math/math' +import * as math from 'math/commons' import {eqEps, TOLERANCE, TOLERANCE_01, TOLERANCE_SQ} from '../tolerance'; import {fmin_bfgs} from "../../../math/optim"; import {Vec3} from "math/l3space"; diff --git a/web/app/brep/geom/tolerance.ts b/web/app/brep/geom/tolerance.ts index 21e2e6f6..9d786fbe 100644 --- a/web/app/brep/geom/tolerance.ts +++ b/web/app/brep/geom/tolerance.ts @@ -1,4 +1,4 @@ -import {areEqual, areNegVectorsEqual, areVectorsEqual, areVectorsEqual3, distanceSquared3} from '../../math/math'; +import {areEqual, areNegVectorsEqual, areVectorsEqual, areVectorsEqual3, distanceSquared3} from 'math/commons'; export const TOLERANCE = 1e-3; export const TOLERANCE_SQ = TOLERANCE * TOLERANCE; diff --git a/web/app/brep/null-face-merge.js b/web/app/brep/null-face-merge.js index a98d3a5b..8ff9e28c 100644 --- a/web/app/brep/null-face-merge.js +++ b/web/app/brep/null-face-merge.js @@ -1,4 +1,4 @@ -import * as math from '../math/math' +import * as math from '../../../modules/math/commons' import {Edge} from './topo/edge' export default function({curve, start}) { diff --git a/web/app/brep/operations/boolean.js b/web/app/brep/operations/boolean.js index db7ed553..35cef7f4 100644 --- a/web/app/brep/operations/boolean.js +++ b/web/app/brep/operations/boolean.js @@ -4,7 +4,7 @@ import {Loop} from '../topo/loop'; import {Shell} from '../topo/shell'; import {Vertex} from '../topo/vertex'; import {evolveFace} from './evolve-face' -import * as math from '../../math/math'; +import * as math from '../../../../modules/math/commons'; import {eqTol, TOLERANCE, ueq, veq, veqNeg} from '../geom/tolerance'; import CadError from "../../utils/errors"; import {createBoundingSurface} from "../brep-builder"; diff --git a/web/app/brep/operations/evolve-face.js b/web/app/brep/operations/evolve-face.js index 37efa045..e2cd3bc9 100644 --- a/web/app/brep/operations/evolve-face.js +++ b/web/app/brep/operations/evolve-face.js @@ -1,7 +1,7 @@ import {Face} from '../topo/face'; import {Vertex} from '../topo/vertex'; import Vector from 'math/vector'; -import {isCCW} from '../../math/math'; +import {isCCW} from '../../../../modules/math/commons'; import PIP from '../../cad/tess/pip'; export function evolveFace(originFace, loops) { diff --git a/web/app/brep/topo/loop.ts b/web/app/brep/topo/loop.ts index 6aa66a59..cc4d6794 100644 --- a/web/app/brep/topo/loop.ts +++ b/web/app/brep/topo/loop.ts @@ -1,6 +1,6 @@ import {TopoObject} from './topo-object' -import * as math from '../../math/math' +import * as math from 'math/commons' import {Face} from "./face"; import {BrepSurface} from "../geom/surfaces/brepSurface"; import {HalfEdge} from "./edge"; diff --git a/web/app/brep/utils/pickPointInPolygon.js b/web/app/brep/utils/pickPointInPolygon.js index a4be06b3..3bba0ef8 100644 --- a/web/app/brep/utils/pickPointInPolygon.js +++ b/web/app/brep/utils/pickPointInPolygon.js @@ -1,5 +1,5 @@ import libtess from 'libtess' -import {area} from "../../math/math"; +import {area} from "../../../../modules/math/commons"; export default function pickPointInside2dPolygon(polygon) { function vertexCallback(data, tr) { diff --git a/web/app/cad/assembly/dof/EEDOF.ts b/web/app/cad/assembly/dof/EEDOF.ts index a1d1e52a..c9a84bdb 100644 --- a/web/app/cad/assembly/dof/EEDOF.ts +++ b/web/app/cad/assembly/dof/EEDOF.ts @@ -4,7 +4,7 @@ import {eqTol} from "../../../brep/geom/tolerance"; import {FaceTouchAlignConstraint} from "../constraints/faceTouchAlign"; import {Plane} from './../../../brep/geom/impl/plane'; import {AssemblyDOF, ModificationResponse} from "./assemblyDOF"; -import {areEqual, clamp, DEG_RAD, lineLineIntersection2d, lineLineIntersection} from "../../../math/math"; +import {areEqual, clamp, DEG_RAD, lineLineIntersection2d, lineLineIntersection} from "math/commons"; import {ConflictDOF} from "./conflictDOF"; import {PPPPDOF} from "./PPPPDOF"; import {EdgeAlignConstraint} from "../constraints/edgeAlign"; diff --git a/web/app/cad/assembly/dof/PPDOF.ts b/web/app/cad/assembly/dof/PPDOF.ts index 7de9a2f3..006fabda 100644 --- a/web/app/cad/assembly/dof/PPDOF.ts +++ b/web/app/cad/assembly/dof/PPDOF.ts @@ -4,7 +4,7 @@ import {eqTol} from "../../../brep/geom/tolerance"; import {FaceTouchAlignConstraint} from "../constraints/faceTouchAlign"; import {Plane} from './../../../brep/geom/impl/plane'; import {ANGULAR_ALLOWANCE, AssemblyDOF, ModificationResponse} from "./assemblyDOF"; -import {areEqual, clamp, DEG_RAD} from "../../../math/math"; +import {areEqual, clamp, DEG_RAD} from "math/commons"; import {ConflictDOF} from "./conflictDOF"; import {PPPPDOF} from "./PPPPDOF"; import {EdgeAlignConstraint} from "../constraints/edgeAlign"; diff --git a/web/app/cad/assembly/dof/assemblyDOF.ts b/web/app/cad/assembly/dof/assemblyDOF.ts index 154930b1..7da910ac 100644 --- a/web/app/cad/assembly/dof/assemblyDOF.ts +++ b/web/app/cad/assembly/dof/assemblyDOF.ts @@ -1,7 +1,7 @@ import Vector from "math/vector"; import {FaceTouchAlignConstraint} from "../constraints/faceTouchAlign"; import {EdgeAlignConstraint} from "../constraints/edgeAlign"; -import {DEG_RAD} from "../../../math/math"; +import {DEG_RAD} from "math/commons"; import {Matrix3} from "math/matrix"; export const ANGULAR_ALLOWANCE = 10 * DEG_RAD; diff --git a/web/app/cad/cad-utils.js b/web/app/cad/cad-utils.js index 7ac57d02..5ec934a3 100644 --- a/web/app/cad/cad-utils.js +++ b/web/app/cad/cad-utils.js @@ -1,6 +1,6 @@ import Vector from 'math/vector'; import BBox from '../math/bbox' -import * as math from '../math/math' +import * as math from '../../../modules/math/commons' import {MeshSceneSolid} from './scene/wrappers/meshSceneObject' import {Matrix3} from 'math/matrix'; diff --git a/web/app/cad/craft/cutExtrude/cutExtrude.js b/web/app/cad/craft/cutExtrude/cutExtrude.js index ce23cdda..3854c598 100644 --- a/web/app/cad/craft/cutExtrude/cutExtrude.js +++ b/web/app/cad/craft/cutExtrude/cutExtrude.js @@ -1,4 +1,4 @@ -import * as math from '../../../math/math' +import * as math from '../../../../../modules/math/commons' import {enclose} from '../../../brep/brep-enclose' import {BooleanOperation, combineShells} from '../booleanOperation' import {Matrix3} from 'math/matrix'; diff --git a/web/app/cad/craft/datum/rotate/rotateDatumOperation.js b/web/app/cad/craft/datum/rotate/rotateDatumOperation.js index de682573..079cd54e 100644 --- a/web/app/cad/craft/datum/rotate/rotateDatumOperation.js +++ b/web/app/cad/craft/datum/rotate/rotateDatumOperation.js @@ -2,7 +2,7 @@ import schema from './rotateDatumOpSchema'; import {MDatum} from '../../../model/mdatum'; import RotateDatumWizard from './RotateDatumWizard'; import {ORIGIN} from '../../../../../../modules/math/l3space'; -import {DEG_RAD} from '../../../../math/math'; +import {DEG_RAD} from '../../../../../../modules/math/commons'; import {Matrix3} from "../../../../../../modules/math/matrix"; diff --git a/web/app/cad/craft/revolve/revolvePreviewer.js b/web/app/cad/craft/revolve/revolvePreviewer.js index dc7fbcef..df6389fc 100644 --- a/web/app/cad/craft/revolve/revolvePreviewer.js +++ b/web/app/cad/craft/revolve/revolvePreviewer.js @@ -1,5 +1,5 @@ import {createMeshGeometry} from 'scene/geoms'; -import {DEG_RAD} from '../../../math/math'; +import {DEG_RAD} from '../../../../../modules/math/commons'; import {revolveToTriangles} from '../../legacy/mesh/revolve'; let cache = {}; diff --git a/web/app/cad/legacy/mesh/revolve.js b/web/app/cad/legacy/mesh/revolve.js index cd8dce36..309b75c1 100644 --- a/web/app/cad/legacy/mesh/revolve.js +++ b/web/app/cad/legacy/mesh/revolve.js @@ -1,5 +1,5 @@ import Vector from 'math/vector'; -import * as math from '../../../math/math' +import * as math from '../../../../../modules/math/commons' import {createShared} from '../../cad-utils' import {TriangulatePolygons} from '../../tess/triangulation'; import {Matrix3} from "../../../../../modules/math/matrix"; diff --git a/web/app/cad/legacy/mesh/workbench.js b/web/app/cad/legacy/mesh/workbench.js index 218059e3..ad10a29c 100644 --- a/web/app/cad/legacy/mesh/workbench.js +++ b/web/app/cad/legacy/mesh/workbench.js @@ -1,6 +1,6 @@ import Vector from 'math/vector'; import * as cad_utils from '../../cad-utils' -import * as math from '../../../math/math' +import * as math from '../../../../../modules/math/commons' import {HashTable} from '../../../utils/hashmap' import {Mesh} from '../mesh' import revolve from './revolve' diff --git a/web/app/cad/scene/wrappers/brepSceneObject.js b/web/app/cad/scene/wrappers/brepSceneObject.js index 92ace9bc..8c411443 100644 --- a/web/app/cad/scene/wrappers/brepSceneObject.js +++ b/web/app/cad/scene/wrappers/brepSceneObject.js @@ -4,7 +4,7 @@ import brepTess from '../../tess/brep-tess'; import tessellateSurface from '../../../brep/geom/surfaces/surfaceTess'; import {setAttribute} from '../../../../../modules/scene/objectData'; import * as vec from 'math/vec'; -import {perpendicularVector} from '../../../math/math'; +import {perpendicularVector} from '../../../../../modules/math/commons'; const SMOOTH_RENDERING = true; diff --git a/web/app/cad/sketch/sketchBoundaries.js b/web/app/cad/sketch/sketchBoundaries.js index 6d4faa66..465d8d78 100644 --- a/web/app/cad/sketch/sketchBoundaries.js +++ b/web/app/cad/sketch/sketchBoundaries.js @@ -1,4 +1,4 @@ -import {areEqual, circleFromPoints, distanceAB, radiusOfCurvature, TOLERANCE} from '../../math/math'; +import {areEqual, circleFromPoints, distanceAB, radiusOfCurvature, TOLERANCE} from '../../../../modules/math/commons'; import * as vec from 'math/vec'; import {iteratePath} from '../cad-utils'; import NurbsCurve from '../../brep/geom/curves/nurbsCurve'; diff --git a/web/app/cad/sketch/sketchModel.js b/web/app/cad/sketch/sketchModel.js index d065ff40..ca7f8e86 100644 --- a/web/app/cad/sketch/sketchModel.js +++ b/web/app/cad/sketch/sketchModel.js @@ -3,7 +3,7 @@ import BrepCurve from '../../brep/geom/curves/brepCurve'; import NurbsCurve from '../../brep/geom/curves/nurbsCurve'; import {Point} from '../../brep/geom/point' import {LUT} from '../../math/bezier-cubic' -import {distanceAB, isCCW, makeAngle0_360} from '../../math/math' +import {distanceAB, isCCW, makeAngle0_360} from '../../../../modules/math/commons' import {normalizeCurveEnds} from '../../brep/geom/impl/nurbs-ext'; import Vector from '../../../../modules/math/vector'; import {AXIS, ORIGIN} from '../../../../modules/math/l3space'; diff --git a/web/app/cad/sketch/sketchReader.js b/web/app/cad/sketch/sketchReader.js index 6dda629d..c24ae084 100644 --- a/web/app/cad/sketch/sketchReader.js +++ b/web/app/cad/sketch/sketchReader.js @@ -1,6 +1,6 @@ import * as sm from './sketchModel' import {Graph} from '../../math/graph' -import * as math from '../../math/math' +import * as math from '../../../../modules/math/commons' import {HashTable} from '../../utils/hashmap' import Joints from '../../../../modules/gems/joints'; import sketchObjectGlobalId from './sketchObjectGlobalId'; diff --git a/web/app/cad/tess/nested-loops.js b/web/app/cad/tess/nested-loops.js index 5568cdf9..8ce4b69d 100644 --- a/web/app/cad/tess/nested-loops.js +++ b/web/app/cad/tess/nested-loops.js @@ -1,5 +1,5 @@ import pip from "./pip"; -import {isCCW} from "../../math/math"; +import {isCCW} from "../../../../modules/math/commons"; export default function(loops) { const loops = loops.map(loop => new NestedLoop(loop)); diff --git a/web/app/cad/tess/pip.js b/web/app/cad/tess/pip.js index e3a7f723..85a38154 100644 --- a/web/app/cad/tess/pip.js +++ b/web/app/cad/tess/pip.js @@ -1,4 +1,4 @@ -import {areEqual} from "../../math/math"; +import {areEqual} from "../../../../modules/math/commons"; export default function(outerLoop, innerLoops, tol) { diff --git a/web/app/math/optim.js b/web/app/math/optim.js index efbabb8d..03fa55e1 100644 --- a/web/app/math/optim.js +++ b/web/app/math/optim.js @@ -1,5 +1,5 @@ import numeric from 'numeric'; -import {_vec, _matrix} from './math' +import {_vec, _matrix} from '../../../modules/math/commons' const SUCCESS = 1, ITER_LIMIT = 2, SMALL_DELTA = 3, SMALL_STEP = 4, DIVERGENCE = 5, INVALID_STATE = 6; diff --git a/web/app/math/qr.js b/web/app/math/qr.js index 439dc230..05b56fc7 100644 --- a/web/app/math/qr.js +++ b/web/app/math/qr.js @@ -1,5 +1,5 @@ import {fillArray} from '../utils/utils' -import * as math from './math' +import * as math from '../../../modules/math/commons' /** @constructor */ function QR(matrix) { diff --git a/web/app/sketcher/constr/ANConstraints.ts b/web/app/sketcher/constr/ANConstraints.ts index d2ab0d1b..1280180e 100644 --- a/web/app/sketcher/constr/ANConstraints.ts +++ b/web/app/sketcher/constr/ANConstraints.ts @@ -1,5 +1,5 @@ import {Param} from '../shapes/param'; -import {DEG_RAD, distanceAB, makeAngle0_360} from "../../math/math"; +import {DEG_RAD, distanceAB, makeAngle0_360} from "math/commons"; import {COS_FN, Polynomial, POW_1_FN, POW_2_FN, POW_3_FN, SIN_FN} from "./polynomial"; import {cubicBezierDer1, cubicBezierDer2, cubicBezierPoint} from "../../brep/geom/curves/bezierCubic"; diff --git a/web/app/sketcher/constr/barriers.js b/web/app/sketcher/constr/barriers.js index 85d3c8ed..5ad9fdfb 100644 --- a/web/app/sketcher/constr/barriers.js +++ b/web/app/sketcher/constr/barriers.js @@ -1,4 +1,4 @@ -import {sq} from "../../math/math"; +import {sq} from "../../../../modules/math/commons"; export function greaterThanConstraint(val) { const K = 100; diff --git a/web/app/sketcher/constr/residuals.js b/web/app/sketcher/constr/residuals.js index caa3e888..f2402292 100644 --- a/web/app/sketcher/constr/residuals.js +++ b/web/app/sketcher/constr/residuals.js @@ -1,4 +1,4 @@ -import {sq} from "../../math/math"; +import {sq} from "../../../../modules/math/commons"; export function R_Equal(params, [value]) { diff --git a/web/app/sketcher/constraints.js b/web/app/sketcher/constraints.js index dbf1d26c..a29d0172 100644 --- a/web/app/sketcher/constraints.js +++ b/web/app/sketcher/constraints.js @@ -1,5 +1,5 @@ import {Ref} from './shapes/ref'; -import * as math from '../math/math'; +import * as math from '../../../modules/math/commons'; import Vector from '../../../modules/math/vector'; class AbstractConstraint { diff --git a/web/app/sketcher/shapes/arc.ts b/web/app/sketcher/shapes/arc.ts index af018cb0..6fceefaa 100644 --- a/web/app/sketcher/shapes/arc.ts +++ b/web/app/sketcher/shapes/arc.ts @@ -1,9 +1,9 @@ -import * as math from '../../math/math'; +import * as math from 'math/commons'; import Vector from 'math/vector'; import {SketchObject, SketchObjectSerializationData} from './sketch-object'; import {Param} from "./param"; import {AlgNumConstraint, ConstraintDefinitions} from "../constr/ANConstraints"; -import {makeAngle0_360} from "../../math/math"; +import {makeAngle0_360} from "math/commons"; import {EndPoint, SketchPointSerializationData} from "./point"; export class Arc extends SketchObject { diff --git a/web/app/sketcher/shapes/bezier-curve.js b/web/app/sketcher/shapes/bezier-curve.js index 9f59bd11..a467b7b4 100644 --- a/web/app/sketcher/shapes/bezier-curve.js +++ b/web/app/sketcher/shapes/bezier-curve.js @@ -4,7 +4,7 @@ import {LUT} from '../../math/bezier-cubic' import {ConvexHull2D} from '../../math/convex-hull' import * as draw_utils from '../shapes/draw-utils' -import * as math from '../../math/math'; +import * as math from '../../../../modules/math/commons'; import {EndPoint} from "./point"; diff --git a/web/app/sketcher/shapes/circle.js b/web/app/sketcher/shapes/circle.js index afd82c10..474097d0 100644 --- a/web/app/sketcher/shapes/circle.js +++ b/web/app/sketcher/shapes/circle.js @@ -1,4 +1,4 @@ -import * as math from '../../math/math'; +import * as math from '../../../../modules/math/commons'; import {SketchObject} from './sketch-object' import {Param} from "./param"; import {EndPoint} from "./point"; diff --git a/web/app/sketcher/shapes/dim.js b/web/app/sketcher/shapes/dim.js index 38c34e8a..f54f3fe9 100644 --- a/web/app/sketcher/shapes/dim.js +++ b/web/app/sketcher/shapes/dim.js @@ -1,6 +1,6 @@ -import * as math from '../../math/math' +import * as math from '../../../../modules/math/commons' import * as vec from 'math/vec' -import {DEG_RAD, lineLineIntersection2d, makeAngle0_360, pointToLineSignedDistance} from '../../math/math' +import {DEG_RAD, lineLineIntersection2d, makeAngle0_360, pointToLineSignedDistance} from '../../../../modules/math/commons' import Vector from 'math/vector'; import {Styles} from "../styles"; import {TextHelper} from "./textHelper"; diff --git a/web/app/sketcher/shapes/ellipse.js b/web/app/sketcher/shapes/ellipse.js index e1d2cee9..61ee971c 100644 --- a/web/app/sketcher/shapes/ellipse.js +++ b/web/app/sketcher/shapes/ellipse.js @@ -1,6 +1,6 @@ import {SketchObject} from './sketch-object' -import * as math from '../../math/math'; +import * as math from '../../../../modules/math/commons'; import {Param} from "./param"; import {EndPoint} from "./point"; diff --git a/web/app/sketcher/shapes/elliptical-arc.js b/web/app/sketcher/shapes/elliptical-arc.js index b44543a1..4e448726 100644 --- a/web/app/sketcher/shapes/elliptical-arc.js +++ b/web/app/sketcher/shapes/elliptical-arc.js @@ -1,6 +1,6 @@ import {Ellipse} from './ellipse' -import * as math from '../../math/math'; +import * as math from '../../../../modules/math/commons'; import {swap} from '../../utils/utils' import {EndPoint} from "./point"; import {AlgNumConstraint, ConstraintDefinitions} from "../constr/ANConstraints"; diff --git a/web/app/sketcher/shapes/segment.ts b/web/app/sketcher/shapes/segment.ts index 33daf410..6288e0ec 100644 --- a/web/app/sketcher/shapes/segment.ts +++ b/web/app/sketcher/shapes/segment.ts @@ -1,7 +1,7 @@ import {SketchObject, SketchObjectSerializationData} from './sketch-object' import Vector from 'math/vector'; -import * as math from '../../math/math' -import {DEG_RAD, makeAngle0_360} from '../../math/math' +import * as math from 'math/commons' +import {DEG_RAD, makeAngle0_360} from 'math/commons' import {Param} from "./param"; import {AlgNumConstraint, ConstraintDefinitions} from "../constr/ANConstraints"; import {EndPoint, SketchPointSerializationData} from "./point"; diff --git a/web/app/sketcher/shapes/textHelper.js b/web/app/sketcher/shapes/textHelper.js index 4ffab136..364249ee 100644 --- a/web/app/sketcher/shapes/textHelper.js +++ b/web/app/sketcher/shapes/textHelper.js @@ -1,4 +1,4 @@ -import {_270, _90, makeAngle0_360, pointToLineSignedDistance} from "../../math/math"; +import {_270, _90, makeAngle0_360, pointToLineSignedDistance} from "../../../../modules/math/commons"; import {_negate} from "math/vec"; export class TextHelper { diff --git a/web/app/sketcher/tools/arc.js b/web/app/sketcher/tools/arc.js index f0fc03da..e0dee219 100644 --- a/web/app/sketcher/tools/arc.js +++ b/web/app/sketcher/tools/arc.js @@ -2,7 +2,7 @@ import {Arc} from '../shapes/arc' import {EndPoint} from '../shapes/point' import {Tool} from './tool' import Vector from 'math/vector'; -import * as math from '../../math/math'; +import * as math from '../../../../modules/math/commons'; export class AddArcTool extends Tool { diff --git a/web/app/sketcher/tools/bezier-curve.js b/web/app/sketcher/tools/bezier-curve.js index 78f62441..da48e3fe 100644 --- a/web/app/sketcher/tools/bezier-curve.js +++ b/web/app/sketcher/tools/bezier-curve.js @@ -3,7 +3,7 @@ import {EndPoint} from '../shapes/point' import {BezierCurve} from '../shapes/bezier-curve' import {Constraints} from '../parametric' import Vector from 'math/vector'; -import * as math from '../../math/math' +import * as math from '../../../../modules/math/commons' import {AlgNumConstraint, ConstraintDefinitions} from "../constr/ANConstraints"; export class BezierCurveTool extends Tool { diff --git a/web/app/sketcher/tools/circle.js b/web/app/sketcher/tools/circle.js index 3b5936e4..20a68b9d 100644 --- a/web/app/sketcher/tools/circle.js +++ b/web/app/sketcher/tools/circle.js @@ -1,5 +1,5 @@ import {Tool} from './tool' -import * as math from '../../math/math'; +import * as math from '../../../../modules/math/commons'; import {EndPoint} from '../shapes/point' import {Circle} from '../shapes/circle' diff --git a/web/app/sketcher/tools/dim.js b/web/app/sketcher/tools/dim.js index 6b20badd..4b0bb457 100644 --- a/web/app/sketcher/tools/dim.js +++ b/web/app/sketcher/tools/dim.js @@ -12,7 +12,7 @@ import {DragTool} from "./drag"; import {isInstanceOf} from "../actions/matchUtils"; import {Segment} from "../shapes/segment"; import {DEFAULT_SEARCH_BUFFER} from "../viewer2d"; -import {distance} from "../../math/math"; +import {distance} from "../../../../modules/math/commons"; import {_negate, cross2d} from "math/vec"; export class AddDimTool extends Tool { diff --git a/web/app/sketcher/tools/drag.js b/web/app/sketcher/tools/drag.js index 23056004..a228877f 100644 --- a/web/app/sketcher/tools/drag.js +++ b/web/app/sketcher/tools/drag.js @@ -1,6 +1,6 @@ import {Tool} from './tool' import {optim} from '../../math/optim' -import * as math from '../../math/math' +import * as math from '../../../../modules/math/commons' import {toast} from "react-toastify"; export class DragTool extends Tool { diff --git a/web/app/sketcher/tools/fillet.js b/web/app/sketcher/tools/fillet.js index 64137b88..654a5cd3 100644 --- a/web/app/sketcher/tools/fillet.js +++ b/web/app/sketcher/tools/fillet.js @@ -1,7 +1,7 @@ import Vector from 'math/vector'; import {Styles} from '../styles' import * as fetch from '../fetchers' -import * as math from '../../math/math' +import * as math from '../../../../modules/math/commons' import {EndPoint} from '../shapes/point' import {Arc} from '../shapes/arc' import {Constraints} from '../parametric' diff --git a/web/app/sketcher/tools/offset.js b/web/app/sketcher/tools/offset.js index 8179b4b3..5f36405d 100644 --- a/web/app/sketcher/tools/offset.js +++ b/web/app/sketcher/tools/offset.js @@ -1,6 +1,6 @@ import {LoopPickTool} from './loop-pick' import {Constraints} from '../parametric' -import * as math from '../../math/math'; +import * as math from '../../../../modules/math/commons'; import Vector from 'math/vector'; import {swap} from '../../utils/utils' import {EndPoint} from '../shapes/point'