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

Helix tool almost always results in invalid mesh #550

Closed
andres-erbsen opened this issue Feb 9, 2020 · 7 comments · Fixed by #643
Closed

Helix tool almost always results in invalid mesh #550

andres-erbsen opened this issue Feb 9, 2020 · 7 comments · Fixed by #643

Comments

@andres-erbsen
Copy link

andres-erbsen commented Feb 9, 2020

System information

dcc80de on Arch Linux

Expected behavior

A manifold mesh representing the helical extrusion, for example

c

Actual behavior

If I increase the angle just a bit I get a self-intersecting mesh:

d

and increasing the angle just slightly more gives naked edges instead:

b

Additional information

Note that the issues are present even with "force NURBS surfaces to triangle mesh".

This example (unit square at unit distance from axis): helix.zip
Non-trivial example (8x rotated 2 beziers approximating involute that is almost a triangle): gear90.zip
This also occurs when applying helix to a circle.

#472 seems relevant.

@whitequark whitequark added the bug label Feb 9, 2020
@phkahler
Copy link
Member

phkahler commented Feb 9, 2020

The problems with helix.zip seem to be solved by #473 which is very helpful for extrusions with a lot of twist. No naked edges.

Basic rendering with gear.zip is also better with those changes. There are fewer errors when using Analyze -> show naked edges but there are still a lot of them with that model. I'm not sure what causes them in that case - lowering the chord tolerance causes more of them.

@phkahler phkahler added the mesh label Mar 30, 2020
@mkyral
Copy link

mkyral commented May 21, 2020

Hi,
I've played with Helix (really useful tool) in and I've generated this problematic shape: rounded_edges_issue.zip

obrazek
obrazek
obrazek

@phkahler
Copy link
Member

@mkyral You can fix the naked edges problem (sort of, I hate the need to do this) by clicking on g005-helix in the text window. Then check the box for "force NURBS surfaces to triangle mesh. SolveSpace has some NURBS issues, but NURBS are preferable to meshes so long as those issues don't show up. I tried a reconstructing the curve sketch differently but ran into the same issue.

A suggestion about the design. If you're not going to slide the opening to the side, use a reVolve instead of a Helix. It doesn't solve the issue here, but SolveSpace then recognizes the flat surfaces on the sides as flat (you can select them and constrain things to them). Also go to home->configuration->chord tolerance and lower that value to 0.1 it will look a little better on-screen (lowering that too much will degrade performance).

@mkyral
Copy link

mkyral commented May 22, 2020

Hi,
Thanks for your suggestions. ReVolve works better in this case.

@phkahler
Copy link
Member

phkahler commented Jul 3, 2020

While experimenting with variations on grid triangulation I noticed that changes to the interior grid can affect the number of naked edges on that gear90 model. This has me thinking it's an issue with ear triangulation on a helix, since the grid has no effect on outer edges.

Speculations: maybe a problem with very narrow triangles, or near colinear segments.

@phkahler
Copy link
Member

phkahler commented Jul 8, 2020

@andres-erbsen The rest of this is fixed in PR #643 The gear90 model will have no naked edges if chord tolerance is set to either 0.5 or 0.2. They do reappear when its set to 0.1 though so it's not the ultimate fix, just a good improvement.

I am curious why you made the gear teeth with that type of curve. Would an arc be OK? How about one cubic bezier for each side of the tooth? Those would create more uniform curve segments which may help. I'm not a gear expert so I don't know what's more accurate.

@andres-erbsen
Copy link
Author

Thanks!

I'm no expert either; I think I was following this tutorial for the bezier approximation of the common involute gear profile. I tried the same with a single cubic bezier just now and I was able to get it within fabrication tolerance of what I want in this example. The linked construction is neat, though, because it doesn't require eyeballing the locations of the control points (but doing this construction with just two control points gives a straight line).

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

Successfully merging a pull request may close this issue.

4 participants