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

Rename clipMeshVertices to cutMeshByBox ? #26

Open
oqilipo opened this issue Aug 8, 2017 · 8 comments
Open

Rename clipMeshVertices to cutMeshByBox ? #26

oqilipo opened this issue Aug 8, 2017 · 8 comments

Comments

@oqilipo
Copy link
Contributor

oqilipo commented Aug 8, 2017

Hi David

clipMeshVertices might be renamed to cutMeshByBox or cutMeshBox?

Kind regards

@dlegland
Copy link
Member

dlegland commented Aug 9, 2017

Hi,

hmm, I usually find that the term "clip" implicitely refers to "clipping by box". And I am not sure the term "cut" is very common in geometric computing?
Also, this function in particular does not clip the entire mesh but only clips the vertices and the faces located within the box.

The best would be to have a "clipMesh" function, that also creates new faces, edges and vertices when faces intersect the box boundary. It's on the TODO list, for a while...

@oqilipo
Copy link
Contributor Author

oqilipo commented Aug 9, 2017

Yes, for me it wasn't so much about the term cut or clip.

But I think it would be useful to add "Box" or "ByBox" at the end, because you can clip a mesh with everything: box, sphere, plane, tetrahedron,...

So for me clip does not "implicitely refers to "clipping by box". ;-)

Kind regards

@dlegland
Copy link
Member

dlegland commented Aug 9, 2017

Well, clipping by a sphere or a tetrahedron is not as common as clipping by a rectangular box, no?
But it is ok for me to add "byBox" at the end of clipMeshVertices.

NB: I sometimes used "byPlane" suffix for some functions, as clipping by a box can be computed as six clipping by planes.

@oqilipo
Copy link
Contributor Author

oqilipo commented Aug 9, 2017

Maybe the easiest way is to keep the name clipMeshVertices and, if necessary, add an additional input parameter like 'shape', to select the 'box', 'sphere', etc ...

For me it wasn't clear that clipping refers usually to a box. ;-)

@dlegland
Copy link
Member

Hi,
yes, this sounds fine to me. One way of doing would be

  • we keep clipMeshVertices but add an optional param
  • we create clipMeshVerticesByBox that is specific to box clipping, and is called by clipMeshVertices

I try to update it ASAP.

@oqilipo
Copy link
Contributor Author

oqilipo commented Aug 11, 2017

Hi,

I think the first version is more elegant and 'box' can be the default value. I could add the parsing if you want.

But take, what you prefer. ;-)

Kind regards

@oqilipo
Copy link
Contributor Author

oqilipo commented Nov 16, 2024

#184

@oqilipo
Copy link
Contributor Author

oqilipo commented Nov 21, 2024

Hi David

I've added clipMeshByBox.m

Maybe think about an naming convention. I've listed similar functions, I've found:

Functions creating new vertices, faces:

Functions NOT creating new vertices, faces:

Kind regards

@oqilipo oqilipo reopened this Nov 21, 2024
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

2 participants