Closed kaosat-dev closed 2 years ago
Agreed. The current API is totally confusing to anyone new.
I think you will find more as you start to create a new standard.
FYI, I'm not sure what is the "correct" API but this inconsistency has to be corrected.
I prefer an API that doesn't require an order to the arguments, which is why I prefer the CSG style of passing aguments as a attribute of an anonymous object. But I'll try to be flexible....
There are a few bad things, but still not quite as horrible as I feared (except for a few function where there are so many ways to specify params it is just frightening).
what do you mean by
CSG style of passing aguments as a attribute of an anonymous object
do you mean passing options like this ?
{length: 10, round: true}
Correct. By the way, I believe both CSG and SCAPAPI are inconsistent in the use of aguements, so the new API will be far better.
I really like object options like the above as well so we are good :) Yeah the api can only get better !
V2 modeling passes options via anonymous objects.
These changes will not be supported as part of the SCAD compatibility layer.
Currently
linear
&rotate
extrude take params first, 2d shapes second, whilerectangular_extrude
takes paramssecond
! This is very confusing and incoherent , and needs to be changed (yes, BREAKING CHANGE !) We want good, coherent and not confusing APIs, right @z3dev ;) ?