Controlling twisted box orientation — For lattice generation

Hi grasshopper masters,

My main goal here is to generate a set of controlled, oriented twisted boxes from two cylindrical meshes (same topology, same face counts) for later use in generating a lattice structure. The reason I need to control the orientation of the twisted box is to avoid unconnected lattice curves.

For example, the auxetic cell type from Crystallon: if the orientation of the twisted box is not controlled, it results in disconnected lattice struts, which would cause 3d printing & structural issue.

In the sample file below, I have 2 sets of meshes to apply orientation of the twisted box, you can spot there are irregular twisted boxes which leads to a disconnected lattice (generated with dendro - curve to volume).

Also, you would notice that the left-hand pair of meshes is not a simple mesh offset with a fixed distance; the vertices of the inner mesh are slightly differently displaced. The reason is that the lattice is cladding a geometry that looks different from the A-surface of the lattice.

The irregular twisted box appears quite randomly, and I am struggling to solve this issue.

Below is the GH script I used to control the orientation of the twisted box, by referencing this post, and the issue persists.

Any suggestions or tips would be highly appreciated.

Thank you very much.

Twisted box orientation.gh (81.2 KB)

Twisted box orientation.3dm (299.9 KB)

You were pretty close, sometimes the solution is a bit obscure. You typically want to reduce duplicate operations when trying to coordinate data. Offsetting the mesh then trying to derive the and coordinate the points for the twisted box was causing problems.

ch_twisted_box_01.gh (73.2 KB)

Thank you very much for your help Cole! It is really helpful!

@Cole_Howell how about orienting the cell along with the direction of the geometries like below? I would imagine we can construct sets of vectors that are perpendicular to the axis of the geometries, so that the cell can flow along the axis while being noticed to face away from the mid axis (red)?

From here you can see there are irregular twisted box that would mess up the lattice cell orientation.

Any suggestions or tips would be super helpful!

Twisted box orientation 2.gh (122.4 KB)

Twisted Box Orientation 2.3dm (538.0 KB)

Instead of aligning with unit-z, you will want to align the planes with the direction of the nearest point on the guiding curve (unit-z was good enough for the first case). Simply sample the mesh face centers, find their nearest points on the guiding curve, and use the resulting tangents for alignment.

ch_twisted_box_02.gh (84.0 KB)

Same as last time, if the meshes are being generated by some curve, its best to pass that info down instead of querying the curve a second time, as this script can break if the turn is too sharp for the thickness of the form.

Please let me know if there’s anything else I can help with and mark this as solved if no more assistance is needed.

Thank you Cole!