Mon, 04/26/2021 - 04:51
Hello everyone,
bool CollisionDection(TopoDS_Shape& aShape, TopoDS_Shape& bShape)
{
// Obtain the shapes for conversion
TopoDS_Shape aShape1, aShape2;
// Create the API class instance
Handle(ColDetectionProxy_Intersector) aTool = new ColDetectionProxy_Intersector();
// Load the shapes for detection
aTool->LoadTShape(aShape1);
aTool->LoadTShape(aShape2);
// Set mode for meshing
aTool->SetMeshingMode(ColDetectionBase_MeshingMode_Exact);
// Set meshing deflection
aTool->SetDeflection(1.e-2);
// Perform the proximity detection
ColDetectionProxy_Result aResult1;
ColDetectionProxy_Result aResult2;
aTool->Perform(aShape1, aShape2, aResult1, aResult2);
// Check for detection result
printMessage(aResult1.IsFound());
return aResult1.IsFound();
}
In any case ,it return a value of 0,so what is the problem of the function?
Thanks.
Wed, 05/12/2021 - 15:51
why i do not have this clas ColDetectionProxy_Intersector?
Wed, 05/12/2021 - 18:24
Collision detection component is not part of open source OCCT framework, it is a commercial extension - see related page.
Thu, 05/13/2021 - 04:51
thanks