Layout Space, how does it work? And for the future, a custom space?

I’m thinking about how Rhino has the model space and layout space. All layers exist in both, but SelAll/Hide/Show in the model space doesn’t affect the states of objects in layer space, vice versa.
It could be really handy to have a similarly sectioned ‘CAM’ space, ‘Make2d’ space, or a ‘Rendering’ space. Maybe with some way to have objects parametrically copy into a specific space via grasshopper. I’m imagining a workflow like laying out Breps from a cabinet construction, linking the parts in from the model space to the CAM space, where they are laid flat as opposed to assembled. Breps representing the CNC stock, or special drive curves, etc are in the CAM space. There could be individual CAM spaces for each sheet to cut, etc.

A grasshopper script could handle the insertion of model objects into a custom space.

The real reason I’m thinking this would be helpful is when you want to do “Local” hide/show operations within a subset of objects, without bringing everything else back in.
You can achive some of the functionality I’m describing by using layouts, blocks, but not quite all.
Would this be possible as a future addition? Or possible to do via scripting in rhinocommon?
Just some thoughts,
T

2 Likes

i like the idea of addressing some limitations with additional spaces…

instead of spaces - nested layers together with LayerStateManager offer great possibilities.

@Tom_P Thanks for linking a relevant topic. I think what I’m most interested in is a parametric relationship between the two.

As a simple test I tried having my spaces in two different files:
With file #1 open and a grasshopper script to lay the breps flat on their largest faces, I used a python script to open file #2 and write in the laid out breps.

import Rhino
f = Rhino.FileIO.File3dm.Read(filepath)
f.Objects.Clear()
for object in f.Objects:
    print(object)

for geom in geoms:
    f.Objects.AddBrep(geom)
f.Write(filepath, 0)

With file #2 open separately, the breps did not change when I changed their dimensions in file #1. I’m guessing this is by design, but if the breps did update, this would be close to what I’m imagining.
However, ideally it would all be in a single file.

For a second attempt I’m wondering if I could use the grasshopper content cache to push copies of transformed objects onto a set of nested layers (copies of the model layers) and then switch into the new ‘space’ with LayerStateManager as you recommended. Will update.

Cheers,
T