Skip to content

Commit

Permalink
feat: rename civil classes
Browse files Browse the repository at this point in the history
  • Loading branch information
agviegas committed Apr 11, 2024
1 parent eee2251 commit 83e7092
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 54 deletions.
34 changes: 17 additions & 17 deletions resources/openbim-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -121007,7 +121007,7 @@ class DXFExporter extends Component {
DXFExporter.uuid = "568f2167-24a3-4519-b552-3b04cc74a6a6";
ToolComponent.libraryUUIDs.add(DXFExporter.uuid);

class RoadNavigator extends Component {
class CivilNavigator extends Component {
constructor(components) {
super(components);
this.enabled = true;
Expand All @@ -121025,7 +121025,7 @@ class RoadNavigator extends Component {
this.adjustRaycasterOnZoom();
}
initialize() {
console.log("View for RoadNavigator: ", this.view);
console.log("View for CivilNavigator: ", this.view);
}
get() {
return null;
Expand Down Expand Up @@ -122277,7 +122277,7 @@ class KPManager extends MarkerManager {
}
}

class RoadPlanNavigator extends RoadNavigator {
class CivilPlanNavigator extends CivilNavigator {
constructor(components) {
super(components);
this.view = "horizontal";
Expand All @@ -122286,7 +122286,7 @@ class RoadPlanNavigator extends RoadNavigator {
this.kpManager = new KPManager(components, this.scene.renderer, this.scene.get(), this.scene.controls, this.view);
this.highlighter = new PlanHighlighter(scene, this.kpManager);
this.setUI();
this.components.tools.add(RoadPlanNavigator.uuid, this);
this.components.tools.add(CivilPlanNavigator.uuid, this);
this.onHighlight.add(({ mesh }) => {
this.highlighter.showCurveInfo(mesh);
this.fitCameraToAlignment(mesh);
Expand Down Expand Up @@ -122330,10 +122330,10 @@ class RoadPlanNavigator extends RoadNavigator {
});
}
}
RoadPlanNavigator.uuid = "3096dea0-5bc2-41c7-abce-9089b6c9431b";
ToolComponent.libraryUUIDs.add(RoadPlanNavigator.uuid);
CivilPlanNavigator.uuid = "3096dea0-5bc2-41c7-abce-9089b6c9431b";
ToolComponent.libraryUUIDs.add(CivilPlanNavigator.uuid);

class RoadElevationNavigator extends RoadNavigator {
class CivilElevationNavigator extends CivilNavigator {
constructor(components) {
super(components);
this.view = "vertical";
Expand Down Expand Up @@ -122405,17 +122405,17 @@ class RoadElevationNavigator extends RoadNavigator {
}
}
}
RoadElevationNavigator.uuid = "097eea29-2d5a-431a-a247-204d44670621";
CivilElevationNavigator.uuid = "097eea29-2d5a-431a-a247-204d44670621";

class Road3DNavigator extends Component {
class Civil3DNavigator extends Component {
constructor(components) {
super(components);
this.onHighlight = new Event();
this.enabled = true;
this.onMarkerChange = new Event();
this.onMarkerHidden = new Event();
this._curves = [];
this.components.tools.add(Road3DNavigator.uuid, this);
this.components.tools.add(Civil3DNavigator.uuid, this);
const scene = this.components.scene.get();
this.highlighter = new CurveHighlighter(scene, "absolute");
this.mouseMarkers = {
Expand Down Expand Up @@ -122509,17 +122509,17 @@ class Road3DNavigator extends Component {
}
}
}
Road3DNavigator.uuid = "0a59c09e-2b49-474a-9320-99f51f40f182";
ToolComponent.libraryUUIDs.add(Road3DNavigator.uuid);
Civil3DNavigator.uuid = "0a59c09e-2b49-474a-9320-99f51f40f182";
ToolComponent.libraryUUIDs.add(Civil3DNavigator.uuid);

class RoadCrossSectionNavigator extends Component {
class CivilCrossSectionNavigator extends Component {
constructor(components) {
super(components);
this.uiElement = new UIElement();
this.enabled = true;
this.scene = new Simple2DScene(components);
this.setUI();
this.components.tools.add(RoadCrossSectionNavigator.uuid, this);
this.components.tools.add(CivilCrossSectionNavigator.uuid, this);
const clipper = components.tools.get(EdgesClipper);
this.plane = clipper.createFromNormalAndCoplanarPoint(new THREE$1.Vector3(1, 0, 0), new THREE$1.Vector3());
this.plane.visible = false;
Expand Down Expand Up @@ -122563,7 +122563,7 @@ class RoadCrossSectionNavigator extends Component {
this.uiElement.set({ floatingWindow });
}
}
RoadCrossSectionNavigator.uuid = "96b2c87e-d90b-4639-8257-8f01136fe324";
ToolComponent.libraryUUIDs.add(RoadCrossSectionNavigator.uuid);
CivilCrossSectionNavigator.uuid = "96b2c87e-d90b-4639-8257-8f01136fe324";
ToolComponent.libraryUUIDs.add(CivilCrossSectionNavigator.uuid);

export { AngleMeasurement, AreaMeasurement, ArrowAnnotation, AttributeSet, BaseRenderer, BaseSVGAnnotation, Button, Canvas, CheckboxInput, CircleAnnotation, CloudStorage, ColorInput, CommandsMenu, Component, Components, CubeMap, DXFExporter, DimensionLabelClassName, DimensionPreviewClassName, Disposer, DragAndDropInput, DrawManager, Drawer, Dropdown, EdgeMeasurement, EdgesClipper, EdgesPlane, Event, FaceMeasurement, FloatingWindow, FragmentBoundingBox, FragmentClassifier, FragmentClipStyler, FragmentExploder, FragmentHider, FragmentHighlighter, FragmentIfcLoader, FragmentIfcStreamConverter, FragmentManager, FragmentPlans, FragmentPropsStreamConverter, FragmentStreamLoader, FragmentTree, GeometryVerticesMarker, IfcCategories, IfcCategoryMap, IfcElements, IfcJsonExporter, IfcPropertiesFinder, IfcPropertiesManager, IfcPropertiesProcessor, IfcPropertiesUtils, IfcStreamingSettings, LengthMeasurement, LineIntersectionPicker, MaterialManager, MiniMap, Modal, Mouse, OrthoPerspectiveCamera, PostproductionRenderer, PropertiesStreamingSettings, PropertyTag, RangeInput, RectangleAnnotation, Road3DNavigator, RoadCrossSectionNavigator, RoadElevationNavigator, RoadNavigator, RoadPlanNavigator, ScreenCuller, ShadowDropper, Simple2DMarker, Simple2DScene, SimpleCamera, SimpleClipper, SimpleDimensionLine, SimpleGrid, SimplePlane, SimpleRaycaster, SimpleRenderer, SimpleSVGViewport, SimpleScene, SimpleUICard, SimpleUIComponent, Spinner, TextAnnotation, TextArea, TextInput, ToastNotification, ToolComponent, Toolbar, TreeView, UIElement, UIManager, VertexPicker, ViewpointsManager, VolumeMeasurement, bufferGeometryToIndexed, generateExpressIDFragmentIDMap, generateIfcGUID, isPointInFrontOfPlane, isTransparent, obbFromPoints };
export { AngleMeasurement, AreaMeasurement, ArrowAnnotation, AttributeSet, BaseRenderer, BaseSVGAnnotation, Button, Canvas, CheckboxInput, CircleAnnotation, Civil3DNavigator, CivilCrossSectionNavigator, CivilElevationNavigator, CivilNavigator, CivilPlanNavigator, CloudStorage, ColorInput, CommandsMenu, Component, Components, CubeMap, DXFExporter, DimensionLabelClassName, DimensionPreviewClassName, Disposer, DragAndDropInput, DrawManager, Drawer, Dropdown, EdgeMeasurement, EdgesClipper, EdgesPlane, Event, FaceMeasurement, FloatingWindow, FragmentBoundingBox, FragmentClassifier, FragmentClipStyler, FragmentExploder, FragmentHider, FragmentHighlighter, FragmentIfcLoader, FragmentIfcStreamConverter, FragmentManager, FragmentPlans, FragmentPropsStreamConverter, FragmentStreamLoader, FragmentTree, GeometryVerticesMarker, IfcCategories, IfcCategoryMap, IfcElements, IfcJsonExporter, IfcPropertiesFinder, IfcPropertiesManager, IfcPropertiesProcessor, IfcPropertiesUtils, IfcStreamingSettings, LengthMeasurement, LineIntersectionPicker, MaterialManager, MiniMap, Modal, Mouse, OrthoPerspectiveCamera, PostproductionRenderer, PropertiesStreamingSettings, PropertyTag, RangeInput, RectangleAnnotation, ScreenCuller, ShadowDropper, Simple2DMarker, Simple2DScene, SimpleCamera, SimpleClipper, SimpleDimensionLine, SimpleGrid, SimplePlane, SimpleRaycaster, SimpleRenderer, SimpleSVGViewport, SimpleScene, SimpleUICard, SimpleUIComponent, Spinner, TextAnnotation, TextArea, TextInput, ToastNotification, ToolComponent, Toolbar, TreeView, UIElement, UIManager, VertexPicker, ViewpointsManager, VolumeMeasurement, bufferGeometryToIndexed, generateExpressIDFragmentIDMap, generateIfcGUID, isPointInFrontOfPlane, isTransparent, obbFromPoints };
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

// Set up road navigator

const navigator = new OBC.Road3DNavigator(components);
const navigator = new OBC.Civil3DNavigator(components);
navigator.draw(model);
navigator.setup();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as THREE from "three";
import * as FRAGS from "bim-fragment";
import { Alignment, FragmentsGroup } from "bim-fragment";
import { CurveHighlighter } from "../RoadNavigator/src/curve-highlighter";
import { CurveHighlighter } from "../CivilNavigator/src/curve-highlighter";
import { Component, Event } from "../../base-types";
import { Components, Simple2DMarker, ToolComponent } from "../../core";
import { CivilMarkerType } from "../RoadNavigator";
import { CivilMarkerType } from "../CivilNavigator";

export class Road3DNavigator extends Component<any> {
export class Civil3DNavigator extends Component<any> {
static readonly uuid = "0a59c09e-2b49-474a-9320-99f51f40f182" as const;

readonly onHighlight = new Event<{
Expand Down Expand Up @@ -40,7 +40,7 @@ export class Road3DNavigator extends Component<any> {
constructor(components: Components) {
super(components);

this.components.tools.add(Road3DNavigator.uuid, this);
this.components.tools.add(Civil3DNavigator.uuid, this);

const scene = this.components.scene.get();
this.highlighter = new CurveHighlighter(scene, "absolute");
Expand Down Expand Up @@ -149,4 +149,4 @@ export class Road3DNavigator extends Component<any> {
}
}

ToolComponent.libraryUUIDs.add(Road3DNavigator.uuid);
ToolComponent.libraryUUIDs.add(Civil3DNavigator.uuid);
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@
// Set up road navigator


const navigator = new OBC.RoadPlanNavigator(components);
const navigator = new OBC.CivilPlanNavigator(components);
const horizontalWindow = navigator.uiElement.get("floatingWindow");
horizontalWindow.visible = true;
navigator.draw(model);

const elevationNavigator = new OBC.RoadElevationNavigator(components);
const elevationNavigator = new OBC.CivilElevationNavigator(components);
const drawer = elevationNavigator.uiElement.get("drawer");
drawer.visible = true;

const navigator3D = new OBC.Road3DNavigator(components);
const navigator3D = new OBC.Civil3DNavigator(components);
navigator3D.draw(model);
navigator3D.setup();

Expand Down Expand Up @@ -153,14 +153,14 @@
navigator3D.hideMarker(type);
})

// const navigator = new OBC.Road3DNavigator(components);
// const navigator = new OBC.Civil3DNavigator(components);
// navigator.draw(model);
// navigator.setup();
//
// navigator.highlighter.hoverCurve.material.color.set(1, 1, 1);
// navigator.highlighter.hoverPoints.material.color.set(1, 1, 1);

const crossNavigator = new OBC.RoadCrossSectionNavigator(components);
const crossNavigator = new OBC.CivilCrossSectionNavigator(components);
const crossWindow = crossNavigator.uiElement.get("floatingWindow");
crossWindow.visible = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Components, Simple2DScene, ToolComponent } from "../../core";
import { CivilFloatingWindow } from "../CivilFloatingWindow";
import { EdgesClipper, EdgesPlane } from "../../navigation";

export class RoadCrossSectionNavigator extends Component<any> implements UI {
export class CivilCrossSectionNavigator extends Component<any> implements UI {
static readonly uuid = "96b2c87e-d90b-4639-8257-8f01136fe324" as const;

scene: Simple2DScene;
Expand All @@ -24,7 +24,7 @@ export class RoadCrossSectionNavigator extends Component<any> implements UI {
this.scene = new Simple2DScene(components);
this.setUI();

this.components.tools.add(RoadCrossSectionNavigator.uuid, this);
this.components.tools.add(CivilCrossSectionNavigator.uuid, this);

const clipper = components.tools.get(EdgesClipper);

Expand Down Expand Up @@ -89,4 +89,4 @@ export class RoadCrossSectionNavigator extends Component<any> implements UI {
}
}

ToolComponent.libraryUUIDs.add(RoadCrossSectionNavigator.uuid);
ToolComponent.libraryUUIDs.add(CivilCrossSectionNavigator.uuid);
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import * as FRAGS from "bim-fragment";
import { UI, UIElement } from "../../base-types";
import { Drawer } from "../../ui";
import { Components } from "../../core";
import { RoadNavigator } from "../RoadNavigator";
import { CurveHighlighter } from "../RoadNavigator/src/curve-highlighter";
import { KPManager } from "../RoadNavigator/src/kp-manager";
import { CivilNavigator } from "../CivilNavigator";
import { CurveHighlighter } from "../CivilNavigator/src/curve-highlighter";
import { KPManager } from "../CivilNavigator/src/kp-manager";

export class RoadElevationNavigator extends RoadNavigator implements UI {
export class CivilElevationNavigator extends CivilNavigator implements UI {
static readonly uuid = "097eea29-2d5a-431a-a247-204d44670621" as const;

readonly view = "vertical";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { KPManager } from "./src/kp-manager";

export type CivilMarkerType = "hover" | "select";

export abstract class RoadNavigator extends Component<any> {
export abstract class CivilNavigator extends Component<any> {
enabled = true;

scene: Simple2DScene;
Expand Down Expand Up @@ -61,7 +61,7 @@ export abstract class RoadNavigator extends Component<any> {
}

initialize() {
console.log("View for RoadNavigator: ", this.view);
console.log("View for CivilNavigator: ", this.view);
}

get() {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@

// 3. Horizontal alignment

const planNavigator = new OBC.RoadPlanNavigator(components);
const planNavigator = new OBC.CivilPlanNavigator(components);
const horizontalWindow = planNavigator.uiElement.get("floatingWindow");
horizontalWindow.visible = true;
planNavigator.draw(model);

// 4. Vertical alignment

const elevationNavigator = new OBC.RoadElevationNavigator(components);
const elevationNavigator = new OBC.CivilElevationNavigator(components);
const drawer = elevationNavigator.uiElement.get("drawer");
drawer.visible = true;

Expand All @@ -117,15 +117,15 @@

// 5. 3D alignment

const navigator3D = new OBC.Road3DNavigator(components);
const navigator3D = new OBC.Civil3DNavigator(components);
navigator3D.draw(model);
navigator3D.setup();
navigator3D.highlighter.hoverCurve.material.color.set(1, 1, 1);
navigator3D.highlighter.hoverPoints.material.color.set(1, 1, 1);

// 6. Cross section

// const crossNavigator = new OBC.RoadCrossSectionNavigator(components);
// const crossNavigator = new OBC.CivilCrossSectionNavigator(components);
// const crossWindow = crossNavigator.uiElement.get("floatingWindow");
// crossWindow.visible = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import * as FRAGS from "bim-fragment";
import { UI, UIElement } from "../../base-types";
import { FloatingWindow } from "../../ui";
import { Components, ToolComponent } from "../../core";
import { RoadNavigator } from "../RoadNavigator";
import { CivilNavigator } from "../CivilNavigator";
import { FragmentBoundingBox } from "../../fragments";
import { PlanHighlighter } from "./src/plan-highlighter";
import { CivilFloatingWindow } from "../CivilFloatingWindow";
// import { KPStation } from "../RoadNavigator/src/kp-station";
import { KPManager } from "../RoadNavigator/src/kp-manager";
// import { KPStation } from "../CivilNavigator/src/kp-station";
import { KPManager } from "../CivilNavigator/src/kp-manager";

export class RoadPlanNavigator extends RoadNavigator implements UI {
export class CivilPlanNavigator extends CivilNavigator implements UI {
static readonly uuid = "3096dea0-5bc2-41c7-abce-9089b6c9431b" as const;

readonly view = "horizontal";
Expand Down Expand Up @@ -39,7 +39,7 @@ export class RoadPlanNavigator extends RoadNavigator implements UI {

this.setUI();

this.components.tools.add(RoadPlanNavigator.uuid, this);
this.components.tools.add(CivilPlanNavigator.uuid, this);

this.onHighlight.add(({ mesh }) => {
this.highlighter.showCurveInfo(mesh);
Expand Down Expand Up @@ -98,4 +98,4 @@ export class RoadPlanNavigator extends RoadNavigator implements UI {
}
}

ToolComponent.libraryUUIDs.add(RoadPlanNavigator.uuid);
ToolComponent.libraryUUIDs.add(CivilPlanNavigator.uuid);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as THREE from "three";
import * as FRAGS from "bim-fragment";
import { CurveHighlighter } from "../../RoadNavigator/src/curve-highlighter";
import { KPManager } from "../../RoadNavigator/src/kp-manager";
import { CurveHighlighter } from "../../CivilNavigator/src/curve-highlighter";
import { KPManager } from "../../CivilNavigator/src/kp-manager";

export class PlanHighlighter extends CurveHighlighter {
private readonly markupMaterial: THREE.LineBasicMaterial;
Expand Down
10 changes: 5 additions & 5 deletions src/civil/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from "./RoadPlanNavigator";
export * from "./RoadElevationNavigator";
export * from "./RoadNavigator";
export * from "./Road3DNavigator";
export * from "./RoadCrossSectionNavigator";
export * from "./CivilPlanNavigator";
export * from "./CivilElevationNavigator";
export * from "./CivilNavigator";
export * from "./Civil3DNavigator";
export * from "./CivilCrossSectionNavigator";

0 comments on commit 83e7092

Please sign in to comment.