Good afternoon Dynamo monsters!
I wondered whether it is possible to arrange the fastening clamps of pipelines mounted under the embedded metal structure in automatic mode.
The idea is the following. We lay pipelines in the model. We place embedded metal structures over pipelines. A general view of this is shown in the screenshot from the model on the left.
On the right, in the same screenshot, it shows how it should, in theory, turn out in the end.
I tried, therefore, to write the code in Dynamo, which I also attach.
The code first contains the coordinates of the beginning and end of the pipelines, the same with the coordinates of the metal structures. Based on the coordinates of the latter and an arbitrary point (with a modified Z coordinate), a plane is built. As a result, the Geometry.IntersectAll node finds the intersection points of the constructed planes and lines from pipelines. Based on the received coordinate, a yoke is placed by the FamilyInstance.ByPoint node.
It would seem that everything is fine, BUT:
-
Geometry.IntersectAll only works with the intersect cross product. And this means that if I lay others under some pipelines (on different floors, for example), then absolutely all points of intersection of all pipelines with all planes of all metal structures are located. The same will happen if the pipes are built next to or on top. In this connection, I would like to know whether it is possible to build a rectangular plane using 4 points (2 of which will be the coordinates of the metal structure) so that it is not infinite and the search for intersections is carried out only for a specific pipe with a specific plane (shown in screenshot 3)? And this node most likely will no longer fit.
-
Letβs say the 1st point is decided. Is it possible to determine which pipe is being crossed at the intersection point? This is necessary in order to put a clamp of a certain diameter in the future, since only one type of clamp is installed in my node (in this case, for a pipe with DN40). That is, so that the dynamo itself determines the diameter of the pipe, on the straight line of which the intersection point is located and put a clamp of the corresponding diameter.
-
The clamp is placed in the position in which this family was designed. But the pipe can conditionally go not only from north to south, but also from west to east. In both cases, the clamp is placed for north-south. Is it possible to make the clamp change its direction and always be placed along the pipe, and not across?
Iβve been scratching my head for three weeks nowβ¦ I would be grateful for your help!
Π Π°ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠ° Ρ ΠΎΠΌΡΡΠΎΠ².dyn (43.6 KB)