Conversation
README.md
Outdated
| @@ -1,59 +1,380 @@ | |||
|  <Please check version is the same as specified in requirements.txt> | |||
| # Tuturial dynamo | |||
| Welcome to this tutorial on integrating Dynamo with VIKTOR! VIKTOR is a platform dedicated to the Engineering and Construction industry, providing a seamless integration with 3rd party software. In this tutorial, we will explore how to render a basic house with Dynamo and visualize it in VIKTOR. To get started, the user will provide parameters such as the number of houses, width, depth, number of floors, and heights for floors and roofs. The Viktor worker will then compute the Dynamo model using the command-line interface included within Dynamo Sandbox. The geometry of the model is generated using either Autodesk Revit or FormIt. The geometry JSON is then converted to a mesh, which is rendered and visualized in Viktor. In this tutorial, we will cover the step-by-step process of setting up a VIKTOR app with Dynamo integration we will cover: | |||
There was a problem hiding this comment.
| Welcome to this tutorial on integrating Dynamo with VIKTOR! VIKTOR is a platform dedicated to the Engineering and Construction industry, providing a seamless integration with 3rd party software. In this tutorial, we will explore how to render a basic house with Dynamo and visualize it in VIKTOR. To get started, the user will provide parameters such as the number of houses, width, depth, number of floors, and heights for floors and roofs. The Viktor worker will then compute the Dynamo model using the command-line interface included within Dynamo Sandbox. The geometry of the model is generated using either Autodesk Revit or FormIt. The geometry JSON is then converted to a mesh, which is rendered and visualized in Viktor. In this tutorial, we will cover the step-by-step process of setting up a VIKTOR app with Dynamo integration we will cover: | |
| Welcome to this tutorial on integrating Dynamo with VIKTOR! VIKTOR is a platform dedicated to the Engineering and Construction industry, providing a seamless integration with 3rd party software. In this tutorial, we will explore how to render a basic house with Dynamo and visualize it in VIKTOR. To get started, the user will provide parameters such as the number of houses, width, depth, number of floors, and heights for floors and roofs. The Viktor worker will then compute the Dynamo model using the command-line interface included within Dynamo Sandbox. The geometry of the model is generated using either Autodesk Revit or FormIt. The geometry JSON is then converted to a mesh, which is rendered and visualized in VIKTOR. In this tutorial, we will cover the step-by-step process of setting up a VIKTOR app with Dynamo integration we will cover: |
README.md
Outdated
| Step 2. [Setting up worker](#2-fill-the-template-with-data) | ||
|
|
||
| An example of the application is shown in the image below. | ||
| By the end of this tutorial, you will have created a simple viktor application that creates a geometry and data view of a simple house, see gif below: |
There was a problem hiding this comment.
| By the end of this tutorial, you will have created a simple viktor application that creates a geometry and data view of a simple house, see gif below: | |
| By the end of this tutorial, you will have created a simple VIKTOR application that creates a geometry and data view of a simple house, see GIF below: |
README.md
Outdated
|
|
||
| Additionally, the file should contain the following arguments: | ||
| During the tutorial, we added some links to additional information; but don't let them distract you too much. Stay | ||
| focused on completing the tutorial. After this, you will know everything you need to create an app which includes Dynamo integration. |
There was a problem hiding this comment.
| focused on completing the tutorial. After this, you will know everything you need to create an app which includes Dynamo integration. | |
| focused on completing the tutorial. After this, you will know everything you need to create an app which includes integrating with Dynamo. |
README.md
Outdated
| the terminal: | ||
|
|
||
| ``` | ||
| viktor-cli create-app my-Dynamo-app |
There was a problem hiding this comment.
| viktor-cli create-app my-Dynamo-app | |
| viktor-cli create-app my-dynamo-app |
My preference goes for lowercase project names
README.md
Outdated
| the application editor. | ||
|
|
||
| ### Step 1.2 Define the input fields | ||
| The dynamo file has got the following input paramaters. |
There was a problem hiding this comment.
| The dynamo file has got the following input paramaters. | |
| The Dynamo file has got the following input paramaters. |
README.md
Outdated
| 2. With the update method, the value of input nodes can be updated. | ||
| 3. When all inputs have been updated as desired, the generate method can be used to generate an updated `File` object. | ||
|
|
||
| ### Step 1.4 Define the app logic to convert the output.xml to a data_group |
There was a problem hiding this comment.
| ### Step 1.4 Define the app logic to convert the output.xml to a data_group | |
| ### Step 1.4 Define the app logic to convert the output.xml to a DataGroup |
README.md
Outdated
| 3. When all inputs have been updated as desired, the generate method can be used to generate an updated `File` object. | ||
|
|
||
| ### Step 1.4 Define the app logic to convert the output.xml to a data_group | ||
| In this step, we will define code to extract data from the dynamo file and output file. The dynamo file is used to get the node id, and the output.xml file is used to get the values. We will be creating another `staticmethod` in the `controller` class. See code below: |
There was a problem hiding this comment.
| In this step, we will define code to extract data from the dynamo file and output file. The dynamo file is used to get the node id, and the output.xml file is used to get the values. We will be creating another `staticmethod` in the `controller` class. See code below: | |
| In this step, we will define code to extract data from the Dynamo file and output file. The Dynamo file is used to get the node id, and the output.xml file is used to get the values. We will be creating another `staticmethod` in the `Controller` class. See code below: |
README.md
Outdated
| Let us go through the above mentioned logic: | ||
| 1. Get the node_id, which corresponds to the same node id as the input file. | ||
| 2. Collect the numerical results. | ||
| 3. We create a structured data group from the collected numerical results using the `DataGroup` and `DataItem` classes. |
There was a problem hiding this comment.
I'm not sure if the reader will understand what we mean by a structured DataGroup. Maybe good to mention that for more information on this, refer to:
https://docs.viktor.ai/docs/create-apps/results-and-visualizations/data-and-tables
README.md
Outdated
|
|
||
| ### Step 1.5 generate a geometry and data view | ||
|
|
||
| We create a new `GeometryAndDataView` method insdie the `controller` class. This method will enable us to show the 3D model of the house along with its data. Here is the code: |
There was a problem hiding this comment.
| We create a new `GeometryAndDataView` method insdie the `controller` class. This method will enable us to show the 3D model of the house along with its data. Here is the code: | |
| We create a new `GeometryAndDataView` method insdie the `Controller` class. This method will enable us to show the 3D model of the house along with its data. Here is the code: |
README.md
Outdated
| return GeometryAndDataResult(geometry=glb_file, data=data_group) | ||
| ``` | ||
| Let us go through the above mentioned logic: | ||
| 1. Update the dynamo file with the `update_model` method(see step 1.3) |
There was a problem hiding this comment.
| 1. Update the dynamo file with the `update_model` method(see step 1.3) | |
| 1. Update the Dynamo file with the `update_model` method(see step 1.3) |
|
@LuukBoot I've reviewed the tutorial. Maybe good that @dsommersviktor also takes a quick look? |
ddijkhuizen
left a comment
There was a problem hiding this comment.
I think there's still quite some reformatting to do before it is suitable to be included in the docs.
The most major point is the structure. You want people to have results fast. Therefore I would think the structure should be such that the user would:
- Create input fields
- Create a
GeometryViewwith mocked output files - Create a data processing method
- Create a
DataViewwith the mocked output files - Create a
GeometryAndDataViewwith the mocked output files - Add the worker logic to supply real output files
Other than that some textual changes I also remarked on the recent 3D model tutorial:
- No numbered headings below the top level (Introduction, Prerequisites and To infinity and beyond sections have no numbering despite being on the top level)
- Include
showLineNumbersat code snippets - Having first references to any object which can be linked to another part of the docs include a link to that object.
- The app can be bumped to V14 so we can lose the
viktor_enforce_field_constraint = True - Include the warning on app creation that this tutorial was written with V14 and that the
create-appcommand will always create an app of the most recent SDK version which may cause unforeseen behaviour.
I do have to say that I am impressed with the brevity of this tutorial even though the subject matter is slightly more complex!!
Interested to hear what you think about it!
No description provided.