Geometry Scaling and Coincident points error

Hi, all!

I have created a script, that renumbers areas, based on a a Spline and areas selection. The problem is that the script worked just fine untill yesterday, when I suddenly got a message about Geometry Scaling issue. After changing the Geometry Scaling, I recieved a warning from the Area.Boundaries node, saying: “points are most likely coincident”.

The strange thing is that from what I see, Dynamo has successfully recreated the boundaries, selected the Spline, etc. See image:

The other issue is that there was absolutely no problem with the same script, file, spline and even the areas, on Friday when I last used it. The only difference is that one of the areas was erased and we needed to re-run it. I tried changing the project units and the geometry scaling, but it does not seem to work (the file is currently in cm, I tried both m and mm). I really think it is a units - scaling related issue, but I still cannot figure it out. The projects is one of an extremely large scale, so this could be the problem. Attatched is the script.

Any help would be highly appreciated! Thx in advance!

Areas - Renumber by Spline + Prefix.dyn (95.4 KB)

Seems like no one has any clue? :frowning:

Hi @danail.momchilov,

Just give us some time to think about your topic haha. You can ignore the messages about GeometryScaling. I have experienced problems when I increase the Geometry Scaling to Large or to Extra Large. I think you now have the same problem. Try using the script with scaling set to Medium. If the rooms are not renumbered properly it might be something else.

The Geometry Scaling message is a Warning, not an Error. Changing the project units will not fix the issue.
Let me know if the script works on “Medium”.

Hi, thx! and sorry for the rush… The script does not work on Medium either :slight_smile:

From what you are saying, I think it has to be related with the area boundaries, as quite often they are not properly drawn / enclosed, they could have overlapping lines, etc. I tried fixing some of the area boundary lines and it seems those areas are no longer a problem. In this case, I need to think of a way to securely recreate area boundaries, as otherwise checking and fixing all of them would not be a nice task…

I tried accessing the area bounding box directly through the API, using the “Area.BoundingBox” property, but it seemed to return data in an uknown type in Dynamo (some kind of a “Reflected Indexer…”), see the pic:

Here is the simple code in Python:

You miss some reference to the Revit API. and the Boundingbox property needs a View in which it can calculate the Boundingbox

1 Like

Btw, I have your script (from the first post) working.

1 Like

I haven’t still had the chance to test your python code, but it seems like it’s a working solution. Would you mind sharing the file?

I was also experiencing similar problems with another script, I think that would solve the issue there as well!

Thx!

@Joelmick

I finally got the time to test yourPython code, but it does not seem to work that way, now I get an error from the BoundingBox.Contains node, saying it expects an argument of type …Geometry.BoundingBox, but was called with System.Object

See image:

There is a difference between a Revit API Boundingbox and a Dynamo Boundingbox. You try a function which is made for a Dynamo boundingbox, but you try is with a Revit one. This causes the Error.

Can you not use the Element.BoundingBox node? Put the Area elements from the FilteredByBoolMask node in the Element.BoundingBox node. This should give you a Dynamo Boundingbox?

Is that doesn’t work we have to write a function for the Python node which parses a Revit Boundingbox to a Dynamo boundingbox

Yes, that’s what I already have and had in the first place…I mean the solution in which I use the dynamo bounding box. I was just trying to follow your suggestion :slight_smile: