The input point lies outside of Revit design limits

The input point lies outside of Revit design limits

dirk.neethling
Advocate Advocate
1,385 Views
7 Replies
Message 1 of 8

The input point lies outside of Revit design limits

dirk.neethling
Advocate
Advocate

In an existing application, when inserting a plane like so:

 

Plane oPlane = Plane.CreateByNormalAndOrigin(normal, oIntersection);

 

I get the error:

 

Autodesk.Revit.Exceptions.ArgumentException: 'The input point lies outside of Revit design limits.

 

 The Plane is located the foll. distance from the document origin:

milekm
7,2112259311,6053432

 

This is lower than the Design Limit from the Internal Origin as per the foll. document:
About the Maximum Distance Limit 

 

This application worked in Revit 2017, but fails when I insert planes at around 10-11km from the origin in Revit 2024.

How can I solve this?

0 Likes
1,386 Views
7 Replies
Replies (7)
Message 2 of 8

jeremy_tammik
Alumni
Alumni

Dear Dirk, 

  

Oh dear, that sounds problematic. I will gladly discuss this with the development team. Can you share a complete minimal reproducible case for them to analyse, demonstrating the issue, throwing the exception and showing exactly how your normal vector and origin point are defined? 

  

https://thebuildingcoder.typepad.com/blog/about-the-author.html#2

  

Thank you.

  

Cheers

  

Jeremy

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 8

dirk.neethling
Advocate
Advocate

Hello Jeremy,
thanks for answering. I will try and configure a minimal version of the issue.
Greetings, Dirk

0 Likes
Message 4 of 8

dirk.neethling
Advocate
Advocate

Hello Jeremy,

I have a question about the API update regarding creation of a Plane:
In the 2017 API one could write this: 

 

 

Plane oPlane = new Plane(origin, normal);

 

 

Using the 2024 API I replaced this code with:

 

 

Plane oPlane = Plane.CreateByNormalAndOrigin(normal.Normalize(), origin);

 

 

Would using Plane.Create(Frame) overcome this limitation? If so, could you pls point me to an example? How do I define the Frame?


Attached is a stripped down version of typical code which causes the error. The Addin is also attached, but the paths need to be adjusted for the local test setup. The Addin which appears in Revit would be Lab2BuildTunnel2
Setting a breakpoint on the exception handler (line 217) in the method "GenerateCrossPassageObjects" should catch the error.

Here is the distance from the origin at which the exception is thrown:

Name Value Type

r_origin [ft]31758.313739346118double
r_origin [mile]6.0148321476034319double
r_origin [m]9679.9340277526953double
r_origin [km]9.6799340277526955double

Greetings, Dirk

0 Likes
Message 5 of 8

jeremy_tammik
Alumni
Alumni

I have not used the Frame class myself. Please refer to the documentation:

  

  

Personally, I would assume that the plane creation is more robust the less calculations are involved. Maybe some of the creation methods can circumvent the problems you observe. In principle, however, I would strongly recommend avoiding all work with the large coordinates that you describe. They will always lead to inaccuracies and other problems. I would not invest much effort in solving the problem itself, and rather redesign your workflow to perform the calculations closer to the origin.

 

Still, if you insist on working way out there, you can try creating a Frame from three points using the constructor:

  

  

You can also try creating the Plane directly from three points:

  

  

Maybe you will find your luck with one of those approaches.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 6 of 8

dirk.neethling
Advocate
Advocate

I tried it using the basic Frame constructor and frame vectors generated off the normal:

                    XYZ z_vec = normal.Normalize();
                    XYZ x_vec = XYZ.BasisZ.CrossProduct(normal.Normalize());
                    x_vec = x_vec.Negate().Normalize();
                    XYZ y_vec = x_vec.CrossProduct(z_vec);
                    y_vec = y_vec.Negate().Normalize();

                    Frame frame = new Frame(origin, x_vec, y_vec, z_vec);
                    oPlane2 = Plane.Create(frame);

The resulting Plane is the same as the one I generated using:

oPlane1 = Plane.CreateByNormalAndOrigin(normal.Normalize(), origin);

Debugger:

oPlane1	{Autodesk.Revit.DB.Plane}	Autodesk.Revit.DB.Plane
		IsValidObject	true	bool
Normal	{(-0.829784056, 0.558084599, 0.000000000)}	Autodesk.Revit.DB.XYZ
		OrientationMatchesParametricOrientation	true	bool
Origin	{(7711.387467192, 29634.504593175, 227.698162730)}	Autodesk.Revit.DB.XYZ
XVec	{(0.558084599, 0.829784056, 0.000000000)}	Autodesk.Revit.DB.XYZ
YVec	{(0.000000000, 0.000000000, -1.000000000)}	Autodesk.Revit.DB.XYZ
		
oPlane2	{Autodesk.Revit.DB.Plane}	Autodesk.Revit.DB.Plane
		IsValidObject	true	bool
Normal	{(-0.829784056, 0.558084599, 0.000000000)}	Autodesk.Revit.DB.XYZ
		OrientationMatchesParametricOrientation	true	bool
Origin	{(7711.387467192, 29634.504593175, 227.698162730)}	Autodesk.Revit.DB.XYZ
XVec	{(0.558084599, 0.829784056, 0.000000000)}	Autodesk.Revit.DB.XYZ
YVec	{(0.000000000, 0.000000000, -1.000000000)}	Autodesk.Revit.DB.XYZ		

 

This obviously makes no difference to the error.

The reason we need such large coordinates is that tunnels typically run over many km. Now we have to split the project into even more sub-projects.

In my app which worked under the 2017 API everything was fine. When was this distance limit change made to the API?

0 Likes
Message 7 of 8

hemmesMW2F3
Contributor
Contributor

I'm encountering this same limitation, and it's also in Plane.CreateByNormalAndOrigin(normal, origin).
In my case I tried to create this Plane to mirror an element on it at -10.7 km from the origin.
Should the documentation about this maximum be updated, as it seems to be around 10 km now instead of the alleged 16?

0 Likes
Message 8 of 8

dirk.neethling
Advocate
Advocate

Yes I agree that the distance is around 10km or around 6 miles. This is a major issue for modeling infrastructure projects which have large extremities, such as tunnels or even long bridges.

0 Likes