UnrollSrf/Squish Groups and Blocks, plus worksessions

Hello McNeel,

Unrolling/Squishing of grouped or blocked objects (surfaces with curves on them) is potentially really powerful, but both options are buggy.

Both commands automatically flatten the curves within them…GREAT!

UnrollSrf - nothing is blocked or grouped afterwards.

Squish - The flattened curves get grouped with the original group, not the newly formed, flattened part. The flattened surface is not grouped with anything. The blocked objects do not get re-blocked when squished.

It would be great if the resultant objects from both of these commands are blocked or grouped together, and not part of the original group.

Stretch Goal…The resultant groups and blocks are named same as the original group or block, but with a prefix or suffix.

God Mode…Each time a group or block is unrolled or squished it replaces the flattened group or block in all locations. Probably easier with blocks with replacing or editing the block.

And Squish should work with worksessions by creating the flattened pattern in the external file, not the original file, to let us keep the model separate from the cut-parts. UnrollSrf already does this.

Happy to help… :grin:

Hi Nick, my guess is grouping can be handled, probably much harder to impossible to block reliably or usefully since these need insertion points - if you have an example input and output blockage I’d be curious to see what it is.
The adding to the original group rather than making new ones seems like a bug to me, I’ll take a look.

RH-74190 Squish tuneup for grouped objects


Thanks for responding Pascal.

Unroll Blocks & Groups.3dm (215.8 KB)

Regarding the insertion points, for my purposes W0 would be fine.

Perhaps this is something I need to script. I’ve not scripted anything with blocks before though.

Hi Nick- here’s a cheap unroll-n-blocker to try

import rhinoscriptsyntax as rs

def test():
    id = rs.GetObject(preselect=True, select=True)
    if id:
        if rs.LastCommandResult() ==0:
            ids = rs.LastCreatedObjects()
            b = rs.AddBlock(ids, [0,0,0], None,  True)
            rs.InsertBlock(b, [0,0,0])


Thanks for the starter pascal.

There’s a weird behaviour with Unrollsrf and blocks. Preselect works as desired, curves within the block are unrolled with the surface. Post-select initially only highlights the surface, zoom highlights the curves, but then the curves don’t unroll. This doesn’t happen within the python code.

Bump for this part of the request.

Hi Nick -

On the list as RH-76958 Squish: Place output in the active model

1 Like

Thank you, Wim.

Squish with curves from a worksession partially works. The squished surface ends up in no-mans-land, but the squished curves are right where they need to be, in the active model.

A simple copy of the squished surface in no-mans-land resolves the problem.