-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from RyugaRyuzaki/develop
add change length, Pset, type
- Loading branch information
Showing
79 changed files
with
1,240 additions
and
529 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
45 changes: 45 additions & 0 deletions
45
packages/clay/src/geometries/Profiles/IShapeProfile/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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import * as THREE from "three"; | ||
import {Model} from "../../../base"; | ||
import {ArbitraryClosedProfile} from "../ArbitraryClosedProfile"; | ||
import {IIfcBaseConfig} from "../../../elements"; | ||
|
||
export interface IIShapeConfig { | ||
bw: number; | ||
hw: number; | ||
bf: number; | ||
hf: number; | ||
} | ||
|
||
export class IShapeProfile extends ArbitraryClosedProfile { | ||
height = 0; | ||
width = 0; | ||
|
||
constructor(model: Model, config: IIShapeConfig) { | ||
super(model); | ||
const {bw, hw, hf} = config; | ||
this.height = hw + hf * 2; | ||
this.width = bw; | ||
this.updateProfile(this.updateIShape(config)); | ||
} | ||
private updateIShape(update: IIShapeConfig) { | ||
const {bw, hw, bf, hf} = update; | ||
const points: THREE.Vector3[] = []; | ||
points.push(new THREE.Vector3(bf / 2, hw / 2 + hf, 0)); | ||
points.push(new THREE.Vector3(bf / 2, hw / 2, 0)); | ||
points.push(new THREE.Vector3(bw / 2, hw / 2, 0)); | ||
points.push(new THREE.Vector3(bw / 2, -hw / 2, 0)); | ||
points.push(new THREE.Vector3(bf / 2, -hw / 2, 0)); | ||
points.push(new THREE.Vector3(bf / 2, -hw / 2 - hf, 0)); | ||
points.push(new THREE.Vector3(-bf / 2, -hw / 2 - hf, 0)); | ||
points.push(new THREE.Vector3(-bf / 2, -hw / 2, 0)); | ||
points.push(new THREE.Vector3(-bw / 2, -hw / 2, 0)); | ||
points.push(new THREE.Vector3(-bw / 2, hw / 2, 0)); | ||
points.push(new THREE.Vector3(-bf / 2, hw / 2, 0)); | ||
points.push(new THREE.Vector3(-bf / 2, hw / 2 + hf, 0)); | ||
points.push(new THREE.Vector3(bf / 2, hw / 2 + hf, 0)); | ||
return points; | ||
} | ||
getInfo = () => { | ||
return {} as IIfcBaseConfig; | ||
}; | ||
} |
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,8 +1,10 @@ | ||
import * as WEBIFC from "web-ifc"; | ||
import {ClayObject} from "../../../base/clay-object"; | ||
import {IIfcBaseConfig} from "../../../elements"; | ||
|
||
export abstract class Profile extends ClayObject { | ||
abstract attributes: WEBIFC.IFC4X3.IfcProfileDef; | ||
abstract update: () => void; | ||
abstract updateProfile: (update: any) => void; | ||
abstract getInfo: () => IIfcBaseConfig; | ||
} |
Oops, something went wrong.