FunctionalOpenSCAD icon indicating copy to clipboard operation
FunctionalOpenSCAD copied to clipboard

Polygon Tesselator to Support Subdivision

Open NateTG opened this issue 7 years ago • 10 comments

This is an inefficient method - order N^2 - but should work and large complex faces aren't going to come up often in this kind of application.

triangulate.scad.txt

NateTG avatar Jan 30 '18 03:01 NateTG

Thanks @NateTG, I appreciate the contribution, but could you submit this in the form of a github pull request?

It makes it easier to code review and merge, and you'll also have commits with your name on them, so you get credit for it in the end.

If you have any difficulty or questions about doing a PR, just let me know.

thehans avatar Jan 30 '18 17:01 thehans

I've created a pull request, so this should be done.

NateTG avatar Jan 30 '18 17:01 NateTG

I typically wouldn't close an issue until the relevant code is merged. Its nice to keep this space open for general discussion until then.

thehans avatar Jan 30 '18 19:01 thehans

I'm not sure how to cleanly split the rounded cube and subdivision pulls.

NateTG avatar Jan 30 '18 22:01 NateTG

rounded cube needs to be commited to its own branch in order to keep it separate from your master (the default branch), it looks like no separate branch has been made for rounded cube (or you may have made one locally but didn't push that specific branch to github?)

After you create a branch, you have to git checkout branchname to switch your active local branch to the new one. Then you can commit to that branch, and that will be completely separate from your master branch that triangulation was already commited to. You can later git checkout master or switch to whatever other branch when you are done working with that one.

If its easier, you can just hold off on creating the rounded cube PR until I've closed out the triangulation one. If you make the requested changes on triangulation, then I'll go ahead and merge it in and close that PR. Then we can handle rounded cube separately afterward.

thehans avatar Jan 30 '18 23:01 thehans

It took me years to get used to git / github workflow so I totally understand your confusion.

thehans avatar Jan 30 '18 23:01 thehans

I think I do not have permissions to edit your PR, if you are willing to allow that then I could make some of the changes myself before merging: https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/

thehans avatar Jan 31 '18 16:01 thehans

The pull request I just looked at show allow changes from maintainers as checked.

https://github.com/thehans/FunctionalOpenSCAD/pull/4

Am I looking at the wrong one?

NateTG avatar Jan 31 '18 16:01 NateTG

OK, my mistake then. Its not clear from my perspective in github interface whether you have enabled that, and I assumed it was unchecked by default. Thanks for confirming.

I'll try pushing some changes later. Got some other obligations at the moment.

thehans avatar Jan 31 '18 17:01 thehans

So... I kind of went crazy with triangulation.

https://gist.github.com/NateTG/b350378c56f436d3996a2107f7cba965

NateTG avatar Mar 19 '18 02:03 NateTG