1- Dimensional array vs list


how to fix this?


BooleanUnion result might be a list of breps.
BooleanUnion will return always an array, even if the results is just one brep.

So, either get the first result with “[0]” like:
MergedBrep = Brep.Union(xxx , yyy)[0]
(but this means you expect to always have at least a result and to lose any other past the first…)

or to dim MergeBrep as an array, and later use:
New_dt.AddRange( etc etc )