Please how can i write SPHERICAL Cross Section Plugin?

To post any request/idea for new functionalities
Post Reply
cosmocompare
Posts: 10
Joined: Sat Jan 14, 2017 6:30 pm

Please how can i write SPHERICAL Cross Section Plugin?

Post 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.
daniel
Site Admin
Posts: 7330
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

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

Post 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.
Daniel, CloudCompare admin
cosmocompare
Posts: 10
Joined: Sat Jan 14, 2017 6:30 pm

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

Post 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.
daniel
Site Admin
Posts: 7330
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

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

Post 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 ;)
Daniel, CloudCompare admin
Post Reply