diff --git a/src/packages/openplans-core/src/elements/solids/poly-wall.ts b/src/packages/openplans-core/src/elements/solids/poly-wall.ts index d060f0c..94ecaf2 100644 --- a/src/packages/openplans-core/src/elements/solids/poly-wall.ts +++ b/src/packages/openplans-core/src/elements/solids/poly-wall.ts @@ -800,10 +800,8 @@ export class PolyWall extends Polyline implements IShape { if (wall3D && all3DOpenings.length > 0) { try { const result3D = wall3D.subtract(all3DOpenings, { - color: this.propertySet.color, - outline: this._outlineEnabled, - transparent: false, - opacity: 1, + color: this.propertySet.color, + outline: this._outlineEnabled, }) as BooleanResult; this.subElements3D.set(this.ogid + "-3d-resolved", result3D); diff --git a/src/packages/openplans-core/src/elements/solids/single-wall.ts b/src/packages/openplans-core/src/elements/solids/single-wall.ts index 09c8632..25b8d33 100644 --- a/src/packages/openplans-core/src/elements/solids/single-wall.ts +++ b/src/packages/openplans-core/src/elements/solids/single-wall.ts @@ -368,9 +368,7 @@ export class SingleWall extends Line implements IShape { } const result3D = wall3D.subtract(all3DOpenings, { - color: this.propertySet.color, - transparent: false, - opacity: 1, + color: this.propertySet.color, }); wall3D.visible = false; diff --git a/src/packages/openplans-core/src/elements/solids/wall-component/wall-engine.ts b/src/packages/openplans-core/src/elements/solids/wall-component/wall-engine.ts deleted file mode 100644 index 24a0e51..0000000 --- a/src/packages/openplans-core/src/elements/solids/wall-component/wall-engine.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { SingleWall } from "../single-wall"; -import { WallOptions } from "../wall-types"; - - -const wallJoinTolerance: number = 0.01; // Tolerance for detecting joins - -interface WallRelationship { - wallId: string; - startLink: string | null; // ID of the wall connected at the start point - endLink: string | null; // ID of the wall connected at the end point - middleLinks: string[]; // IDs of walls that overlap in the middle -} - -/** - * Wall Engine provides a way to create new walls based on parameters. - * The Engine then resolves Wall Joins based on Overalapping Walls. - * Currently T, L, X joins are supported. - * The Wall Engine is running in the background and whenever user modifies a wall geometry or creates a new wall, the engine checks for overlapping walls and resolves the joins accordingly. - */ -export class WallEngine { - private wallMap: Map = new Map(); - private wallRelationships: Map = new Map(); // Map of wallId to wall relationship - - constructor() {} - - createWall(wallOptions: Partial): SingleWall { - const wall = new SingleWall(wallOptions); - this.addWallToSystem(wall); - this.wallMap.set(wall.ogid, wall); - return wall; - } - - addStartLink(wallId: string, connectedWallId: string) { - const relationship = this.wallRelationships.get(wallId); - if (relationship) { - relationship.startLink = connectedWallId; - this.updateWallGeometry(wallId); - } - } - - addEndLink(wallId: string, connectedWallId: string) { - const relationship = this.wallRelationships.get(wallId); - if (relationship) { - relationship.endLink = connectedWallId; - this.updateWallGeometry(wallId); - } - } - - addMiddleLink(wallId: string, connectedWallId: string) { - const relationship = this.wallRelationships.get(wallId); - if (relationship && !relationship.middleLinks.includes(connectedWallId)) { - relationship.middleLinks.push(connectedWallId); - this.updateWallGeometry(wallId); - } - } - - private updateWallGeometry(wallId: string) { - // Logic to update the wall geometry based on its relationships (joins) - // This would involve checking the type of join (L, T, X) and modifying the wall's geometry accordingly to reflect the join. - } - - private addWallToSystem(wall: SingleWall) { - // Add wall to the system and initialize its relationship - this.wallRelationships.set(wall.ogid, { - wallId: wall.ogid, - startLink: null, - endLink: null, - middleLinks: [], - }); - - // After adding the wall, resolve joins - this.resolveJoinsForWall(wall); - } - - private resolveJoinsForWall(wall: SingleWall) { - // Logic to check for overlapping walls and determine join types (L, T, X) - // This is a complex logic that involves checking the geometry of the wall against other walls in the system and determining if they are connected at the start, end, or middle. - // Based on the connections, we can then update the wall's geometry to reflect the appropriate join type. - } -} diff --git a/src/packages/openplans-core/src/layouts/viewport-block.ts b/src/packages/openplans-core/src/layouts/viewport-block.ts index be9ac76..505bc52 100644 --- a/src/packages/openplans-core/src/layouts/viewport-block.ts +++ b/src/packages/openplans-core/src/layouts/viewport-block.ts @@ -1,5 +1,4 @@ import * as THREE from "three"; -import { IShape } from "../shapes/base-type"; export type ViewCamera = 'top' | 'front' | 'right' | 'left' | 'back'; @@ -44,7 +43,7 @@ function getCameraSetup(viewCamera: ViewCamera, center: [number, number, number] } } -export class ViewportBlock extends THREE.Object3D implements IShape { +export class ViewportBlock extends THREE.Object3D { private viewportConfig: ViewportConfig; private viewportMesh!: THREE.Mesh; private viewportCamera: THREE.OrthographicCamera; diff --git a/tsconfig.json b/tsconfig.json index ffa04a4..36706d5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,5 +26,8 @@ "types": ["vite/client"] }, - "include": ["src", "src/packages"] + "include": ["src", "src/packages"], + "exclude": [ + "src/packages/openplans-core/src/elements/catalog" + ] }