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

rotateExtrude doesn't produce solid objects when translating #310

Closed
isovector opened this issue Nov 22, 2020 · 3 comments · Fixed by #367
Closed

rotateExtrude doesn't produce solid objects when translating #310

isovector opened this issue Nov 22, 2020 · 3 comments · Fixed by #367

Comments

@isovector
Copy link
Contributor

When translating upwards during a rotateExtrude, like in the following example

main :: IO ()
main = writeSTL 0.5 "/tmp/inrads.stl" $
  rotateExtrude
    180
    Nothing
    (Left (0, 5))  -- go up 5 units
    (Left 0) $
      translate (10, 0) $ rectR 0 0 3

the resulting mesh is missing some of its exterior triangles. Here's the result, rotated to look at the bottom:

2020-11-22-113800_345x330_scrot

@isovector
Copy link
Contributor Author

isovector commented Nov 23, 2020

I saw something similar to this when I messed up my BB caluclations in #300. I suspect that's the case here. cf ca92130

@isovector
Copy link
Contributor Author

The fix here is to patch

https://github.com/colah/ImplicitCAD/blob/aea51dd6b61473d76e0ef4020660b63bbbcc30ca/Graphics/Implicit/ObjectUtil/GetBox3.hs#L115

to instead say:

        (V3 (-r) (-r) $ (y1 - abs yshift), V3 r r $ y2 + abs yshift)

2020-12-26-050222_427x263_scrot

@isovector
Copy link
Contributor Author

I learned today that the behavior of this function is completely different if you use Just 0 instead of Nothing for what I assumed (probably incorrectly) was the rounding parameter.

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 a pull request may close this issue.

1 participant