Closed ephetic closed 1 year ago
Out of curiosity, what properties did you have in mind? Off the top of my head I can think of:
Honestly, I'd only thought of center, as it is another way I could have come at the centering (#14) for relative boolean geometry, but perhaps transform
and/or scale
would also be good. I'm thinking that if we have property access, it makes it easy to define subordinate parts relative to a parent geometry (e.g. some sort of ->shape relative_to(parent=parent)
helper based on being able to extract the parent properties).
Hey. Just a heads up that I am making some progress on this. Got a PR upstream to expose this stuff to the software and then once that is merged I can start to add the parameters.
Ive added the x.center
property in the code. One thing I want to do is setup a x ->shape center()
function. How would you use it? The options I see are
->shape center(x=true, y=true)
->shape center(no_z=true)
I think it makes sense to have an axis control but I don't have a good signature yet.
I'd think center(x=true, y=true, z=true)
where they all default to true.
On Thu, Mar 2, 2023, 3:53 PM Dominick @.***> wrote:
Ive added the x.center property in the code. One thing I want to do is setup a x ->shape center() function. How would you use it? The options I see are
->shape center(x=true, y=true) ->shape center(no_z=true)
I think it makes sense to have an axis control but I don't have a good signature yet.
— Reply to this email directly, view it on GitHub https://github.com/DSchroer/dslcad/issues/12#issuecomment-1452740961, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ43TF6RJOXO25B7WSWGFDW2EXGBANCNFSM6AAAAAAU4O6CU4 . You are receiving this because you authored the thread.Message ID: @.***>
Ive though of that but it really doesn't make much sense. Boolean arguments are inherently false by default. One thing I thought of was maybe having a shorthand for boolean arguments so you could do this:
center(x,y)
which is the same as :
center(x=true, y=true)
center(x=true, y=true, z=false)
Then having the unspecified value default to false still works and it would center x and y without z. However it makes center()
kind of useless.
I thought the default was whatever you set it as in the file.ds var.
On Thu, Mar 2, 2023, 5:12 PM Dominick @.***> wrote:
Ive though of that but it really doesn't make much sense. Boolean arguments are inherently false by default. One thing I thought of was maybe having a shorthand for boolean arguments so you could do this:
center(x,y)
which is the same as :
center(x=true, y=true)
Then having the unspecified value default to false still works and it would center x and y without z. However it makes center() kind of useless.
— Reply to this email directly, view it on GitHub https://github.com/DSchroer/dslcad/issues/12#issuecomment-1452793330, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ43TGCCUMRVQBSAJGSYIDW2FAQRANCNFSM6AAAAAAU4O6CU4 . You are receiving this because you authored the thread.Message ID: @.***>
Fair enough. Ive added:
- `center(shape=shape, x=[bool], y=[bool], z=[bool])` center a shape
The x,y,z
arguments default to true.
Should be available in pre-releases after 0.0.2.pre.4
Completed with https://github.com/DSchroer/dslcad/releases/tag/v0.0.2-pre.4
e.g.