Shapely

Hello everyone,

Shapely is a great Python library that helps us analyse and manipulate geometries. We think it is important to include this library in Dynamo.

Unlike dynamo, shapely uses its own geometry language. Therefore, transformations must be made between each other without losing data. In this package you will find a dynamo version of shapely geometry.

To use the Dynamoda package, you must first install the “shapely” python library with “pip install shapely”. You can find the guide here. “Customizing Dynamo's Python 3 installation · DynamoDS/Dynamo Wiki · GitHub

When you start dynamo for the first time, the package has not yet been loaded by dynamo and therefore no node belonging to the package will unfortunately not work. Don’t panic and change only the “Lacing (@L2/@L1)” values of the node and force the package to run. After a few attempts the package will work.
Changer d'Images

I have ideas as to why this is happening (Dynamo not installing Python3 packages from the start…) but I haven’t found any solution at the moment. In short, I have an idea but no solution :smiley: I’m actively working on solving this. When it’s solved, I’ll release it as a new version.

I’ve made a tutorial for you on the Github page, you can use it to get a feel for the polygons and let me know if you have any questions or corrections. The package is completely open-source. I am one of those people who think open-source is important!

Github : GitHub - DurmusCesur/Shapely

I’ll leave some examples for you below.

ShapelyBuffer :
Using a dynamo geometry (polygon, polycurve), it creates a new geometry by looking at the user’s offset distance in the same line of the units that make up the geometry. The user can decide the sharpness of the edges of the created geometry.
3

ShapelyUnion :
Allows us to analyse the relationship between 2 geometries. It combines 2 geometries and returns a closed new geometry. The result is always a polygon, polycurve and a list of points that make up the geometry.
4

ShapelySnap :
It allows us to analyse the relationship between 2 geometries. It returns a new closed geometry that adapts to the contours of the geometry approaching the distance specified by the user. The result is always a polygon, polycurve and a list of points that make up that geometry.
5

ShapelyConvexHull :
Dynamo uses the points to create the outermost polygon that the points will form. The result is always a polygon, polycurve and a list of points that form that geometry.6

ShapelyRotateSkew :
Using a 2D dynamo geometry (polygon), it rotates the geometry in the ground plane in the X and Y axes as if it were a 3D geometry and creates a new geometry.
7

ShapelyOffset :
Using a dynamo geometry (polygon, polycurve), it creates a new geometry by looking at the user’s offset distance in the same line of the units that make up the geometry. The generated geometry is always meaningful and stable. The user can decide the sharpness of the edges of the generated geometry.
8

Best regards,
Durmus

13 Likes