mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
geom module
This commit is contained in:
parent
945a7e27f1
commit
e11c1f7f4a
72 changed files with 72 additions and 72 deletions
|
|
@ -6,7 +6,7 @@ import curveTess from "../impl/curve/curve-tess";
|
||||||
import Point from 'math/vector';
|
import Point from 'math/vector';
|
||||||
import Vector from 'math/vector';
|
import Vector from 'math/vector';
|
||||||
import cache from "../impl/cache";
|
import cache from "../impl/cache";
|
||||||
import {Tessellation1D} from "../../../cad/craft/engine/tessellation";
|
import {Tessellation1D} from "../../../web/app/cad/craft/engine/tessellation";
|
||||||
import {Matrix3x4} from "math/matrix";
|
import {Matrix3x4} from "math/matrix";
|
||||||
import {areEqual} from "math/equality";
|
import {areEqual} from "math/equality";
|
||||||
import {Vec3} from "math/vec";
|
import {Vec3} from "math/vec";
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import * as vec from 'math/vec';
|
import * as vec from 'math/vec';
|
||||||
import {perpendicularVector} from "../../../../../modules/math/euclidean";
|
import {perpendicularVector} from "../../math/euclidean";
|
||||||
|
|
||||||
export function frenetFrame(D1, D2) {
|
export function frenetFrame(D1, D2) {
|
||||||
let T = vec.normalize(D1);
|
let T = vec.normalize(D1);
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as vec from "math/vec";
|
import * as vec from "math/vec";
|
||||||
import {TOLERANCE, TOLERANCE_SQ} from '../../tolerance';
|
import {TOLERANCE, TOLERANCE_SQ} from '../../tolerance';
|
||||||
import {fmin_bfgs} from 'math/optim/bfgs';
|
import {fmin_bfgs} from 'math/optim/bfgs';
|
||||||
import {areEqual} from "../../../../../../modules/math/equality";
|
import {areEqual} from "../../../math/equality";
|
||||||
|
|
||||||
export default function curveIntersect(curve1, curve2, isecRange1, isecRange2, tesselator) {
|
export default function curveIntersect(curve1, curve2, isecRange1, isecRange2, tesselator) {
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import {Point} from './point'
|
import {Point} from './point'
|
||||||
import {defineIterable} from '../../utils/utils'
|
import {defineIterable} from '../../web/app/utils/utils'
|
||||||
|
|
||||||
class Path {
|
class Path {
|
||||||
|
|
||||||
|
|
@ -3,7 +3,7 @@ import BBox from "./bbox";
|
||||||
import {TOLERANCE} from "math/equality";
|
import {TOLERANCE} from "math/equality";
|
||||||
import * as vec from "math/vec";
|
import * as vec from "math/vec";
|
||||||
import {perp2d} from "math/vec";
|
import {perp2d} from "math/vec";
|
||||||
import {eqTol} from "../../web/app/brep/geom/tolerance";
|
import {eqTol} from "geom/tolerance";
|
||||||
import {distance} from "math/distance";
|
import {distance} from "math/distance";
|
||||||
import {IDENTITY_BASIS3} from "math/basis";
|
import {IDENTITY_BASIS3} from "math/basis";
|
||||||
import Vector from "math/vector";
|
import Vector from "math/vector";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import {veqXYZ} from '../../web/app/brep/geom/tolerance';
|
import {veqXYZ} from '../geom/tolerance';
|
||||||
import Vector from './vector';
|
import Vector from './vector';
|
||||||
|
|
||||||
export default class VectorFactory {
|
export default class VectorFactory {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import {Face3, FaceColors, Geometry, Mesh, MeshBasicMaterial, MeshPhongMaterial} from 'three';
|
import {Face3, FaceColors, Geometry, Mesh, MeshBasicMaterial, MeshPhongMaterial} from 'three';
|
||||||
import {advancePseudoFrenetFrame, frenetFrame, pseudoFrenetFrame} from '../../../web/app/brep/geom/curves/frenetFrame';
|
import {advancePseudoFrenetFrame, frenetFrame, pseudoFrenetFrame} from '../../geom/curves/frenetFrame';
|
||||||
import * as vec from 'math/vec';
|
import * as vec from 'math/vec';
|
||||||
import {viewScaleFactor} from '../scaleHelper';
|
import {viewScaleFactor} from '../scaleHelper';
|
||||||
import {arrToThree} from 'math/vectorAdapters';
|
import {arrToThree} from 'math/vectorAdapters';
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
import {Plane} from './geom/impl/plane';
|
import {Plane} from '../../../modules/geom/impl/plane';
|
||||||
import {Point} from './geom/point';
|
import {Point} from '../../../modules/geom/point';
|
||||||
import {Shell} from './topo/shell';
|
import {Shell} from './topo/shell';
|
||||||
import {Face} from './topo/face';
|
import {Face} from './topo/face';
|
||||||
import {Loop} from './topo/loop';
|
import {Loop} from './topo/loop';
|
||||||
import {Vertex} from './topo/vertex';
|
import {Vertex} from './topo/vertex';
|
||||||
import {normalOfCCWSeq} from '../cad/cad-utils';
|
import {normalOfCCWSeq} from '../cad/cad-utils';
|
||||||
import BBox from '../../../modules/math/bbox';
|
import BBox from '../../../modules/math/bbox';
|
||||||
import NurbsSurface from './geom/surfaces/nurbsSurface';
|
import NurbsSurface from '../../../modules/geom/surfaces/nurbsSurface';
|
||||||
import {BrepSurface} from './geom/surfaces/brepSurface';
|
import {BrepSurface} from '../../../modules/geom/surfaces/brepSurface';
|
||||||
import EdgeIndex from './edgeIndex';
|
import EdgeIndex from './edgeIndex';
|
||||||
|
|
||||||
export default class BrepBuilder {
|
export default class BrepBuilder {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import {Shell} from './topo/shell';
|
import {Shell} from './topo/shell';
|
||||||
import {Face} from './topo/face';
|
import {Face} from './topo/face';
|
||||||
import {Edge} from './topo/edge';
|
import {Edge} from './topo/edge';
|
||||||
import BrepCurve from './geom/curves/brepCurve';
|
import BrepCurve from '../../../modules/geom/curves/brepCurve';
|
||||||
import {Plane} from './geom/impl/plane';
|
import {Plane} from '../../../modules/geom/impl/plane';
|
||||||
import * as cad_utils from '../cad/cad-utils';
|
import * as cad_utils from '../cad/cad-utils';
|
||||||
import {createBoundingSurface} from './brep-builder';
|
import {createBoundingSurface} from './brep-builder';
|
||||||
import NurbsSurface from './geom/surfaces/nurbsSurface';
|
import NurbsSurface from '../../../modules/geom/surfaces/nurbsSurface';
|
||||||
import {BrepSurface} from './geom/surfaces/brepSurface';
|
import {BrepSurface} from '../../../modules/geom/surfaces/brepSurface';
|
||||||
import {Matrix3x4} from 'math/matrix';
|
import {Matrix3x4} from 'math/matrix';
|
||||||
import {BasisForPlane} from "math/basis";
|
import {BasisForPlane} from "math/basis";
|
||||||
import {isCCW as isCCWtest} from "math/euclidean";
|
import {isCCW as isCCWtest} from "math/euclidean";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import {Point} from './geom/point'
|
import {Point} from '../../../modules/geom/point'
|
||||||
import {Plane} from './geom/impl/plane'
|
import {Plane} from '../../../modules/geom/impl/plane'
|
||||||
import {createPrism, enclose} from './brep-enclose'
|
import {createPrism, enclose} from './brep-enclose'
|
||||||
import {Circle} from '../cad/sketch/sketchModel'
|
import {Circle} from '../cad/sketch/sketchModel'
|
||||||
import CSys from 'math/csys';
|
import CSys from 'math/csys';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import {Edge} from './topo/edge';
|
import {Edge} from './topo/edge';
|
||||||
import BrepCurve from './geom/curves/brepCurve';
|
import BrepCurve from '../../../modules/geom/curves/brepCurve';
|
||||||
|
|
||||||
export default class EdgeIndex {
|
export default class EdgeIndex {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
import BrepBuilder, {createBoundingSurfaceFrom2DPoints, createBoundingSurfaceFromBBox} from '../brep-builder';
|
import BrepBuilder, {createBoundingSurfaceFrom2DPoints, createBoundingSurfaceFromBBox} from '../brep-builder';
|
||||||
import VertexFactory from '../vertexFactory';
|
import VertexFactory from '../vertexFactory';
|
||||||
import NurbsSurface from '../geom/surfaces/nurbsSurface';
|
import NurbsSurface from '../../../../modules/geom/surfaces/nurbsSurface';
|
||||||
import * as vec from 'math/vec';
|
import * as vec from 'math/vec';
|
||||||
import {BrepSurface} from '../geom/surfaces/brepSurface';
|
import {BrepSurface} from '../../../../modules/geom/surfaces/brepSurface';
|
||||||
import {Plane} from '../geom/impl/plane';
|
import {Plane} from '../../../../modules/geom/impl/plane';
|
||||||
import Vector from '../../../../modules/math/vector';
|
import Vector from '../../../../modules/math/vector';
|
||||||
import NullSurface from '../geom/surfaces/nullSurface';
|
import NullSurface from '../../../../modules/geom/surfaces/nullSurface';
|
||||||
import BBox from 'math/bbox';
|
import BBox from 'math/bbox';
|
||||||
import NurbsCurve from '../geom/curves/nurbsCurve';
|
import NurbsCurve from '../../../../modules/geom/curves/nurbsCurve';
|
||||||
import BrepCurve from '../geom/curves/brepCurve';
|
import BrepCurve from '../../../../modules/geom/curves/brepCurve';
|
||||||
import {BREPData} from "../../cad/craft/engine/brepData";
|
import {BREPData} from "../../cad/craft/engine/brepData";
|
||||||
|
|
||||||
export function readBrep(data: BREPData) {
|
export function readBrep(data: BREPData) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {Loop} from '../topo/loop';
|
||||||
import {Shell} from '../topo/shell';
|
import {Shell} from '../topo/shell';
|
||||||
import {Vertex} from '../topo/vertex';
|
import {Vertex} from '../topo/vertex';
|
||||||
import {evolveFace} from './evolve-face'
|
import {evolveFace} from './evolve-face'
|
||||||
import {eqTol, TOLERANCE, ueq, veq, veqNeg} from '../geom/tolerance';
|
import {eqTol, TOLERANCE, ueq, veq, veqNeg} from '../../../../modules/geom/tolerance';
|
||||||
import CadError from "../../utils/errors";
|
import CadError from "../../utils/errors";
|
||||||
import {createBoundingSurface} from "../brep-builder";
|
import {createBoundingSurface} from "../brep-builder";
|
||||||
import BREP_DEBUG from '../debug/brep-debug';
|
import BREP_DEBUG from '../debug/brep-debug';
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import {Loop} from '../topo/loop'
|
||||||
import {Face} from '../topo/face'
|
import {Face} from '../topo/face'
|
||||||
import {BREPValidator} from '../brep-validator';
|
import {BREPValidator} from '../brep-validator';
|
||||||
import {linkSegments} from '../brep-builder';
|
import {linkSegments} from '../brep-builder';
|
||||||
import {Line} from '../geom/impl/line'
|
import {Line} from '../../../../modules/geom/impl/line'
|
||||||
|
|
||||||
export function polyhedronify(shell) {
|
export function polyhedronify(shell) {
|
||||||
shell.reindexVertices();
|
shell.reindexVertices();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import {TopoObject} from './topo-object'
|
import {TopoObject} from './topo-object'
|
||||||
import {Vertex} from "./vertex";
|
import {Vertex} from "./vertex";
|
||||||
import BrepCurve from "../geom/curves/brepCurve";
|
import BrepCurve from "../../../../modules/geom/curves/brepCurve";
|
||||||
import {Loop} from "./loop";
|
import {Loop} from "./loop";
|
||||||
import Vector from "math/vector";
|
import Vector from "math/vector";
|
||||||
import {Tessellation1D} from "../../cad/craft/engine/tessellation";
|
import {Tessellation1D} from "../../cad/craft/engine/tessellation";
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import {TopoObject} from './topo-object'
|
import {TopoObject} from './topo-object'
|
||||||
import {Loop} from './loop'
|
import {Loop} from './loop'
|
||||||
import PIP from '../../cad/tess/pip';
|
import PIP from '../../cad/tess/pip';
|
||||||
import {veq} from "../geom/tolerance";
|
import {veq} from "geom/tolerance";
|
||||||
import {isOnPositiveHalfPlaneFromVec} from "../operations/boolean";
|
import {isOnPositiveHalfPlaneFromVec} from "../operations/boolean";
|
||||||
import {BrepSurface} from "../geom/surfaces/brepSurface";
|
import {BrepSurface} from "../../../../modules/geom/surfaces/brepSurface";
|
||||||
import {Shell} from "./shell";
|
import {Shell} from "./shell";
|
||||||
import {ProductionInfo} from "../../cad/craft/engine/productionInfo";
|
import {ProductionInfo} from "../../cad/craft/engine/productionInfo";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import {TopoObject} from './topo-object'
|
import {TopoObject} from './topo-object'
|
||||||
import {Face} from "./face";
|
import {Face} from "./face";
|
||||||
import {BrepSurface} from "../geom/surfaces/brepSurface";
|
import {BrepSurface} from "../../../../modules/geom/surfaces/brepSurface";
|
||||||
import {HalfEdge} from "./edge";
|
import {HalfEdge} from "./edge";
|
||||||
import {findLowestLeftPoint} from "math/euclidean";
|
import {findLowestLeftPoint} from "math/euclidean";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import pertrub from './vector-petrub';
|
import pertrub from './vector-petrub';
|
||||||
import BrepCurve from '../geom/curves/brepCurve';
|
import BrepCurve from '../../../../modules/geom/curves/brepCurve';
|
||||||
|
|
||||||
|
|
||||||
export class Ray {
|
export class Ray {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import {Vertex} from './topo/vertex';
|
import {Vertex} from './topo/vertex';
|
||||||
import {veqXYZ} from './geom/tolerance';
|
import {veqXYZ} from '../../../modules/geom/tolerance';
|
||||||
import {Point} from './geom/point';
|
import {Point} from '../../../modules/geom/point';
|
||||||
|
|
||||||
export default class VertexFactory {
|
export default class VertexFactory {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import Vector from "math/vector";
|
import Vector from "math/vector";
|
||||||
import { FaceTouchAlignConstraint } from "../constraints/faceTouchAlign";
|
import { FaceTouchAlignConstraint } from "../constraints/faceTouchAlign";
|
||||||
import { Plane } from './../../../brep/geom/impl/plane';
|
import { Plane } from '../../../../../modules/geom/impl/plane';
|
||||||
import { AssemblyDOF, ModificationResponse } from "./assemblyDOF";
|
import { AssemblyDOF, ModificationResponse } from "./assemblyDOF";
|
||||||
import { ConflictDOF } from './conflictDOF';
|
import { ConflictDOF } from './conflictDOF';
|
||||||
import {EdgeAlignConstraint} from "../constraints/edgeAlign";
|
import {EdgeAlignConstraint} from "../constraints/edgeAlign";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import Vector, {ORIGIN} from "math/vector";
|
import Vector, {ORIGIN} from "math/vector";
|
||||||
import {eqTol} from "../../../brep/geom/tolerance";
|
import {eqTol} from "geom/tolerance";
|
||||||
import {FaceTouchAlignConstraint} from "../constraints/faceTouchAlign";
|
import {FaceTouchAlignConstraint} from "../constraints/faceTouchAlign";
|
||||||
import {Plane} from './../../../brep/geom/impl/plane';
|
import {Plane} from '../../../../../modules/geom/impl/plane';
|
||||||
import {ANGULAR_ALLOWANCE, AssemblyDOF, ModificationResponse} from "./assemblyDOF";
|
import {ANGULAR_ALLOWANCE, AssemblyDOF, ModificationResponse} from "./assemblyDOF";
|
||||||
import {clamp, DEG_RAD} from "math/commons";
|
import {clamp, DEG_RAD} from "math/commons";
|
||||||
import {ConflictDOF} from "./conflictDOF";
|
import {ConflictDOF} from "./conflictDOF";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import Vector from "math/vector";
|
import Vector from "math/vector";
|
||||||
import { FaceTouchAlignConstraint } from "../constraints/faceTouchAlign";
|
import { FaceTouchAlignConstraint } from "../constraints/faceTouchAlign";
|
||||||
import { Plane } from './../../../brep/geom/impl/plane';
|
import { Plane } from '../../../../../modules/geom/impl/plane';
|
||||||
import { AssemblyDOF, ModificationResponse } from "./assemblyDOF";
|
import { AssemblyDOF, ModificationResponse } from "./assemblyDOF";
|
||||||
import { ConflictDOF } from './conflictDOF';
|
import { ConflictDOF } from './conflictDOF';
|
||||||
import {EdgeAlignConstraint} from "../constraints/edgeAlign";
|
import {EdgeAlignConstraint} from "../constraints/edgeAlign";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import Vector from "math/vector";
|
import Vector from "math/vector";
|
||||||
import { FaceTouchAlignConstraint } from "../constraints/faceTouchAlign";
|
import { FaceTouchAlignConstraint } from "../constraints/faceTouchAlign";
|
||||||
import { Plane } from './../../../brep/geom/impl/plane';
|
import { Plane } from '../../../../../modules/geom/impl/plane';
|
||||||
import { AssemblyDOF, ModificationResponse } from "./assemblyDOF";
|
import { AssemblyDOF, ModificationResponse } from "./assemblyDOF";
|
||||||
import { ConflictDOF } from './conflictDOF';
|
import { ConflictDOF } from './conflictDOF';
|
||||||
import {EdgeAlignConstraint} from "../constraints/edgeAlign";
|
import {EdgeAlignConstraint} from "../constraints/edgeAlign";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Plane } from './../../../brep/geom/impl/plane';
|
import { Plane } from '../../../../../modules/geom/impl/plane';
|
||||||
import {AssemblyDOF, ModificationResponse} from "./assemblyDOF";
|
import {AssemblyDOF, ModificationResponse} from "./assemblyDOF";
|
||||||
import Vector, {ORIGIN} from "math/vector";
|
import Vector, {ORIGIN} from "math/vector";
|
||||||
import {FaceTouchAlignConstraint} from "../constraints/faceTouchAlign";
|
import {FaceTouchAlignConstraint} from "../constraints/faceTouchAlign";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
import {getEncloseDetails, resolveExtrudeVector} from './cutExtrude';
|
import {getEncloseDetails, resolveExtrudeVector} from './cutExtrude';
|
||||||
import {curveTessParams} from "../../../brep/geom/impl/curve/curve-tess";
|
import {curveTessParams} from "../../../../../modules/geom/impl/curve/curve-tess";
|
||||||
import Vector from "math/vector";
|
import Vector from "math/vector";
|
||||||
import {TriangulatePolygons} from "../../tess/triangulation";
|
import {TriangulatePolygons} from "../../tess/triangulation";
|
||||||
import {createMeshGeometry} from "scene/geoms";
|
import {createMeshGeometry} from "scene/geoms";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import {createMeshGeometry} from 'scene/geoms';
|
import {createMeshGeometry} from 'scene/geoms';
|
||||||
import {Plane} from '../../../../brep/geom/impl/plane';
|
import {Plane} from '../../../../../../modules/geom/impl/plane';
|
||||||
import Vector from 'math/vector';
|
import Vector from 'math/vector';
|
||||||
import PlaneWizard from './PlaneWizard';
|
import PlaneWizard from './PlaneWizard';
|
||||||
import {MOpenFaceShell} from '../../../model/mopenFace';
|
import {MOpenFaceShell} from '../../../model/mopenFace';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import {createMeshGeometry} from 'scene/geoms';
|
import {createMeshGeometry} from 'scene/geoms';
|
||||||
import {Plane} from '../../../../brep/geom/impl/plane';
|
import {Plane} from '../../../../../../modules/geom/impl/plane';
|
||||||
import Vector from 'math/vector';
|
import Vector from 'math/vector';
|
||||||
import PlaneWizard from './SimplePlaneWizard';
|
import PlaneWizard from './SimplePlaneWizard';
|
||||||
import {MOpenFaceShell} from '../../../model/mopenFace';
|
import {MOpenFaceShell} from '../../../model/mopenFace';
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import * as vec from 'math/vec';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {readSketchFloat} from './sketch/sketchReader';
|
import {readSketchFloat} from './sketch/sketchReader';
|
||||||
import {toLoops} from '../brep/io/brepLoopsFormat';
|
import {toLoops} from '../brep/io/brepLoopsFormat';
|
||||||
import curveTess from '../brep/geom/impl/curve/curve-tess';
|
import curveTess from '../../../modules/geom/impl/curve/curve-tess';
|
||||||
import {LOG_FLAGS} from './logFlags';
|
import {LOG_FLAGS} from './logFlags';
|
||||||
import {state} from "lstream";
|
import {state} from "lstream";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ import {Loop} from '../../brep/topo/loop';
|
||||||
import {Face} from '../../brep/topo/face';
|
import {Face} from '../../brep/topo/face';
|
||||||
import {Shell} from '../../brep/topo/shell';
|
import {Shell} from '../../brep/topo/shell';
|
||||||
import {Vertex} from '../../brep/topo/vertex';
|
import {Vertex} from '../../brep/topo/vertex';
|
||||||
import {Point} from '../../brep/geom/point';
|
import {Point} from '../../../../modules/geom/point';
|
||||||
import BrepCurve from '../../brep/geom/curves/brepCurve';
|
import BrepCurve from '../../../../modules/geom/curves/brepCurve';
|
||||||
import {Plane} from '../../brep/geom/impl/plane';
|
import {Plane} from '../../../../modules/geom/impl/plane';
|
||||||
import pip from '../tess/pip';
|
import pip from '../tess/pip';
|
||||||
import {readShellEntityFromJson} from '../scene/wrappers/entityIO';
|
import {readShellEntityFromJson} from '../scene/wrappers/entityIO';
|
||||||
import * as vec from 'math/vec'
|
import * as vec from 'math/vec'
|
||||||
import NurbsSurface from '../../brep/geom/surfaces/nurbsSurface';
|
import NurbsSurface from '../../../../modules/geom/surfaces/nurbsSurface';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import {createBoundingSurfaceFrom2DPoints} from '../../brep/brep-builder';
|
import {createBoundingSurfaceFrom2DPoints} from '../../brep/brep-builder';
|
||||||
import NurbsSurface from '../../brep/geom/surfaces/nurbsSurface';
|
import NurbsSurface from '../../../../modules/geom/surfaces/nurbsSurface';
|
||||||
import {BrepSurface} from '../../brep/geom/surfaces/brepSurface';
|
import {BrepSurface} from '../../../../modules/geom/surfaces/brepSurface';
|
||||||
|
|
||||||
export class SurfacePrototype {
|
export class SurfacePrototype {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import BrepBuilder from '../brep/brep-builder'
|
import BrepBuilder from '../brep/brep-builder'
|
||||||
import * as BREPPrimitives from '../brep/brep-primitives'
|
import * as BREPPrimitives from '../brep/brep-primitives'
|
||||||
import BrepCurve from '../brep/geom/curves/brepCurve';
|
import BrepCurve from '../../../modules/geom/curves/brepCurve';
|
||||||
import NurbsCurve from "../brep/geom/curves/nurbsCurve";
|
import NurbsCurve from "../../../modules/geom/curves/nurbsCurve";
|
||||||
import {surfaceIntersect} from '../brep/geom/intersection/surfaceSurface';
|
import {surfaceIntersect} from '../../../modules/geom/intersection/surfaceSurface';
|
||||||
import NurbsSurface from '../brep/geom/surfaces/nurbsSurface';
|
import NurbsSurface from '../../../modules/geom/surfaces/nurbsSurface';
|
||||||
import {createOctreeFromSurface, traverseOctree} from "../../../modules/voxels/octree";
|
import {createOctreeFromSurface, traverseOctree} from "../../../modules/voxels/octree";
|
||||||
import {Matrix3x4} from 'math/matrix';
|
import {Matrix3x4} from 'math/matrix';
|
||||||
import {AXIS, ORIGIN} from "../../../modules/math/vector";
|
import {AXIS, ORIGIN} from "../../../modules/math/vector";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import Vector from 'math/vector';
|
import Vector from 'math/vector';
|
||||||
import {SceneEdge, SceneFace, SceneSolid} from './sceneObject';
|
import {SceneEdge, SceneFace, SceneSolid} from './sceneObject';
|
||||||
import brepTess from '../../tess/brep-tess';
|
import brepTess from '../../tess/brep-tess';
|
||||||
import tessellateSurface from '../../../brep/geom/surfaces/surfaceTess';
|
import tessellateSurface from '../../../../../modules/geom/surfaces/surfaceTess';
|
||||||
import {setAttribute} from '../../../../../modules/scene/objectData';
|
import {setAttribute} from '../../../../../modules/scene/objectData';
|
||||||
import * as vec from 'math/vec';
|
import * as vec from 'math/vec';
|
||||||
import {perpendicularVector} from "math/euclidean";
|
import {perpendicularVector} from "math/euclidean";
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import * as vec from 'math/vec';
|
import * as vec from 'math/vec';
|
||||||
import {iteratePath} from '../cad-utils';
|
import {iteratePath} from '../cad-utils';
|
||||||
import NurbsCurve from '../../brep/geom/curves/nurbsCurve';
|
import NurbsCurve from '../../../../modules/geom/curves/nurbsCurve';
|
||||||
import {veqXYZ} from '../../brep/geom/tolerance';
|
import {veqXYZ} from '../../../../modules/geom/tolerance';
|
||||||
import curveTess, {curveTessParams} from '../../brep/geom/impl/curve/curve-tess';
|
import curveTess, {curveTessParams} from '../../../../modules/geom/impl/curve/curve-tess';
|
||||||
import {distanceAB} from "math/distance";
|
import {distanceAB} from "math/distance";
|
||||||
import {areEqual, TOLERANCE} from "math/equality";
|
import {areEqual, TOLERANCE} from "math/equality";
|
||||||
import {circleFromPoints, radiusOfCurvature} from "../../../../modules/math/euclidean";
|
import {circleFromPoints, radiusOfCurvature} from "../../../../modules/math/euclidean";
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import verb from 'verb-nurbs'
|
import verb from 'verb-nurbs'
|
||||||
import BrepCurve from '../../brep/geom/curves/brepCurve';
|
import BrepCurve from '../../../../modules/geom/curves/brepCurve';
|
||||||
import NurbsCurve from '../../brep/geom/curves/nurbsCurve';
|
import NurbsCurve from '../../../../modules/geom/curves/nurbsCurve';
|
||||||
import {makeAngle0_360} from '../../../../modules/math/commons'
|
import {makeAngle0_360} from '../../../../modules/math/commons'
|
||||||
import {normalizeCurveEnds} from '../../brep/geom/impl/nurbs-ext';
|
import {normalizeCurveEnds} from '../../../../modules/geom/impl/nurbs-ext';
|
||||||
import Vector from '../../../../modules/math/vector';
|
import Vector from '../../../../modules/math/vector';
|
||||||
import CSys from "../../../../modules/math/csys";
|
import CSys from "../../../../modules/math/csys";
|
||||||
import {distanceAB} from "../../../../modules/math/distance";
|
import {distanceAB} from "../../../../modules/math/distance";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import Vector from 'math/vector';
|
import Vector from 'math/vector';
|
||||||
import ClipperLib from 'clipper-lib';
|
import ClipperLib from 'clipper-lib';
|
||||||
import libtess from 'libtess'
|
import libtess from 'libtess'
|
||||||
import tessellateSurface from '../../brep/geom/surfaces/surfaceTess';
|
import tessellateSurface from '../../../../modules/geom/surfaces/surfaceTess';
|
||||||
|
|
||||||
export default function A(face) {
|
export default function A(face) {
|
||||||
return tessellateLoopsOnSurface(face.surface, face.loops, loop => loop, seg => e.edge.curve, seg => seg.inverted)
|
return tessellateLoopsOnSurface(face.surface, face.loops, loop => loop, seg => e.edge.curve, seg => seg.inverted)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import libtess from 'libtess'
|
import libtess from 'libtess'
|
||||||
import {Point} from '../../brep/geom/point'
|
import {Point} from '../../../../modules/geom/point'
|
||||||
import {Vertex} from '../../brep/topo/vertex'
|
import {Vertex} from '../../brep/topo/vertex'
|
||||||
import Vector from 'math/vector';
|
import Vector from 'math/vector';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export default [
|
||||||
kind: 'Tool',
|
kind: 'Tool',
|
||||||
description: 'Add a point',
|
description: 'Add a point',
|
||||||
icon: PointToolIcon,
|
icon: PointToolIcon,
|
||||||
command: 'point',
|
command: 'geom.point',
|
||||||
invoke: (ctx) => {
|
invoke: (ctx) => {
|
||||||
ctx.viewer.toolManager.takeControl(new AddPointTool(ctx.viewer));
|
ctx.viewer.toolManager.takeControl(new AddPointTool(ctx.viewer));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@ import {Param} from '../shapes/param';
|
||||||
import {DEG_RAD, makeAngle0_360} from "math/commons";
|
import {DEG_RAD, makeAngle0_360} from "math/commons";
|
||||||
import {COS_FN, Polynomial, POW_1_FN, POW_2_FN, POW_3_FN, SIN_FN} from "./polynomial";
|
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";
|
import {cubicBezierDer1, cubicBezierDer2, cubicBezierPoint} from "../../../../modules/geom/curves/bezierCubic";
|
||||||
import {greaterThanConstraint, lessThanConstraint} from "./barriers";
|
import {greaterThanConstraint, lessThanConstraint} from "./barriers";
|
||||||
import {genericCurveStep} from "../../brep/geom/impl/nurbs-ext";
|
import {genericCurveStep} from "../../../../modules/geom/impl/nurbs-ext";
|
||||||
import {_normalize} from "math/vec";
|
import {_normalize} from "math/vec";
|
||||||
import {
|
import {
|
||||||
AngleBetweenConstraintIcon,
|
AngleBetweenConstraintIcon,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import {prepare} from "./solver";
|
import {prepare} from "./solver";
|
||||||
import {eqEps} from "../../brep/geom/tolerance";
|
import {eqEps} from "geom/tolerance";
|
||||||
import {Polynomial, POW_1_FN} from "./polynomial";
|
import {Polynomial, POW_1_FN} from "./polynomial";
|
||||||
import {compositeFn} from "gems/func";
|
import {compositeFn} from "gems/func";
|
||||||
import {AlgNumConstraint} from "./ANConstraints";
|
import {AlgNumConstraint} from "./ANConstraints";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import {eqEps} from "../../brep/geom/tolerance";
|
import {eqEps} from "geom/tolerance";
|
||||||
import {compositeFn} from "gems/func";
|
import {compositeFn} from "gems/func";
|
||||||
import {SolverParam} from "./solverParam";
|
import {SolverParam} from "./solverParam";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import {NoIcon} from "../icons/NoIcon";
|
||||||
import {Arc} from "../shapes/arc";
|
import {Arc} from "../shapes/arc";
|
||||||
import {Circle} from "../shapes/circle";
|
import {Circle} from "../shapes/circle";
|
||||||
import {NurbsObject} from "../shapes/nurbsObject";
|
import {NurbsObject} from "../shapes/nurbsObject";
|
||||||
import NurbsCurve from "../../brep/geom/curves/nurbsCurve";
|
import NurbsCurve from "../../../../modules/geom/curves/nurbsCurve";
|
||||||
import {Segment} from "../shapes/segment";
|
import {Segment} from "../shapes/segment";
|
||||||
|
|
||||||
export const BoundaryGeneratorSchema = {
|
export const BoundaryGeneratorSchema = {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {Arc} from "../shapes/arc";
|
||||||
import {EndPoint} from "../shapes/point";
|
import {EndPoint} from "../shapes/point";
|
||||||
import {Circle} from "../shapes/circle";
|
import {Circle} from "../shapes/circle";
|
||||||
import {NurbsObject} from "../shapes/nurbsObject";
|
import {NurbsObject} from "../shapes/nurbsObject";
|
||||||
import NurbsCurve from "../../brep/geom/curves/nurbsCurve";
|
import NurbsCurve from "../../../../modules/geom/curves/nurbsCurve";
|
||||||
import {Segment} from "../shapes/segment";
|
import {Segment} from "../shapes/segment";
|
||||||
|
|
||||||
export const GroundObjectsGeneratorSchema = {
|
export const GroundObjectsGeneratorSchema = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import {SketchObject} from './sketch-object'
|
import {SketchObject} from './sketch-object'
|
||||||
import * as vec from 'math/vec';
|
import * as vec from 'math/vec';
|
||||||
import {curveTessellate} from '../../brep/geom/impl/nurbs-ext';
|
import {curveTessellate} from '../../../../modules/geom/impl/nurbs-ext';
|
||||||
import {Ellipse} from "./ellipse";
|
import {Ellipse} from "./ellipse";
|
||||||
import {EndPoint} from "./point";
|
import {EndPoint} from "./point";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {Tool} from './tool'
|
||||||
export class AddPointTool extends Tool {
|
export class AddPointTool extends Tool {
|
||||||
|
|
||||||
constructor(viewer) {
|
constructor(viewer) {
|
||||||
super('point', viewer);
|
super('geom.point', viewer);
|
||||||
}
|
}
|
||||||
|
|
||||||
restart() {
|
restart() {
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ export class AddSegmentTool extends Tool {
|
||||||
|
|
||||||
firstPointPicked() {
|
firstPointPicked() {
|
||||||
this.pointPicked(this.line.a.x, this.line.a.y);
|
this.pointPicked(this.line.a.x, this.line.a.y);
|
||||||
this.sendHint('specify ' + (this.multi ? 'next' : 'end') +' point');
|
this.sendHint('specify ' + (this.multi ? 'next' : 'end') +' geom.point');
|
||||||
}
|
}
|
||||||
|
|
||||||
dblclick(e) {
|
dblclick(e) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue