opengeometry 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- export * from './simple-line';
2
- export * from './poly-line';
3
- export * from './circle';
1
+ export * from './line';
2
+ export * from './polyline';
3
+ export * from './arc';
4
4
  export * from './rectangle';
@@ -0,0 +1,20 @@
1
+ import { Vector3 } from "../../../opengeometry/pkg/opengeometry";
2
+ import * as THREE from "three";
3
+ interface ILineOptions {
4
+ start: Vector3;
5
+ end: Vector3;
6
+ }
7
+ /**
8
+ * Simple Line defined by Two Points
9
+ */
10
+ export declare class Line extends THREE.Line {
11
+ ogid: string;
12
+ options: ILineOptions;
13
+ private line;
14
+ set color(color: number);
15
+ constructor(options: ILineOptions);
16
+ validateOptions(): void;
17
+ setConfig(): void;
18
+ private generateGeometry;
19
+ }
20
+ export {};
@@ -0,0 +1,26 @@
1
+ import * as THREE from 'three';
2
+ import { Vector3 } from '../../../opengeometry/pkg/opengeometry';
3
+ interface IPolyLineOptions {
4
+ points: Vector3[];
5
+ }
6
+ export declare class Polyline extends THREE.Line {
7
+ #private;
8
+ ogid: string;
9
+ options: IPolyLineOptions;
10
+ isClosed: boolean;
11
+ private polyline;
12
+ transformationMatrix: THREE.Matrix4;
13
+ set color(color: number);
14
+ constructor(options?: IPolyLineOptions);
15
+ validateOptions(): void;
16
+ setConfig(): void;
17
+ addPoint(point: Vector3): void;
18
+ /**
19
+ * Every time there are property changes, geometry needs to be discarded and regenerated.
20
+ * This is to ensure that the geometry is always up-to-date with the current state.
21
+ */
22
+ private clearGeometry;
23
+ saveTransformationToBREP(): void;
24
+ private generateGeometry;
25
+ }
26
+ export {};
@@ -1,20 +1,15 @@
1
- import { OGRectangle } from "./../../../opengeometry/pkg/opengeometry";
2
- import * as THREE from "three";
3
- import { RectangeOptions } from "../base-types";
4
- /**
5
- * Rectangle
6
- */
7
- export declare class Rectangle extends THREE.Line {
8
- #private;
1
+ import { IRectangeOptions } from "../base-types";
2
+ import { BaseLinePrimitive } from "./base-line-primitive";
3
+ export declare class Rectangle extends BaseLinePrimitive {
9
4
  ogid: string;
10
- polyLineRectangle: OGRectangle;
11
- options: RectangeOptions;
12
- nodeOperation: String;
13
- set width(width: number);
14
- set breadth(breadth: number);
5
+ options: IRectangeOptions;
6
+ private polyLineRectangle;
15
7
  set color(color: number);
16
- constructor(options: RectangeOptions);
8
+ constructor(options?: IRectangeOptions);
9
+ validateOptions(): void;
17
10
  setConfig(): void;
11
+ getConfig(): IRectangeOptions;
18
12
  generateGeometry(): void;
13
+ getBrep(): any;
19
14
  discardGeometry(): void;
20
15
  }
@@ -0,0 +1,22 @@
1
+ import { OGCube, Vector3 } from "./../../../opengeometry/pkg/opengeometry";
2
+ import * as THREE from "three";
3
+ interface ICubeOptions {
4
+ width: number;
5
+ height: number;
6
+ depth: number;
7
+ center?: Vector3;
8
+ }
9
+ export declare class Cube extends THREE.Mesh {
10
+ #private;
11
+ ogid: string;
12
+ options: ICubeOptions;
13
+ cube: OGCube;
14
+ private _geometryCenterOffset;
15
+ constructor(options: ICubeOptions);
16
+ validateOptions(): void;
17
+ setConfig(): void;
18
+ generateGeometry(): void;
19
+ set outline(enable: boolean);
20
+ get outlineMesh(): THREE.Line<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | null;
21
+ }
22
+ export {};
@@ -1,23 +1,22 @@
1
- import { OGCylinder, Vector3D } from "./../../../opengeometry/pkg/opengeometry";
1
+ import { OGCylinder, Vector3 } from "../../../opengeometry/pkg/opengeometry";
2
2
  import * as THREE from "three";
3
3
  interface ICylinderOptions {
4
4
  radius: number;
5
5
  height: number;
6
6
  segments: number;
7
7
  angle: number;
8
- center?: Vector3D;
8
+ center?: Vector3;
9
9
  }
10
10
  export declare class Cylinder extends THREE.Mesh {
11
11
  #private;
12
12
  ogid: string;
13
13
  options: ICylinderOptions;
14
14
  cylinder: OGCylinder;
15
- private _geometryCenterOffset;
16
15
  constructor(options: ICylinderOptions);
17
16
  validateOptions(): void;
18
17
  setConfig(): void;
19
18
  generateGeometry(): void;
20
19
  set outline(enable: boolean);
21
- getBrepData(): void;
20
+ getBrep(): any;
22
21
  }
23
22
  export {};
@@ -0,0 +1,23 @@
1
+ import { OGCylinderOld, Vector3 } from "../../../opengeometry/pkg/opengeometry";
2
+ import * as THREE from "three";
3
+ interface ICylinderOptions {
4
+ radius: number;
5
+ height: number;
6
+ segments: number;
7
+ angle: number;
8
+ center?: Vector3;
9
+ }
10
+ export declare class CylinderOld extends THREE.Mesh {
11
+ #private;
12
+ ogid: string;
13
+ options: ICylinderOptions;
14
+ cylinder: OGCylinderOld;
15
+ private _geometryCenterOffset;
16
+ constructor(options: ICylinderOptions);
17
+ validateOptions(): void;
18
+ setConfig(): void;
19
+ generateGeometry(): void;
20
+ set outline(enable: boolean);
21
+ getBrepData(): void;
22
+ }
23
+ export {};
@@ -1,2 +1,4 @@
1
- export * from './cylinder';
1
+ export * from './cylinderOld';
2
2
  export * from './polygon';
3
+ export * from './cylinder';
4
+ export * from './cube';
@@ -1,22 +1,28 @@
1
1
  import * as THREE from "three";
2
- import { OGPolygon, Vector3D } from "../../../opengeometry/pkg/opengeometry";
2
+ import { OGPolygon, Vector3 } from "../../../opengeometry/pkg/opengeometry";
3
+ interface IPolygonOptions {
4
+ vertices: Vector3[];
5
+ }
3
6
  export declare class Polygon extends THREE.Mesh {
4
7
  #private;
5
8
  ogid: string;
6
- layerVertices: Vector3D[];
7
- layerBackVertices: Vector3D[];
8
- polygon: OGPolygon | null;
9
- isTriangulated: boolean;
9
+ options: IPolygonOptions;
10
+ polygon: OGPolygon;
11
+ transformationMatrix: THREE.Matrix4;
12
+ set color(color: number);
10
13
  private _geometryCenterOffset;
11
- constructor(vertices?: Vector3D[]);
12
- addVertices(vertices: Vector3D[]): void;
13
- resetVertices(): void;
14
- addVertex(threeVertex: Vector3D): void;
15
- addHole(holeVertices: Vector3D[]): void;
16
- addFlushBufferToScene(flush: string): void;
17
- extrude(height: number): void;
18
- generateExtrudedGeometry(extruded_buff: string): void;
19
- getBrepData(): void;
14
+ constructor(options?: IPolygonOptions);
15
+ validateOptions(): void;
16
+ setConfig(): void;
17
+ generateGeometry(): void;
18
+ addVertices(vertices: Vector3[]): void;
19
+ saveTransformationToBREP(): void;
20
+ getBrepData(): string | null;
21
+ set outlineColor(color: number);
22
+ get outlineColor(): number;
20
23
  set outline(enable: boolean);
21
24
  get outline(): boolean;
25
+ disposeGeometryMaterial(): void;
26
+ dispose(): void;
22
27
  }
28
+ export {};
@@ -1,15 +0,0 @@
1
- import { CircleArc } from "./../../../opengeometry/pkg/opengeometry";
2
- import * as THREE from "three";
3
- import { IBaseCircleOptions } from "../base-types";
4
- export declare class BaseCircle extends THREE.Line {
5
- ogid: string;
6
- circleArc: CircleArc;
7
- options: IBaseCircleOptions;
8
- nodeOperation: String;
9
- set color(color: number);
10
- constructor(options: IBaseCircleOptions);
11
- setConfig(): void;
12
- generateGeometry(): void;
13
- discardGeoemtry(): void;
14
- set radius(radius: number);
15
- }
@@ -1,17 +0,0 @@
1
- import * as THREE from 'three';
2
- import { Vector3D } from '../../../opengeometry/pkg/opengeometry';
3
- /**
4
- * PolyLine defined by multiple points
5
- */
6
- export declare class PolyLine extends THREE.Line {
7
- ogid: string;
8
- points: Vector3D[];
9
- isClosed: boolean;
10
- private polyline;
11
- set color(color: number);
12
- constructor(points?: Vector3D[]);
13
- setConfig(points: Vector3D[]): void;
14
- addPoint(point: Vector3D): void;
15
- private clearGeometry;
16
- private generateGeometry;
17
- }
@@ -1,13 +0,0 @@
1
- import { Vector3D } from "./../../../opengeometry/pkg/opengeometry";
2
- import * as THREE from "three";
3
- /**
4
- * Simple Line defined by Two Points
5
- */
6
- export declare class SimpleLine extends THREE.Line {
7
- ogid: string;
8
- points: Vector3D[];
9
- set color(color: number);
10
- constructor(start?: Vector3D, end?: Vector3D);
11
- addPoint(point: Vector3D): void;
12
- private generateGeometry;
13
- }