We have created a model in Grasshopper that is accessible through Shapedrive on our website. Recently, we added a product drawing in a PDF format that contains product specifications. However, this has caused the model to exceed the 10-second limit on Shapedriver. We have optimized the model and reduced the time to below 10 seconds, but it still takes some time to load.
To address this issue, we have created a boolean toggle to generate the drawing and create the PDF once the product specifications are finalized. We would like to know if there is a way to disable entire groups when the boolean toggle is false. Additionally, we would like to know if disabling components will affect the computation time on Shapedriver.
Finally, we are also seeking advice on any better ways to create a drawing within the model. Please see the attached photo for reference.
You cannot parametrically disable components in Grasshopper, but if you create a toggle with a stream filter, you can make sure a group of components does not receive any data and therefore does not generate any computation time. This would be for example easy to do in your example above before the Make2D component which is typically long to compute.
If you need in depth help to create drawings, please contact our projects team and we can evaluate your needs with you.
In order to create a 2D representation, you will need to create a boolean toggle for each stream gate and curve content. In my experience, to ensure calculations complete within 10 seconds on ShapeDiver, I sometimes have to simplify curves to polylines and aim for calculations under 500ms (on PC) with the Make 2D component. However, the speed can vary depending on your CPU (mine is Ryzen9-5900X). In your screenshot its already at 1300ms =/ If you have multiple PDF files, you will need to toggle the settings manually in sequence for each file or batch it using a custom script with ShapeDiver’s API.
The automation script depends on your needs, application language, and environment. To access the ShapeDiver Viewer & Backend APIs, you will need a Business Plan. If you are interested in making this development, we can discuss further privately, or you can contact ShapeDiver’s projects team directly if you need more information.