DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.71k stars 632 forks source link

Failure to intersect and project geometry when working in millimeters #5233

Closed dimven closed 7 years ago

dimven commented 9 years ago

Hello, I've been meaning to report this earlier. Ever since version 0.8 Dynamo seems to dislike intersecting and projecting objects, when working with large unit sizes(like for example when your project is set up in millimeters). Here are some examples of this: 2015-09-04_14-10-22

I thought it could be due to FP errors. However notice that if I scale the geometry down(or change my units to meters inside Revti), the intersection performs as expected: 2015-09-04_14-10-33

@tatlin, @RodRecker

This doesn't seem to be a limited case. Another user had a problem with this on the forums: http://dynamobim.com/forums/topic/dynamo-intersection/

josols commented 9 years ago

I would say using large coordinates is a general problem in Dynamo (as it has been in Revit for many years) Not only with projecting/intersecting, but with graphics as well.

dimven commented 9 years ago

The above example is roughly about 200m x100m x 120m.

ParametricMonkey commented 8 years ago

Yes I've also noticed this. I have a script which checks the intersection between a model curve and rooms. It use to work but now it says there are no intersections. I thought it might be due to a rounding error caused by having the project base point at a weird level. However, it happens even if you model at level 0.0. By changing the Revit units to meters it fixes the problem. But if you change it back to millimeters it fails. Definitely sounds like a Dynamo precision error.

dimven commented 8 years ago

Hello,

Has anybody had a chance to look into this? Points are severely affected in some cases (surfaces), however curves work just fine. Here's a more detailed study on the stable 0.9 release:

2015-12-17_11-56-15

dimven commented 8 years ago

Another area where planes fail is when projecting at small angles relative to the plane. In the below example any vector hitting the surface at less than 30 degrees fails: 2015-12-17_16-55-10

I am not sure if this points to a major problem with planes or to a minor one limited to the "Point.Project" node.

Looking forward to your feedback on this.

aparajit-pratap commented 8 years ago

@dimven thanks for pointing out these issues. The geometric kernel used in Dynamo (and Revit) has known limitations when performing reliable modeling operations on models with large coordinate values (greater than 10,000 units (plus or minus) in X, Y, or Z). This therefore is a hard problem to fix not only in Dynamo but also in Revit. While addressing this at the kernel level is outside our scope, there may be some workarounds we can make in Dynamo (such as setting bounding boxes around models and scaling them down and then back up after performing the operation) to address them at least partially. We're tracking these issues as enhancements that we can work on going forward.

ParametricMonkey commented 8 years ago

This really should not be categories as an 'enhancement'. It is a fundamental flaw that needs to be sorted out. Not having the ability to offset, intersect and get closest point,is a major problem. Many people use mm on their projects.

dimven commented 7 years ago

Any idea when https://github.com/DynamoDS/Dynamo/pull/6991 will be merged?

monikaprabhu commented 7 years ago

@dimven, @ParametricMonkey - 1.2.3.xxxx dailybuilds available on DynamoBIM(http://dynamobuilds.com/) includes the fix for ASM scaling. All issues reported except for the rotating of planes is fixed in these builds. The rotating of planes is not related to ASM scaling , I'll track it as a separate issue. Please give it a try and if you can still reproduce let us know.

dimven commented 7 years ago

Awesome, will have a look over the weekend.