Hi, thanks for having a look!
Not on my Moi-machine atm but I can try to explain what I mean:
I am evaluating how viable it is to use the node editor to build a design that is made from several parts.
I am thinking about such a structure:
my_assembly // root level outside of any macros
--part1(part1_origin, part1_normal, ....)
----s1 = sketch(origin1, normal1, heavily_shape_affecting_parameter1, width1,height1,...)
----s2 = sketch(origin2, normal2, heavily_shape_affecting_parameter2, width2, height2,...)
----loft(s1, s2)
----...
--part2(part2_origin, part2_normal)
----....
part1, part2 and sketch would be macros. part1 and part2 are mainly components to make the (root) assembly level easier to understand (instead of having all nodes at the root level).
And in the case of sketch I am actually using several differently parameterized instances of the same macro that are then lofted to form the part.
In all these cases I don't want to hardcode the later position into the nodes but try to formulate the positions as easy as possible (relative to the xy plane) - and then provide a "workplane" as input that is based on an origin and a normal - and the macro is transforming itself accordingly.
Now the root of my question is: Would I have to define the inputs for the workplane with primitive float types as origin_x, origin_y, origin_z, normal_x, normal_y, normal_z.
Or is it possible to accept an object as a macroin. So I just have origin, normal - and then some node that is decomposing these inputs into the x,y,z elements inside the macro.
There are several native nodes that accept Point or Vector inputs. Not sure whether I can do the same with my own macros though. (On first try I cannot connect a macroin socket with the input socket of a node that expects a Point).
Not sure yet how efficient it is to do this in the node editor. Textual scripts probably are faster written and offer more structuring possibilities. But trying it with the node editor is an interesting challenge :)
The reason why I do this with "code cad" (scripting or nodes) is that the sketches are highly parametric - the shape can substantially change depending on some of it's parameters. And I know that I will need several versions of the design with different parameters - and there are several uncertainties that I have to evaluate with prototypes. So my (perhaps naive) assumption is that this should best be highly parametric and essentially best be generated by a program.
I have made a first prototype with an open source, Python, OCCT based code cad. This works generally well, but there are some holes in the exported STEP model. I haven't found a way around these yet (other than importing the STEP into a program like MoI and manually fixing them - which has to be redone at each iteration...) So wanted to try out another program that isn't based on OCCT to see whether that helps (or whether it's just me making the same or different mistakes in any program I get my hands on :) )