CloudComPy icon indicating copy to clipboard operation
CloudComPy copied to clipboard

Extract plane equation from RANSAC_SD plugin

Open HollowHeartNet opened this issue 3 years ago • 2 comments

Hi,

how can I extract the plane equation from RANSAC_SD plugin for planar primitives?

Best, HollowHeartNet

HollowHeartNet avatar Oct 16 '22 00:10 HollowHeartNet

Hi, The computeRANSAC_SD function from RANSAC_SD plugin gives as a result a tuple (list of primitive meshes, list of clouds). See test035.py for an example of use. For each type of primitive (plane, sphere, cylinder,..) it is possible to get the parameters of the equation. A plane is identified with mesh.isA((cc.CC_TYPES.PLANE) For the plane primitive, the method getEquation() returns the 4 coefficients of the plane equation: [a, b, c, d] as ax+by+cz=d The documentation is a bit light on this part, I will add an example! Regards, Paul

prascle avatar Oct 16 '22 17:10 prascle

Hi, Thank you! Best, HollowHeartNet

HollowHeartNet avatar Oct 17 '22 15:10 HollowHeartNet