Using the Geometry.Trim node I managed to trim a surface with one curve. How should a set up the nodes so that I can trim one surface with multiple curves?
For the moment instead of one surface with 25 holes I get 25 surface with 1 hole…
just as another exercise if you’re interested, I think you can do this with the while loop package on the package manager, or you might be able to to do it with the reduce node and some clever custom nodes.
Loops? We don’t need no stinking loops. Your trim operation will result in a pile of overlapping surfaces that all cover each others’s holes. You need to find all the areas that they share in common. That is, you need to intersect all of them.
I hope you don’t mind another option. From some time ago DesignScript imperative code is working, so we can make loops directly with DS code.
The text of the function definition:
def TrimWithAll (Su,CuT:var,RefP:var)
{
return=[Imperative]
{
SuTrimmed={};
SuTrimmed[0]=Su.Trim(CuT[0],RefP[0]);
N=1;
NCurv=Count(CuT);
while (N<(NCurv))
{
SuTrimmed[N]=SuTrimmed[N-1][0].Trim(CuT[N],RefP[N]);
N=N+1;
}
return=SuTrimmed[N-1][0];
}
}
Some notes:
-You have to deal with having to select a point from every curve, that in my opinion is a pain. In a case like this (circles) you can implement in the function to get the center point and have a function that only need the curves.
-The experience until now is that Dynamo is blazing fast managing several simple solids. If I would be you, I will extrude the circles and use difference. You have already solid commands that allow to make Boolean operation with several elements, and you can forget about the reference point. But obviously the element to be trimmed has to be a solid instead of a surface.
I am trying to trim down a surface caused by the walls I have built in Revit. Basically the extruded surfaces should help to slice off the end of my surface that has intersected with the floor plate. Can this be achieved with the Geometry.Trim tool described above?
I found a viable solution. Since regulations limit cameras only to corridors and the possibility of sensors in the rooms, I can develop my system array limited to Revit Room Boundary. I simply did a GetItemAtIndex to reference the room I want and then associate the correct cameras to that surface geometry. I can save out different Revit Adaptive Families depending on the design solution I want to have for the system.
Thanks for the willingness to help! I will definitely continue to use Dynamo and I have been spreading the word about this awesome new program in my school at North Dakota State University. I’m planning to have this be an integral part of my Thesis design process. Keep up the great work!