Skip to content
This repository has been archived by the owner on Aug 14, 2022. It is now read-only.

Incoherent API between rectangular_extrude and other extrusions #34

Closed
kaosat-dev opened this issue Nov 26, 2017 · 5 comments
Closed

Incoherent API between rectangular_extrude and other extrusions #34

kaosat-dev opened this issue Nov 26, 2017 · 5 comments

Comments

@kaosat-dev
Copy link
Contributor

Currently linear & rotate extrude take params first, 2d shapes second, whilerectangular_extrude takes params second !
This is very confusing and incoherent , and needs to be changed (yes, BREAKING CHANGE !)
We want good, coherent and not confusing APIs, right @z3dev ;) ?

@z3dev
Copy link
Member

z3dev commented Nov 26, 2017

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....

@kaosat-dev
Copy link
Contributor Author

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}

@z3dev
Copy link
Member

z3dev commented Nov 26, 2017

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.

@kaosat-dev
Copy link
Contributor Author

I really like object options like the above as well so we are good :)
Yeah the api can only get better !

@z3dev
Copy link
Member

z3dev commented Jul 24, 2022

V2 modeling passes options via anonymous objects.

These changes will not be supported as part of the SCAD compatibility layer.

@z3dev z3dev closed this as completed Jul 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants