-
Notifications
You must be signed in to change notification settings - Fork 4
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
8 changed files
with
191 additions
and
182 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
export type Model = { | ||
nodes: Node[]; | ||
elements: Element[]; | ||
assignments: Assignment[]; | ||
analysisResults: AnalysisResults; | ||
designResults: DesignResults; | ||
}; | ||
|
||
// nodes and elements | ||
export type Node = [number, number, number]; | ||
export type Element = [number, number]; | ||
|
||
// assignments | ||
export type Assignment = | ||
| supportAssignment | ||
| loadAssignment | ||
| propertyAssignment; | ||
type supportAssignment = { node: number; support: [boolean, boolean, boolean] }; | ||
type loadAssignment = { node: number; load: [number, number, number] }; | ||
type propertyAssignment = { element: number; elasticity: number; area: number }; | ||
|
||
// analysis results | ||
export type AnalysisResults = Record< | ||
string, | ||
(deformationResult | reactionResult | normalResult)[] | ||
>; | ||
|
||
type deformationResult = { | ||
node: number; | ||
deformation: [number, number, number]; | ||
}; | ||
type reactionResult = { | ||
node: number; | ||
reaction: [number, number, number]; | ||
}; | ||
type normalResult = { | ||
element: number; | ||
normal: [number, number]; | ||
}; | ||
|
||
// design results | ||
export type DesignResults = timberResult[]; | ||
|
||
type timberResult = { | ||
element: number; | ||
utilizationFactor: number; | ||
effectiveLength: number; | ||
}; |
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.