-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
131 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from "./SimpleCurtainWall" | ||
export * from "./SimpleCurtainWall"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from "./SimpleMember" | ||
export * from "./SimpleMember"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 40 additions & 42 deletions
82
packages/clay/src/elements/Plates/SimplePlate/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,49 @@ | ||
import { IFC4X3 as IFC } from "web-ifc"; | ||
import { v4 as uuidv4 } from "uuid"; | ||
import * as THREE from "three"; | ||
import { Element } from "../../../Elements"; | ||
import { Model } from "../../../../base"; | ||
import { SimplePlateType } from ".."; | ||
import { v4 as uuidv4 } from "uuid"; | ||
import { IfcUtils } from "../../../../utils/ifc-utils"; | ||
import { Extrusion, RectangleProfile } from "../../../../geometries"; | ||
import * as THREE from "three"; | ||
|
||
export class SimplePlate extends Element { | ||
attributes: IFC.IfcPlate; | ||
|
||
body: Extrusion<RectangleProfile>; | ||
|
||
type: SimplePlateType | ||
|
||
constructor(model: Model, type: SimplePlateType) { | ||
super(model, type) | ||
this.type = type | ||
|
||
const placement = IfcUtils.localPlacement(); | ||
|
||
const profile = new RectangleProfile(model); | ||
profile.dimension.x = 0.0833333333333333 | ||
profile.dimension.y = 1.9238 | ||
profile.dimension.z = 1 | ||
profile.position = new THREE.Vector3(0,0,0) | ||
profile.update(); | ||
|
||
this.body = new Extrusion(model, profile); | ||
const id = this.body.attributes.expressID; | ||
this.type.geometries.set(id, this.body); | ||
this.geometries.add(id); | ||
|
||
|
||
this.attributes = new IFC.IfcPlate( | ||
new IFC.IfcGloballyUniqueId(uuidv4()), | ||
null, | ||
null, | ||
null, | ||
null, | ||
placement, | ||
IfcUtils.productDefinitionShape(model, [this.body.attributes]), | ||
null, | ||
type.plateType, | ||
) | ||
|
||
this.model.set(this.attributes); | ||
} | ||
|
||
attributes: IFC.IfcPlate; | ||
|
||
body: Extrusion<RectangleProfile>; | ||
|
||
type: SimplePlateType; | ||
|
||
constructor(model: Model, type: SimplePlateType) { | ||
super(model, type); | ||
this.type = type; | ||
|
||
const placement = IfcUtils.localPlacement(); | ||
|
||
const profile = new RectangleProfile(model); | ||
profile.dimension.x = 0.0833333333333333; | ||
profile.dimension.y = 1.9238; | ||
profile.dimension.z = 1; | ||
profile.position = new THREE.Vector3(0, 0, 0); | ||
profile.update(); | ||
|
||
this.body = new Extrusion(model, profile); | ||
const id = this.body.attributes.expressID; | ||
this.type.geometries.set(id, this.body); | ||
this.geometries.add(id); | ||
|
||
this.attributes = new IFC.IfcPlate( | ||
new IFC.IfcGloballyUniqueId(uuidv4()), | ||
null, | ||
null, | ||
null, | ||
null, | ||
placement, | ||
IfcUtils.productDefinitionShape(model, [this.body.attributes]), | ||
null, | ||
type.plateType, | ||
); | ||
|
||
this.model.set(this.attributes); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.