Automatically bake to a layer and coerce

The coerce* functions are not documented and that is intended.

They were written as internal helper methods (not written by me, if that helps, but I may have written them similarly, given time and circumstances) meant as a private implementation detail. It’s all just a long series of tests to see: “What did the user input? – in relationship with what the RhinoScriptSyntax function needs”. This is because Python is weakly typed, and does not carry any information about what variable is declared to be, as opposed to RhinoCommon, which being written in C#, is strongly typed. I am sure you know.

Then users discovered it and started using it. Rather than checking the internal functionality of the function, I guess it’s a legitimate option of a self-standing user to use anything available.

When we figured out that it was a legitimate need (as we didn’t know before), we started adding the Create* set of functions of RhinoScript, which deal with exactly the same idea: get some ungrouped or referenced data, and create some grouped data (such as Point3d, or Planes). I did add quite a few, and they are documented. If there is need for more, I or someone at McNeel can do that.

However, many users still use the old coerce* stuff, so we cannot take it away.

Now, this is the history… let’s focus on what you are trying to do. Can you please post a sample so that I or someone else can help you?