-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timber Connention Design #321
Comments
I forgot to mention an important logic regarding the connection design. The 'design' function we talked about yesterday is responsible for filtering the analysis input/output and passing them to the sub-functions. We need to adjust this function so it checks if the design function has an element or node. If it is an element then filter the input as I did for the member design, if it is a node then don't filter the analysis inputs/outputs just pass them along with the nodes and elements. Here is a rough example: // in awatif-design/src/design.ts
designFunctions.forEach((designFunction) => {
designInputs.forEach((designInput) => {
if (designFunction.name in designInput) {
const element = designInput.element;
const node = designInput.node;
if (element) {
const analysisInput = analysisInputs.find(
(i) => (i as any).element == element
);
const analysisOutput = analysisOutputs["default"].find(
(i) => (i as any).element == element
);
if (analysisInput && analysisOutput) {
designOutputs.push(
designFunction(analysisInput, analysisOutput, designInput)
);
}
}
if (node) {
designOutputs.push(
designFunction(nodes, elements, analysisInputs, analysisOutputs, designInput)
);
}
}
});
}); |
Here is the missing part that we brainstormed about in our last meeting. We will create a higher-level function (design per nodes). This function will take all the nodes and elements, along with their associated analysis/design results. It will then determine which elements are connected to the connection node under consideration. Subsequently, it will pass the filtered inputs to a lower-level function for each element, matching your architecture in Python/Typescript.
I've highlighted the main part of the function for clarity. You can implement and test this function in isolation. Unfortunately, I don't yet have documentation about Awatif's architecture as a whole, but I'm working on it. Feel free to ask if you want to understand the big picture.
Also, feel free to change the naming or anything if you think it is better, nothing is concrete yet.
The text was updated successfully, but these errors were encountered: