Skip to content

[BUG] affine* missing from documentation. #1698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dan-p3rry opened this issue May 30, 2025 · 8 comments
Closed

[BUG] affine* missing from documentation. #1698

dan-p3rry opened this issue May 30, 2025 · 8 comments
Assignees

Comments

@dan-p3rry
Copy link

From rounding.scad, rounded_prism() example 12:

include <BOSL2/std.scad>
rounded_prism(path3d(pentagon(3)), apply(affine3d_skew_yz(0,-20),path3d(pentagon(3),3)),
              joint_top=0.5, joint_bot=0.5, joint_sides=0.5);

A search of the BOSL2 github area shows the function exists in affine.scad, but without documentation, it will be difficult to use.

I can get by with a xrot() command instead, just wanted to let you guys know ....

@adrianVmariano
Copy link
Collaborator

adrianVmariano commented May 30, 2025

Those are internal functions. You're not supposed to use them. Not sure why one ended up in an example.

@adrianVmariano
Copy link
Collaborator

Note that you cannot get the same result with xrot(). I have fixed the example to use skew()

@dan-p3rry
Copy link
Author

I figured it out, affine_skew_yz(0, angle) becomes skew(azy=angle). I would suggest adding a azy or azx example to the skew() documentation. I got there in a roundabout way....
Thanks!

@adrianVmariano
Copy link
Collaborator

You think the axy example is not enough? It's more clear what's happening when you stay in 2d.

@dan-p3rry
Copy link
Author

This example would have gotten me to my result a lot faster (but perspective makes it difficult to see all three skews in one view):

Image

include <BOSL2/std.scad>

xdistribute(spacing=15){
    skew(axy=15) square(10);
    skew(ayx=15) square(10);
    skew(azx=30) square(10);
}

@adrianVmariano
Copy link
Collaborator

That example is incomprehensible to me shown like that.

Right now your first two cases are already shown in the docs. I could add something like the third case, looking like:

Image

@dan-p3rry
Copy link
Author

Yes, that example will help a lot. azy and azx are unique in that they create a 3D shape from 2D shape, compared to axy/ayx.

@adrianVmariano
Copy link
Collaborator

Well, no, nothing creates a 3d shape from a 2d shape except extrusion. Your use of "square" is invalid with azx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants