Page 1 of 1

Please how can i write SPHERICAL Cross Section Plugin?

Posted: Sat Jan 14, 2017 9:17 pm
by cosmocompare
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.

Re: Please how can i write SPHERICAL Cross Section Plugin?

Posted: Sun Jan 15, 2017 8:31 am
by daniel
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.

Re: Please how can i write SPHERICAL Cross Section Plugin?

Posted: Tue Jan 17, 2017 4:41 pm
by cosmocompare
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?

Posted: Tue Jan 17, 2017 6:02 pm
by daniel
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 ;)