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

Duplicate Vertices in VNFs not allowed with Manifold #1430

Open
adrianVmariano opened this issue May 14, 2024 · 3 comments
Open

Duplicate Vertices in VNFs not allowed with Manifold #1430

adrianVmariano opened this issue May 14, 2024 · 3 comments

Comments

@adrianVmariano
Copy link
Collaborator

From openscad/openscad#5134

"What changed in OpenSCAD lately is that we moved away from using "polygon soups" as an internal format, and we now use indexed polygon meshes. Each topological vertex must be specified at one unique index. If you specify the same vertex position twice, it's treated as two separate vertices, and you must hence construct a mesh to account for that."

This seems like it will affect a lot of the nontrivial closed VNF constructions in BOSL2. It's not clear how we can address this without a massive slowdown from constantly running vnf_merge_points().

Like have VNFs also carry an edge list to reduce the number of vertices that need to be checked when joining VNFs?

@adrianVmariano
Copy link
Collaborator Author

It looks like duplicate vertices will still work, but it's a warning, so if you're using "stop on first warning" it will be a fatal error.

@adrianVmariano
Copy link
Collaborator Author

New issue openscad/openscad#5135 on the idea of making it not a warning when they correct for duplicate vertices.

@adrianVmariano
Copy link
Collaborator Author

Latest word on this is that they've changed it so that perfectly identical vertices are merged without a warning. Almost identical vertices are merged with a warning.

And they noted this:

Be aware that there is a subset of manifold objects not representable after merging vertices, things like:

  • Two cubes touching each other
  • Donut with a zero radius hole
  • ..or any self-touching objects.

So this means for example that a path_sweep without twist is probably OK because the first and last transformation are probably equal. But if there is twist, round-off error is probably introduced and the points won't be exact, so you'll get the warning. If you join beziers patches that mathematically share a boundary it seems likely that they might not be exactly equal on the boundary.

I wonder if we could make a faster merging method by merging when VNFs are joined and explicitly searching each VNF in the join list for its boundary and then looking for duplicates just in those boundaries.

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

1 participant