I am using the Springs Element Sketch Collector to collect the sketches of a set of floors, but when any of the floors have Floor opening cuts (vertical openings), the sketch returned is the outline of one of the holes. If there are multiple floor opening cuts, it still only returns one boundary.
I am guessing that it is a Revit issue, but it could also have something to do with the Collector.ElemenSketch node.
I should note that I have no problems with shaft openings or openings made within the sketch of the floor.
It works correctly for me with FetchModelCurves set to False. And I mean it gets the sketch of the element. If you want to get all the openings as lines then the solution from @Kulkul is probably the best way to go.
Okay, so the geometry of the floor element does hold the geometry of the floor opening cuts - at least thatās consistent.
I donāt have your āGroup Curvesā node, so I canāt run it to the end right now - but I can create a similar logic. Thank you!
Iām not quite sure that it solves my entire problem though, because I need to access the model curves, as my script concludes with defining a new location for the outer modelcurves (with Springs Element Set Location). I am trying to keep the hope alive that I donāt have to change that logic.
My workflow is the same logic as yourās i just gave you another method to get the result your looking for. Please try and come back here if you donāt get the result. You can add ModelCurves at the end as shown below.
I might be wrong here, but if I do that I get new modelcurves, and in order to modify the outline of the floors, I have to collect the original model curves of the floor. I will look into finding a different way of collecting the model curves, and then Iāll be back.
(Not that it makes a difference to the workflow, but I should note that I donāt need the geometry of the openings, just the outline).
Iāll just attach a simplified version of my script, to show what I am trying to do:
Okay, so I think can see where the problem with the modelcurve comes from - The Element Sketch Collector relies on the correlation between Sketch Id and Element Id to be:
Sketch Id = Element Id -1
But when a floor opening cut is used, I think that the Ids are shifted, and the sketch of one of the openings take over the Sketch Id of Element Id -1.
Though it is not ideal, I think I will attempt collecting all the modelcurves of the model and filtering them by comparing their geometry to the curves found in the way that Kulkul suggested.
The script that I called ID collector looks as follows:
For anyone who might be somewhat inexperienced with Dynamo and Python like me, the script takes in i.e. floor elements, deletes the element, stores the IDs of the elements which are deleted as a result of the floor being deleted (the modelcurves of the floor being some of them), and then rolls back the deletion. The output is then the IDs of all the elements connected to the floor.
I still use the Spring Element Sketch Collector to collect the curves, because as Viktor mentioned, it works as expected, when āfetchModelCurvesā is set to false. But I could also just as well collect the geometry from the model curves.
The reason that I donāt use the method that Kulkul introduced, of extracting the geometry of the top surface, is that I get a mismatch between the boundary curves and the model lines if there is i.e. af shaft opening breaking the border of the floor. But if you just need the actual geometric border of the floor, this method will probably be the way to go.
After I collect both the outline curve of the floor and all the model curves, I compare the midpoints of the curves an the geometry of the modellines. This way I both pick out the model curves which corespond to the outline (and not the openings), and I sort the model curves in the same order as the outline curves.