design-automation / mobius-parametric-modeller

Möbius for parametric modelling.
https://design-automation.github.io/mobius-parametric-modeller/
MIT License
10 stars 6 forks source link

ray and plane as dicts #617

Open phtj opened 5 years ago

phtj commented 5 years ago

change ray and plane to use dicts this will make it easier to detect arg types

plane is currently [origin, x_axis, y_axis] as a list of three lists, e.g. [[1, 2, 3], [1, 0, 0], [0, 0, 1]] but there is no way of knowing if this is a plane, or just a list of three vectors

as dicts it would be plane = {"origin": [1, 2, 3],"x_axis": [1, 0, 0],"y_axis": [0, 0, 1]}

we could add a z axis, which is useful plane = {"origin": [1, 2, 3], "x_axis": [1, 0, 0], "y_axis": [0, 0, 1], "z_axis": [0, 1, 0]}

same applies to rays ray= {"origin": [1, 2, 3], "dir": [1, 0, 0] }

same applies to bounding boxes ray= {"origin": [1, 2, 3], "min": [-1, 2, 3], "max": [4, 5, 6], "size": [4, 4, 5] }