Geometry Scaling with large coordinate values

Hi!

I have a dilemma. Our Coordinate System in Sweden has coordinates with digits that exceed 1 million, so to use the original coordinates I have to put on the Extra Large Geometry Scaling. But my scripts purpose also require a detail level of millimeters.

Is there a way to both be able to have my objects in their original world position (>1 000 000) and use the detail of millimeters. Since the effectiveness of the script kind of gets lost if I need to do a Manual Offset of my model before running the script thus cutting of the dynamic that I’m looking for.

Grateful for answers.

Simon

Hi Simon,

I will say to NEVER change the Geometry Scaling to Extra Large as you will lose data and accuracy because of this. Just ignore the scaling warnings and run your graphs in medium. This is a well known issue and everything shall work fine in Dynamo if you run it in medium, albeit you’ll have warnings.

If you find these warnings annoying, you can use the function apply node to hide the warnings

In addition to what @david_licona said, you can also shift your data closer to the origin in Dynamo, do whatever operations you need, and then shift it back at the end before final output. I’ve found that some operations with solids require this approach to work properly even if the geometry scaling is left alone at Medium.

Another thing that this does is make it a little easier to navigate - you may have noticed that the 3D preview gets jumpy and really annoying to deal with when the data is so far away from the origin.

3 Likes

I recommend going another direction with this, as ignoring the warning will prevent you from being able to see the results before you commit them to your application of choice and with the insanity which is element binding in the Civil 3D environment that is a bad position to be in. You will also see geometry errors by ignoring stuff. It’s fine for some base automation but geometry work at scale, not so much.

Instead I recommend shifting your geometry from ‘way out there’ to near the origin. One way to do this is to find the minimum point on the overall geometry’s bounding box, build a vector from there to the origin, and move everything by that distance. Then do your geometry efforts at medium so you can see what is happening. When done move the ‘new’ geometry data back into place by reversing the vector.

Alternatively you can work in a temp file with the data xrefed in and placed at the origin, and then pull the data into that file, do the dynamo thing at the origin in the temp file, then xref the temp into the new at the original CS location.

2 Likes

Great recommendations !

Personally, I’ve never experienced a situation when there was a need to go through this and just ignoring the warnings worked for me. I’ll keep in mind your workaround for when the time comes !

1 Like

Thanks everyone for your suggestions!

I’ve tried to run it in Medium mode with original positions and unfortunately the script just freezes and goes non responsive, causing both Dynamo and C3D to crash.

The script I’m working on is a script for automating Guard Rail Creation in 3D based on blocks from an external dwg, and taking the position x,y from and alignment and the z-value from a surface. So I guess I have to try moving both those components in Dynamo before creating the blocks for the Posts and sweeping the Guard Rail.

The purpose is so that colleagues are going to be able to run the script from Dynamo Player so I rather not do any workflow that involves manually moving or temp files.

I did not try the “Function Apply” Node shown above though.

The node is only to eliminate the warnings so as when you run it from the Player there are no warnings show for the final users (warning can make you lose confidence on the result).

If the script isn’t running on medium then the function apply will not make it work. Yes, @Jacob_Small’s solution shall be your path to follow.

Finally, I’ve found that sometimes breaking down 1 script into different graphs helps performance. Think of it as modularizing it. Users will need to launch more scripts but their experience shall be improved overall

1 Like

Just to clarify: DO NOT MOVE the Civil 3D elements, move their geometry representation in Dynamo and cope with the warnings / use the Function.Apply

6 Likes

I’ve found that sweeping operations are very taxing. Are you trying to create a single solid? If so, try breaking up the sweeping path into multiple smaller segments and creating several solids instead of one. You can always union them together at the end if you need.

1 Like