Skip to content
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

Fix solution ttt-ppp0101.py #626

Merged
merged 2 commits into from
May 19, 2024
Merged

Fix solution ttt-ppp0101.py #626

merged 2 commits into from
May 19, 2024

Conversation

ABoss
Copy link
Contributor

@ABoss ABoss commented May 16, 2024

Now generates correct model and calculates correct mass. (note that Trapezoid requires it's width input field to be calculated using angles because it's not given)

Now generates correct model and calculates correct mass.
(note that trapezoid requires it's width input field to be calculated using angles because it's not given)
@gumyr
Copy link
Owner

gumyr commented May 16, 2024

Thanks for pointing this out, there was a change in how Trapezoid works in that now the width is the overall width not the width of the "base" line which results in the problem.

Although your solution is correct, I try to avoid having the user do trig - how is this instead?

        with BuildLine() as bl:
            l1 = Line((0, 0), (18 / 2, 0))
            l2 = PolarLine(l1 @ 1, 8, 60, length_mode=LengthMode.VERTICAL)
            l3 = Line(l2 @ 1, (0, 8))
            mirror(about=Plane.YZ)
        make_face()

i.e. creating a trapezoid from lines - note that no trig is required here.

@gumyr
Copy link
Owner

gumyr commented May 16, 2024

Maybe there should be an option in the Trapezoid object to select either the maximum or minimum length (this could be fairly complex as the left and right angles could be different)?

@ABoss
Copy link
Contributor Author

ABoss commented May 16, 2024

Ah, much better solution!

Maybe there should be an option in the Trapezoid object to select either the maximum or minimum length (this could be fairly complex as the left and right angles could be different)?

Maybe, it would make working with Trapezoid easier (although maybe doing everything with lines is actually easier)

@gumyr gumyr merged commit 70ca2a3 into gumyr:dev May 19, 2024
10 of 11 checks passed
@gumyr
Copy link
Owner

gumyr commented May 19, 2024

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants