Contact Points of two solids

I am new to OCC. So please excuse me if I am posting in wrong section.
I am trying to solve a torque equation and for that I need the contact points between any two solid parts. For example if a cube is on top of a second cube they will have infinite contact points. But I need the extreme points of the contact area. In this case there will be four points.

Please let me know if there is any inbuilt method for this or guide me how to proceed.

Pawel's picture

Hi Deepak,

you can try using Boolean Operations to find the contact shape between two models and then process the contact shape in order to find the extreme points. In case like above maybe you could also use bounding boxes to get the corner points.

Pawel

Deepak Agrawal's picture

Hi Pawel,

I am trying to use BRepAlgoAPI_Section to calculate the intersection shape of two shapes.
I also imported two classes

import org.jcae.opencascade.jni.BRepAlgoAPI_Section;
import org.jcae.opencascade.jni.TopoDS_Shape;

public void ...
....
...
BRepAlgoAPI_Section S(p1.getShape(),q1.getShape(), PerformNow);
return S.Shape();
...
}

But I am getting this error :BRepAlgoAPI_Section cannot be resolved to a variable
Can you tell me how to use this function.

Deepak

Pawel's picture

Hi Deepak,

sorry but I´m not that much into java.

Maybe you could ask the guys from jCAE?

Pawel

Deepak Agrawal's picture

Thanks for replying. I think I figured it out.