DynaShape


#1

Requirements

  1. Dynamo Studio or Dynamo Revit, version 1.3 or newer
  2. MeshToolkit package, which should be installed using the package manager inside Dynamo. You can do this AFTER installing DynaShape, but Dynamo needs to be restarted afterward.

Install

The simplest way is to use the installer in the link below.
http://bit.ly/2w3nD0k (version 0.5.1.1)

WARNING: Do NOT install DynaShape from the package manager inside Dynamo. That is an early testing version and will not work at all!

Examples

These examples may be helpful to get you started: http://bit.ly/2umyEqU


FOR DEVELOPERS

DynaShape is a Dynamo package for constraint-based form finding, optimization and physics simulation. The core algorithm is based on ShapeUp (which is related to Projective Dynamics). This provides an important theoretical foundation by formally describing how different geometric constraints can be defined in a unified and extensible framework, how they can be solved/optimized simultaneously and under what conditions the solution can be guaranteed.

If you are also from the Grasshopper community and familiar with Daniel Piker’s Kangaroo, you will find many similar concepts, usages, and implementation details being borrowed in DynaShape. Kangaroo1 is the first tool of this kind found in direct-acyclic-graph parametric scripting environment. Kangaroo2 demonstrates how computing the equilibrium of physical forces can be achieved in the same manner as solving geometric constraints, and hence unifies the two seemingly different concepts into one workflow. Similar to Kangaroo2, the constraint-solving algorithm in DynaShape uses an alternative formulation based on vector lists, which is different from ShapeUp’s original mathematical formulation. Practically this makes it much easier for users to implement custom goals and constraints.

The complete source code is available on GitHub

@john_pierson (Twitter @60secondrevit) made a quick video on how to build the package from the source code. Many thanks to him :smiley:
(Warning: this video is for a much earlier version of DynaShape, so it is a bit out-of-date now and not every step showed will relevant or correct)


Customized PDF creation using Ghostscript, Dynamo and Python
Morphing with Dynamo
Generate geometry based on mathematical formulas
Optimized roof
How to create a bulge shape?
DynaShape example files
#2

#3

Works perfectly! :thumbsup:


#4

@john_pierson I think you can use NuGet for the Dynamo references as well:
Search for "dynamovisualprogramming"
https://www.nuget.org/packages?q=dynamovisualprogramming


#5

Awesome stuff! :slight_smile:


#6

Great great job! So proud of you Bro!


#8

when im trying to install it , it gives me this message that you should have dynamo installed and it cant find dynamo core and it says click ok to Abort

**note: i have dynamo installed and it works ok and the dynamo core is there in the folder

Thanks


#9

Hi, please make sure the path declared in the installer is set to Dynamo folder, not Dynamo Core folder. So it should be something like C:\Program Files\Dynamo and NOT like this C:\Program Files\Dynamo\Dynamo Core.

If this does not fix the problem for you, please show me a screen shot of the path in the installer, along with the error message and a full screenshot of your Dynamo folder in Windows explorer. Thanks :wink:


#10

That problem seems to be unrelated to DynaShape. As the warning message said: you should use PointAtEqualSegmentLength node instead of Curve.DivideEqually node.


#12

I cannot really fully understand what you are trying to achieve. You mean you want to get a curve INTO dynashape solver or OUT of dynashape solver ?

Perhaps you can share the dynamo script so I can have a closer look :slight_smile


#13

Such a clever package


#14

I must have missed something. I’ve installed the file (no apparent problems) and loaded an example graph. I think I figured out you have to set the graph to Periodic and switch to the preview to select the points but, for me, I can’t get anything to happen from there. What’d I miss?


#15

I have just updated the link to example graph to latest version with a note above each Solver.Execute node to explain how to use it.

Basically you need to set Reset to True once at the beginning. Then switch it to False and turn on Periodic, you should at least see the nodes/vertices start to move. If not, try to ncrease the Periodic update interval (on slower computers, the background view might appear to be frozen if update interval is set too low)

If everything is working up until this point, you can start manipulating the nodes in preview, but if it it does not work then looks like it is a bug that I will need to address. Please let me know your result. Thanks :slight_smile:


#16

Perfect - thanks!


#17

Is there a japanese bow emoticon here? :slight_smile:
Marcel


#18

This is just fantastic! I Love this package and you are a magician!
My Question: I have a collection of sets of 4 points on a spherical surface that together describe a diagrid. All the sets of 4 are non-planar, each defining a ruled surface. I want to nudge the points around to approximate the underlying design surface but get more planar panels.

If I send 1 set of 4 points to the Solver with Goals.CoPlanarGoal_Create and Goals.ShapeMatchingGoal_Create, I can get the set of four points to stay close to their original placement while moving to a more coplaner relationship. Hurray!


However, when I send more than one collection of 4 points (say, 3 groups of 4 points) the result from the solver is only 8 points. It seems to flatten the list structure AND eliminate identical points. So I thought this was originally just a list management issue, but it seems like the solver is doing something a little more complicated?

Essentially, I want to send multiple sets of points to run the same analysis and keep the orginal list structure


#19

Hi Zack, I am really happy that you like the package. I have been a long time follower of your BuildZ blog since 2012.

Answer for your question:

  • You are right, DynaShape automatically merges coincident points into one “node”. This is essentially how we can set up a system where a point can be subjected to multiple, usually conflicting, constraints/goals.

  • If you want to keep track of the original list of points. Probably the easiest way is to bind a polyline to each group of points you want to track (like you already did). The Solver.Execute node will then output these polylines (as PolyCurve objects actually, because Dynamo does not seem to have PolyLine). You can easily extract the points you want from these output polylines. (Note: the polylines/PolyCurves are only output from the solver if fastDisplay is set to False. You collect them from the “geometries” output port of the Solver.Execute node)

  • Probably I will implement some sort of method to maintain and output the original nodes/points structure in the future.


#20

Sweet! Thanks @LongNguyen


#21

Here’s my file if anyone else wants to try a little panel deformation rationalization. Needs Lunchbox package for the Diamond panels.
@LongNguyen, this is excellent and really fast, even with real geometry being generated.
One bug in this alpha/beta, I think: When point count gets over about 160 (40 ish panels) the analysis starts to get weird, seems to ignore the Goals.ShapeMatchingGoal_Create and just goes for planarity, ending up making a pancake.

Kronz_RationalDiamondBall.dyn (44.8 KB)


Dynashape problem
#22

Great work.