What's the "syntax" to create a 3d-face?

Hello,

This would be an example for creating a Cogo-Point using the CogoPoint.ByGeometry-node.

My goal is to create a 3d-face (many, in fact) using the Face.ByGeometry-node.
Unfortunately I’m unable to find the correct syntax to create the correct input for this node.

Let’s assume I have four points (X,Y,Z) and also the correct indices to connect them, how do I have to type this to create a valid input?

Is there any documentation for cases like this?

Any input is highly appreciated! :slight_smile:

Hi @pumpaij,

The necessary geometry type here is an Autodesk.DesignScript.Geometry.Face. You can’t create a face directly, but rather get the face geometry from some other type of topology. Here’s an example using a surface:

Look under the Geometry → Topology and Geometry → Face shelves. More info here.

1 Like

Thank you for your quick reply! :slight_smile:
So there isn’t really a “direct” way to input a face and I’d have to do something like this?

Is there a way to convert geometry of the Mesh-Toolkit back to something that can be drawn in Modelspace?

And if I had a .txt-file that would look something like this:

[[(0,0,0),(0,1,1),(1,0,2),(1,1,3)],[0,1,3,2]]
[[(X1,Y1,Z1),(X2,Y2,Z2),(X3,Y3,Z3),(X4,Y4,Z4)],[index1,index2,index3,index4]]
[…]

Would there be a way using Python to convert them into faces directly?

No, I don’t believe so.

How about just using Surface.ByPerimeterPoints instead of creating all of the curves and patching them? You could sort the points by indices using List.SortByKey to get them in the correct order.

1 Like

I believe that the Springs package has a TKMeshToMesh node for converting to a Dynamo native object.

I forgot to thank you for your answers.
While both work, I ended up using Camber (thanks again for this package! :)) and its “SendCommand”-node because that way seemed more “native” to me and I had my script already set up to produce all the points I wanted.
So e.g. “(command “_3dFace” “0,0,0” “@5,5,5” “@10,1,10” “” “”)”

1 Like

The Arkance Systems Node Library has now nodes to create and read 3D Faces.

1 Like

Great stuff! Thank you for making it available!
Am I correct in assuming that you mean the “Triangle.ConvertToFace”-Node? If so, it only takes triangles as an input, right? No way for 3d-face-rectangles?

Yes. The Triangle is a virtual object and you can create them from 3D Faces, a Mesh, a Tin Surface or just by three points. The Triangles can be converted to 3D Faces, not rectangles.

I can add the latter to the wish list.