mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-14 20:33:30 +01:00
move brep to a module
This commit is contained in:
parent
240c217438
commit
f053cab1ba
52 changed files with 69 additions and 69 deletions
|
|
@ -1,13 +1,13 @@
|
|||
import {Plane} from '../../../modules/geom/impl/plane';
|
||||
import {Point} from '../../../modules/geom/point';
|
||||
import {Plane} from '../geom/impl/plane';
|
||||
import {Point} from '../geom/point';
|
||||
import {Shell} from './topo/shell';
|
||||
import {Face} from './topo/face';
|
||||
import {Loop} from './topo/loop';
|
||||
import {Vertex} from './topo/vertex';
|
||||
import {normalOfCCWSeq} from '../cad/cad-utils';
|
||||
import BBox from '../../../modules/math/bbox';
|
||||
import NurbsSurface from '../../../modules/geom/surfaces/nurbsSurface';
|
||||
import {BrepSurface} from '../../../modules/geom/surfaces/brepSurface';
|
||||
import {normalOfCCWSeq} from '../../web/app/cad/cad-utils';
|
||||
import BBox from '../math/bbox';
|
||||
import NurbsSurface from '../geom/surfaces/nurbsSurface';
|
||||
import {BrepSurface} from '../geom/surfaces/brepSurface';
|
||||
import EdgeIndex from './edgeIndex';
|
||||
|
||||
export default class BrepBuilder {
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
import {Shell} from './topo/shell';
|
||||
import {Face} from './topo/face';
|
||||
import {Edge} from './topo/edge';
|
||||
import BrepCurve from '../../../modules/geom/curves/brepCurve';
|
||||
import {Plane} from '../../../modules/geom/impl/plane';
|
||||
import * as cad_utils from '../cad/cad-utils';
|
||||
import BrepCurve from '../geom/curves/brepCurve';
|
||||
import {Plane} from '../geom/impl/plane';
|
||||
import * as cad_utils from '../../web/app/cad/cad-utils';
|
||||
import {createBoundingSurface} from './brep-builder';
|
||||
import NurbsSurface from '../../../modules/geom/surfaces/nurbsSurface';
|
||||
import {BrepSurface} from '../../../modules/geom/surfaces/brepSurface';
|
||||
import NurbsSurface from '../geom/surfaces/nurbsSurface';
|
||||
import {BrepSurface} from '../geom/surfaces/brepSurface';
|
||||
import {Matrix3x4} from 'math/matrix';
|
||||
import {BasisForPlane} from "math/basis";
|
||||
import {isCCW as isCCWtest} from "geom/euclidean";
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import {Point} from '../../../modules/geom/point'
|
||||
import {Plane} from '../../../modules/geom/impl/plane'
|
||||
import {Point} from '../geom/point'
|
||||
import {Plane} from '../geom/impl/plane'
|
||||
import {createPrism, enclose} from './brep-enclose'
|
||||
import {Circle} from '../cad/sketch/sketchModel'
|
||||
import {Circle} from '../../web/app/cad/sketch/sketchModel'
|
||||
import CSys from 'math/csys';
|
||||
import {Matrix3x4} from 'math/matrix';
|
||||
import {AXIS} from "../../../modules/math/vector";
|
||||
import {AXIS} from "../math/vector";
|
||||
|
||||
export function box(w, h, d, tr) {
|
||||
const wh = w * 0.5;
|
||||
|
|
@ -4,7 +4,7 @@ import {
|
|||
YELLOW
|
||||
} from "./colors";
|
||||
import Section from "./section";
|
||||
import {distanceAB3} from "../../../../../modules/math/distance";
|
||||
import {distanceAB3} from "../../../math/distance";
|
||||
|
||||
export function getFacesViewObjects(group3d, category, context, out, faces) {
|
||||
forEach(faces, getFaceViewObjects.bind(null, group3d, category, context, out));
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import {Edge} from './topo/edge';
|
||||
import BrepCurve from '../../../modules/geom/curves/brepCurve';
|
||||
import BrepCurve from '../geom/curves/brepCurve';
|
||||
|
||||
export default class EdgeIndex {
|
||||
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
import BrepBuilder, {createBoundingSurfaceFrom2DPoints, createBoundingSurfaceFromBBox} from '../brep-builder';
|
||||
import VertexFactory from '../vertexFactory';
|
||||
import NurbsSurface from '../../../../modules/geom/surfaces/nurbsSurface';
|
||||
import NurbsSurface from '../../geom/surfaces/nurbsSurface';
|
||||
import * as vec from 'math/vec';
|
||||
import {BrepSurface} from '../../../../modules/geom/surfaces/brepSurface';
|
||||
import {Plane} from '../../../../modules/geom/impl/plane';
|
||||
import Vector from '../../../../modules/math/vector';
|
||||
import NullSurface from '../../../../modules/geom/surfaces/nullSurface';
|
||||
import {BrepSurface} from '../../geom/surfaces/brepSurface';
|
||||
import {Plane} from '../../geom/impl/plane';
|
||||
import Vector from '../../math/vector';
|
||||
import NullSurface from '../../geom/surfaces/nullSurface';
|
||||
import BBox from 'math/bbox';
|
||||
import NurbsCurve from '../../../../modules/geom/curves/nurbsCurve';
|
||||
import BrepCurve from '../../../../modules/geom/curves/brepCurve';
|
||||
import {BREPData} from "../../cad/craft/engine/brepData";
|
||||
import NurbsCurve from '../../geom/curves/nurbsCurve';
|
||||
import BrepCurve from '../../geom/curves/brepCurve';
|
||||
import {BREPData} from "../../../web/app/cad/craft/engine/brepData";
|
||||
|
||||
export function readBrep(data: BREPData) {
|
||||
|
||||
|
|
@ -4,12 +4,12 @@ import {Loop} from '../topo/loop';
|
|||
import {Shell} from '../topo/shell';
|
||||
import {Vertex} from '../topo/vertex';
|
||||
import {evolveFace} from './evolve-face'
|
||||
import {eqTol, TOLERANCE, ueq, veq, veqNeg} from '../../../../modules/geom/tolerance';
|
||||
import CadError from "../../utils/errors";
|
||||
import {eqTol, TOLERANCE, ueq, veq, veqNeg} from '../../geom/tolerance';
|
||||
import CadError from "../../../web/app/utils/errors";
|
||||
import {createBoundingSurface} from "../brep-builder";
|
||||
import BREP_DEBUG from '../debug/brep-debug';
|
||||
import {Face} from "../topo/face";
|
||||
import {vectorsEqual} from "../../../../modules/math/equality";
|
||||
import {vectorsEqual} from "../../math/equality";
|
||||
|
||||
|
||||
const A = 0, B = 1;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import {Face} from '../topo/face';
|
||||
import {Vertex} from '../topo/vertex';
|
||||
import Vector from 'math/vector';
|
||||
import PIP from '../../cad/tess/pip';
|
||||
import {isCCW} from "../../../../modules/geom/euclidean";
|
||||
import PIP from '../../../web/app/cad/tess/pip';
|
||||
import {isCCW} from "../../geom/euclidean";
|
||||
|
||||
export function evolveFace(originFace, loops) {
|
||||
let out = [];
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import {TriangulateFace} from '../../cad/tess/triangulation'
|
||||
import {TriangulateFace} from '../../../web/app/cad/tess/triangulation'
|
||||
import {Shell} from '../topo/shell'
|
||||
import {HalfEdge} from '../topo/edge'
|
||||
import {Loop} from '../topo/loop'
|
||||
import {Face} from '../topo/face'
|
||||
import {BREPValidator} from '../brep-validator';
|
||||
import {linkSegments} from '../brep-builder';
|
||||
import {Line} from '../../../../modules/geom/impl/line'
|
||||
import {Line} from '../../geom/impl/line'
|
||||
|
||||
export function polyhedronify(shell) {
|
||||
shell.reindexVertices();
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import {DoubleKeyMap} from '../utils/utils'
|
||||
import {DoubleKeyMap} from '../../web/app/utils/utils'
|
||||
|
||||
export const FACE_CHUNK = 'stitching.face.chunk';
|
||||
export const EDGE_CHUNK = 'stitching.edge.chunk';
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
import {TopoObject} from './topo-object'
|
||||
import {Vertex} from "./vertex";
|
||||
import BrepCurve from "../../../../modules/geom/curves/brepCurve";
|
||||
import BrepCurve from "../../geom/curves/brepCurve";
|
||||
import {Loop} from "./loop";
|
||||
import Vector from "math/vector";
|
||||
import {Tessellation1D} from "../../cad/craft/engine/tessellation";
|
||||
import {Tessellation1D} from "../../../web/app/cad/craft/engine/tessellation";
|
||||
|
||||
export class Edge extends TopoObject {
|
||||
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import {TopoObject} from './topo-object'
|
||||
import {Loop} from './loop'
|
||||
import PIP from '../../cad/tess/pip';
|
||||
import PIP from '../../../web/app/cad/tess/pip';
|
||||
import {veq} from "geom/tolerance";
|
||||
import {isOnPositiveHalfPlaneFromVec} from "../operations/boolean";
|
||||
import {BrepSurface} from "../../../../modules/geom/surfaces/brepSurface";
|
||||
import {BrepSurface} from "../../geom/surfaces/brepSurface";
|
||||
import {Shell} from "./shell";
|
||||
import {ProductionInfo} from "../../cad/craft/engine/productionInfo";
|
||||
import {ProductionInfo} from "../../../web/app/cad/craft/engine/productionInfo";
|
||||
|
||||
declare module './face' {
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import {TopoObject} from './topo-object'
|
||||
import {Face} from "./face";
|
||||
import {BrepSurface} from "../../../../modules/geom/surfaces/brepSurface";
|
||||
import {BrepSurface} from "../../geom/surfaces/brepSurface";
|
||||
import {HalfEdge} from "./edge";
|
||||
import {findLowestLeftPoint} from "geom/euclidean";
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import libtess from 'libtess'
|
||||
import {area} from "../../../../modules/geom/euclidean";
|
||||
import {area} from "../../geom/euclidean";
|
||||
|
||||
export default function pickPointInside2dPolygon(polygon) {
|
||||
function vertexCallback(data, tr) {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import pertrub from './vector-petrub';
|
||||
import BrepCurve from '../../../../modules/geom/curves/brepCurve';
|
||||
import BrepCurve from '../../geom/curves/brepCurve';
|
||||
|
||||
|
||||
export class Ray {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import {Vertex} from './topo/vertex';
|
||||
import {veqXYZ} from '../../../modules/geom/tolerance';
|
||||
import {Point} from '../../../modules/geom/point';
|
||||
import {veqXYZ} from '../geom/tolerance';
|
||||
import {Point} from '../geom/point';
|
||||
|
||||
export default class VertexFactory {
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import {intersect, subtract, union} from '../../brep/operations/boolean';
|
||||
import {update as updateStitching} from '../../brep/stitching';
|
||||
import {BREPValidator} from '../../brep/brep-validator';
|
||||
import {Shell} from '../../brep/topo/shell';
|
||||
import {intersect, subtract, union} from '../../../../modules/brep/operations/boolean';
|
||||
import {update as updateStitching} from '../../../../modules/brep/stitching';
|
||||
import {BREPValidator} from '../../../../modules/brep/brep-validator';
|
||||
import {Shell} from '../../../../modules/brep/topo/shell';
|
||||
import {MBrepShell} from '../model/mshell';
|
||||
|
||||
const BoolOpMap = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {enclose} from '../../../brep/brep-enclose'
|
||||
import {enclose} from '../../../../../modules/brep/brep-enclose'
|
||||
import {BooleanOperation, combineShells} from '../booleanOperation'
|
||||
import {Matrix3x4} from 'math/matrix';
|
||||
import {equal} from 'math/equality';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import Vector from 'math/vector';
|
|||
import * as vec from 'math/vec';
|
||||
import React from 'react';
|
||||
import {readSketchFloat} from './sketch/sketchReader';
|
||||
import {toLoops} from '../brep/io/brepLoopsFormat';
|
||||
import {toLoops} from '../../../modules/brep/io/brepLoopsFormat';
|
||||
import curveTess from '../../../modules/geom/impl/curve/curve-tess';
|
||||
import {LOG_FLAGS} from './logFlags';
|
||||
import {state} from "lstream";
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import * as BREPPrimitives from '../../brep/brep-primitives'
|
||||
import BrepBuilder, {createBoundingSurface} from '../../brep/brep-builder'
|
||||
import {createPrism} from '../../brep/brep-enclose'
|
||||
import * as BREPBool from '../../brep/operations/boolean'
|
||||
import * as IO from '../../brep/io/brepLoopsFormat'
|
||||
import {BREPValidator} from '../../brep/brep-validator'
|
||||
import {Edge} from '../../brep/topo/edge';
|
||||
import {Loop} from '../../brep/topo/loop';
|
||||
import {Face} from '../../brep/topo/face';
|
||||
import {Shell} from '../../brep/topo/shell';
|
||||
import {Vertex} from '../../brep/topo/vertex';
|
||||
import * as BREPPrimitives from '../../../../modules/brep/brep-primitives'
|
||||
import BrepBuilder, {createBoundingSurface} from '../../../../modules/brep/brep-builder'
|
||||
import {createPrism} from '../../../../modules/brep/brep-enclose'
|
||||
import * as BREPBool from '../../../../modules/brep/operations/boolean'
|
||||
import * as IO from '../../../../modules/brep/io/brepLoopsFormat'
|
||||
import {BREPValidator} from '../../../../modules/brep/brep-validator'
|
||||
import {Edge} from '../../../../modules/brep/topo/edge';
|
||||
import {Loop} from '../../../../modules/brep/topo/loop';
|
||||
import {Face} from '../../../../modules/brep/topo/face';
|
||||
import {Shell} from '../../../../modules/brep/topo/shell';
|
||||
import {Vertex} from '../../../../modules/brep/topo/vertex';
|
||||
import {Point} from '../../../../modules/geom/point';
|
||||
import BrepCurve from '../../../../modules/geom/curves/brepCurve';
|
||||
import {Plane} from '../../../../modules/geom/impl/plane';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import {BooleanOperation, combineShells} from './boolean-operation'
|
||||
import {ReadSketchFromFace} from '../../sketch/sketchReader'
|
||||
import {revolve} from '../../../brep/brep-builder'
|
||||
import {revolve} from '../../../../../modules/brep/brep-builder'
|
||||
|
||||
export function Revolve(app, params) {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import {CURRENT_SELECTION as S} from './wizard'
|
||||
import {PreviewWizard, SketchBasedNurbsPreviewer } from './preview-wizard'
|
||||
import {TriangulatePolygons} from '../../../tess/triangulation'
|
||||
import {revolveToWallNurbs} from '../../../../brep/brep-builder'
|
||||
import {revolveToWallNurbs} from '../../../../../../modules/brep/brep-builder'
|
||||
import {evalPivot} from '../revolve'
|
||||
import Vector from 'math/vector';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {createBoundingSurfaceFrom2DPoints} from '../../brep/brep-builder';
|
||||
import {createBoundingSurfaceFrom2DPoints} from '../../../../modules/brep/brep-builder';
|
||||
import NurbsSurface from '../../../../modules/geom/surfaces/nurbsSurface';
|
||||
import {BrepSurface} from '../../../../modules/geom/surfaces/brepSurface';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import BrepBuilder from '../brep/brep-builder'
|
||||
import * as BREPPrimitives from '../brep/brep-primitives'
|
||||
import BrepBuilder from '../../../modules/brep/brep-builder'
|
||||
import * as BREPPrimitives from '../../../modules/brep/brep-primitives'
|
||||
import BrepCurve from '../../../modules/geom/curves/brepCurve';
|
||||
import NurbsCurve from "../../../modules/geom/curves/nurbsCurve";
|
||||
import {surfaceIntersect} from '../../../modules/geom/intersection/surfaceSurface';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import * as stitching from '../../../brep/stitching'
|
||||
import * as stitching from '../../../../../modules/brep/stitching'
|
||||
import {AbstractSelectionMarker, setFacesColor} from "./abstractSelectionMarker";
|
||||
|
||||
export class SelectionMarker extends AbstractSelectionMarker {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {readBrep} from '../../../brep/io/brepIO';
|
||||
import {readBrep} from '../../../../../modules/brep/io/brepIO';
|
||||
import {MBrepShell} from '../../model/mshell';
|
||||
import CSys from '../../../../../modules/math/csys';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import Vector from 'math/vector';
|
||||
import {SceneFace, SceneSolid} from './sceneObject';
|
||||
import {createBoundingSurfaceFrom2DPoints} from '../../../brep/brep-builder';
|
||||
import {createBoundingSurfaceFrom2DPoints} from '../../../../../modules/brep/brep-builder';
|
||||
|
||||
const INIT_WIDTH_H = 750 * 0.5;
|
||||
const INIT_HEIGHT_H = 750 * 0.5;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import libtess from 'libtess'
|
||||
import {Point} from '../../../../modules/geom/point'
|
||||
import {Vertex} from '../../brep/topo/vertex'
|
||||
import {Vertex} from '../../../../modules/brep/topo/vertex'
|
||||
import Vector from 'math/vector';
|
||||
|
||||
function initTesselator() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue