# Geometry Scaling and Coincident points error

**URL:** <https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729>\
**Category:** Revit\
**Created:** [January 26, 2021, 8:54am UTC](https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729 "2021-01-26T08:54:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![danail.momchilov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/danail.momchilov/32/152056_2.png) [@danail.momchilov](https://forum.dynamobim.com/u/danail.momchilov)\
**Post date:** [January 26, 2021, 8:54am UTC](https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729/1 "2021-01-26T08:54:51Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/e/6e87fe6da7dc232147c92b30e73b4f75cc56c237.jpeg)

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](https://forum.dynamobim.com/uploads/short-url/af121fKb47f8dF2rKWHmdrPzNik.dyn) (95.4 KB)

---

<div class="post-metadata">

**Author:** ![danail.momchilov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/danail.momchilov/32/152056_2.png) [@danail.momchilov](https://forum.dynamobim.com/u/danail.momchilov)\
**Post date:** [January 26, 2021, 10:21am UTC](https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729/2 "2021-01-26T10:21:42Z")

</div>

Seems like no one has any clue? ☹

---

<div class="post-metadata">

**Author:** ![Joelmick](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joelmick/32/93148_2.png) [@Joelmick](https://forum.dynamobim.com/u/Joelmick)\
**Post date:** [January 26, 2021, 2:14pm UTC](https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729/3 "2021-01-26T14:14:14Z")

</div>

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”.

---

<div class="post-metadata">

**Author:** ![danail.momchilov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/danail.momchilov/32/152056_2.png) [@danail.momchilov](https://forum.dynamobim.com/u/danail.momchilov)\
**Post date:** [January 26, 2021, 2:31pm UTC](https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729/4 "2021-01-26T14:31:03Z")

</div>

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

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:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/7/f746389aeeef4dbce5910a0d512db46c4e0e1234.png)

Here is the simple code in Python:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/e/4e52fd3107984a37074e86ea7397b66936f28cf2.png)

---

<div class="post-metadata">

**Author:** ![Joelmick](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joelmick/32/93148_2.png) [@Joelmick](https://forum.dynamobim.com/u/Joelmick)\
**Post date:** [January 26, 2021, 2:40pm UTC](https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729/5 "2021-01-26T14:40:26Z")

</div>

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

 ![Untitled](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/7/d71501117d95f30ab451793117c8736b5c4ff91b.png)

---

<div class="post-metadata">

**Author:** ![Joelmick](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joelmick/32/93148_2.png) [@Joelmick](https://forum.dynamobim.com/u/Joelmick)\
**Post date:** [January 26, 2021, 2:41pm UTC](https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729/6 "2021-01-26T14:41:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![danail.momchilov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/danail.momchilov/32/152056_2.png) [@danail.momchilov](https://forum.dynamobim.com/u/danail.momchilov)\
**Post date:** [January 26, 2021, 3:25pm UTC](https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729/7 "2021-01-26T15:25:20Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![danail.momchilov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/danail.momchilov/32/152056_2.png) [@danail.momchilov](https://forum.dynamobim.com/u/danail.momchilov)\
**Post date:** [February 9, 2021, 11:43am UTC](https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729/8 "2021-02-09T11:43:51Z")

</div>

@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:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/f/7f5e7a755c265e445ea2154fbb230404120b325a.png)

---

<div class="post-metadata">

**Author:** ![Joelmick](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joelmick/32/93148_2.png) [@Joelmick](https://forum.dynamobim.com/u/Joelmick)\
**Post date:** [February 9, 2021, 1:11pm UTC](https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729/9 "2021-02-09T13:11:32Z")

</div>

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.

 ![Untitled](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/d/cdd670be08ed355cf5ce7d5a89a1cdeb145f2c7f.png)

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

---

<div class="post-metadata">

**Author:** ![danail.momchilov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/danail.momchilov/32/152056_2.png) [@danail.momchilov](https://forum.dynamobim.com/u/danail.momchilov)\
**Post date:** [February 9, 2021, 1:14pm UTC](https://forum.dynamobim.com/t/geometry-scaling-and-coincident-points-error/59729/10 "2021-02-09T13:14:01Z")

</div>

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 🙂
