I am rushing with some work and i want to write a program that deletes all points of cloud compare within a spherical radius, same as cross section, except that all points within a sphere are segmented to another group.
It would be a good design tool for people that work with vases and similar, to be able change to different spheroids and to use cylinders too.
I know how to code in javascript, i'd love some advice and perhaps a starting code for which i can write a cylinder and sphere cross section tool, any help would be very welcome.
Please how can i write SPHERICAL Cross Section Plugin?
-
- Posts: 10
- Joined: Sat Jan 14, 2017 6:30 pm
Re: Please how can i write SPHERICAL Cross Section Plugin?
Well, I guess the best way would be to mimic the existing Cross Section tool? See the ccClippingBoxTool class.
Replacing the box (ccClipBox) by a sphere or a cylinder? For the sake of simplicity you can even do it in the main version of CC, adding a button to let the user choose the shape of the clipping box for instance.
Replacing the box (ccClipBox) by a sphere or a cylinder? For the sake of simplicity you can even do it in the main version of CC, adding a button to let the user choose the shape of the clipping box for instance.
Daniel, CloudCompare admin
-
- Posts: 10
- Joined: Sat Jan 14, 2017 6:30 pm
Re: Please how can i write SPHERICAL Cross Section Plugin?
Hi Daniel, i found that Mehlab has selection of vertices by full mathematical formuli so spheres and things, perhaps you can steel their code for that, don't know if it's ok to steel from other open source projects but steeling is fine if it's in secret. see ya.
Re: Please how can i write SPHERICAL Cross Section Plugin?
Stealing is bad... And by the way the code is very simple. It's just that this feature is not in our top priorities (which is already verrrrrryyyyy long).
But the beauty of open source is that anyone can contribute to the project, and enhance it in the way they desire... (and without stealing anything ;)
But the beauty of open source is that anyone can contribute to the project, and enhance it in the way they desire... (and without stealing anything ;)
Daniel, CloudCompare admin