Dynamo question - Create, move and rotate solids

Hi all,

I have a question about the dynamo script I am trying to create.

The goal of the script is to make solids of surfaces and pipenetworks, move them and then rotate them (I might add corridors in the future as well). I use the Civil3DToolkit and Arkance packages.

I got this to work for pipe networks, but trying the same thing for surfaces won’t work: it results in a warning as shown below.

I thought it might be the geometry scaling, so I set that to the maximum, but this did not make a difference. I think the type of solid created from the surfaces is different from the one created from a pipenetwork. See below:

Does anyone know if this is indeed the case, or if there is something else. And if so, how can I solve this error?
A different approach is also welcome.

As a new forum user, I can’t attach the script. So if you need to see it, tell me how to share it please.

Thanks in advance.

Jochem

Hi @jochemZMHQ7 ,

What exactly is the input for your Geometry.Translate node?

It would be easier to follow what is going on in your script if you take a screenshot with the camera tool in the top-right corner, just make sure you’re zoomed in before taking a screenshot otherwise the node names aren’t visible.

Yes that is correct, basically you have 2 different workspaces, the Civil3D workspace and the Dynamo workspace. The node Geometry.Translate only works within the Dynamo workspace and is not meant to be used to move Civil3D geometry. But like I mentioned above its hard to say since I don’t know what the input is on the Geometry.Translate node.

You can use, for example, Object.Transform, to move Civil3D objects to a new coordinatesystem.

Hi Daan,

Thank you for replying to my question.
I took a screenshot in dynamo of the input for the geometry.translate node. The direction input is based on a vector between to points.

That makes sence. Could you give an example on how to use the object.transform node? I can’t find any examples online or in the dynamo dictionary.

After moving it, I would like to rotate it as well. Which node would you use for that?

Thanks!

Hi @jochemZMHQ7 ,

What you could do is apply these transformations to your Dynamo geometry first, e.g. your surface, and then only afterwards creating a tinsurface from it

1 Like

Hi Daan,

That doesn’t seem to work unfortunately. Same error message.
But I don’t think the selected surface is dynamo gyometry. Do I need to select it in a different way?

Hi
I had a project at my company where a Water & Sewage designer wanted a graph for move and rotate a group of Solids, Block References and a 3D Polyline so I did like this using the move command in Civil 3D. Not that optimal but it seems to work for the user :slight_smile:

The boring part is that I must run to rotate3D command in another graph and it can’t be run in a sequence in the same graph.

Hola amigo @jochemZMHQ7 buenas. most of the nodes like Geometry.Translate only work in dynamo enviroment, if your goal is create objects in your file or modify his properties like rotation or position you have to use node that allows you to create or modify his position, rotation, scale etc, create blocks made of solids with dynamique properties is an other and efficient option i advice you to do this. but an easy and fast way is create dynamo geometry and put it directly into C3D file, i let you an example, by the way Geometry.translate and Geometry.transform are for move objects, and Geometry.rotate is for rotate objects.


in the case of pipes network is a diferent history there are a library nodes in Civil3DToolkit, go and take a look

Hi all,

Thank you for the suggestions and examples, they help a lot.

I did however find my own solution. First I create a solid from the surface, as I did before.
Then I use the object.geometry node to create dynamo geometry and use this as input for the geometry.translate en geometry.rotate nodes. After moving and rotating I use the object.bygeometry node to create a solid from the geometry.

The one downside of this approach is that the solid created directly from the surface will still be in the drawing, without being moved or ratated. So therefor I inserted the object.delete node, to erase the first created solid immediatly.

Probably not the most optimal approach, but hè it works :sweat_smile:

Amigo @jochemZMHQ7 buenas. yeha is not ideal workflow remove and recreate instances but if it works cool!! idealy we should be able to access a get and set of the rotation property, but I’m not sure how to access and/or edit the value of this property most objects have it at least blocks and solids, maybe someone else can enlighten us on how to achieve this!! the alternative as i’ve mentioned before is to use dynamique blocks, this way you can change parameters values of dynamique properties, however C3D became to have performance issues when you use dynamique properties in blocks, not sure why but it is like that mostly stretch actions, perhaps is good idea consider to migrate to revit, revit is full parametric have not this issues, hope this helps you see you next time!!