Request: Could we get more options to attach metadata to the unroll class?

Hello,

I am currently dealing with the Unroller class. I wish there would be more options to attach metadata to the geometry when unrolling. For example, I have two lists of text dots I wish I could attach separately, because they refer to different properties. Let’s say I have two lists ([textdot0, textdot1, textdot2] and [textdot3, textdot4]). Right now, my option would be to send [textdot0, textdot1, textdot2, textdot3, textdot4] and splitting the list again after unrolling, but it gets randomized in the process, e.g. [textdot1, textdot4, textdot2, textdot3, textdot1], so merging the lists and splitting it again after output is not an option.

Another thing, why can’t I attach a simple string to the unroll class? For example, I tried to attach metadata through the User Dictionary but it is lost after transformation.

Maybe there is an option that I did not consider to achieve this?

Best
Paul

Hi @PaulPoinet,

The Unroller class is pretty 'rough` on geometry and, thus, difficult to make user data survive or even know what output component to move the input user data onto.

If TextDot user data would survive the unroll, would this be helpful?

– Dale

Hi @dale,

Thanks for the reply! Yes indeed it seems difficult to make user data survive. I have been trying for example to attach points that are not onto the brep to unroll and I noticed that those are dismissed.

TextDots survive the unroll already, but what would be helpful is that the order is kept (and I would also have the same request for curves and points if possible). Something even nicer would be to be able to attach nested lists instead of flatten arrays.

Best
Paul

Hi @PaulPoinet,

Just curious, are you familiar with Unroller.FollowingGeometryIndex? Here is an example:

https://github.com/mcneel/rhino-developer-samples/blob/6/rhinopython/SampleUnroller.py

– Dale

Hi @dale, thank you! Sounds like something very useful for my case. Sorry I missed that!

Rhino unroll method by default joins unrolled surfaces. Let say I have a cube and when I unroll I can get 6 separate surfaces or one one joined cross like geometry.

Does unrolled class has such a property to join surfaces as rhino command?

Use Unroller.ExplodeOutput.

– Dale

Well, sorry if we switch topic here.
I currently input brep strips composed exclusively of triangles. Even when I set the ExplodeOutput to false, the result is constantly exploded (see bottom). Any idea @dale what I am doing wrong here?

Hi @PaulPoinet,

I’m confused. Are you expecting Unroller to join surface that were not originally joined?

– Dale

Hi @dale,

I expect Unroller to unroll a joined polysurface (when setting ExplodeOutput to false) that was originally joined. My screenshot above shows each Open Brep unrolled as series of Trimmed Surfaces. Maybe this is expected behaviour?

Best
Paul

Hi @PaulPoinet,

An open Brep can very weill also report as a trimmed surface if the Brep contains a single, trimmed face. You mentioned that you had a bunch of triangular, which is as I describe above.

– Dale

Hi @dale, in my case each open brep is composed of multiple faces and the outputs are lists of singular triangular faces. In the previous screenshot I attached, I set ExplodeOutput to false. I would expect to have the faces joined as a result. Does that make sense?

Just a side note: you could use the mesh strip unroller from Kangaroo instead of the Brep unroller for this, might simplify things a bit (for the butttooth I think I wrote my own that does the same thing, but I recently used the Kangaroo one at BIG and that worked great).

I actually tried the Kangaroo’s strip unroller, but it does not work in some cases, and I can’t figure out why (I welded, cleaned my strips etc., no luck). That’s the message error I get most of the time: 1. Solution exception:Sequence contains no elements… Also, in order to keep metadata I ended up using the Rhinocommon’s class.

I imagined that you would have :slight_smile: That’s odd it didn’t work though, perhaps something for @DanielPiker to have a look at. But yeah, the Brep unroller is great too. Been using it as well lately for unfolding developable solids into the plane.

1 Like

I think the reason the Kangaroo unroller won’t work here is that some of the strips have corners where one face is adjacent to 3 other faces. When I wrote it I was just thinking of simple strips where each face has a maximum of 2 connected faces. It would be possible to change this for a future release though. Doesn’t Ivy also do more complex mesh unrolling?

1 Like

Ahhh, doh, didn’t notice those faces. Yes I believe Ivy would handle those cases as well. Really need to update/clean up all my GH plugins.

Hi @DanielPiker,
Thank you for the precisions! Indeed, this is what I suspected. Simpler strip unroll without problem. I will try to mesh them better to minimize the adjacency, otherwise I will have a look at Ivy.

Hi @DanielPiker, actually, I did try to unroll them from quads only. In that case the adjacency is 2 max for all faces. But I get the same error. Is it because there is a triangulation happening in the background which produces the same cases you highlighted above?

Exactly - it triangulates quads before unrolling as a way of making sure all faces are planar.

If your quads have a max of 2 adjacent faces you could triangulate them first, and it should be possible to choose the triangulation for the corner quads so that the resulting triangles also have a max of 2 adjacent faces.