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
    // Set mode for meshing
    // Set meshing deflection
    // Perform the proximity detection
    ColDetectionProxy_Result aResult1;
    ColDetectionProxy_Result aResult2;
    aTool->Perform(aShape1, aShape2, aResult1, aResult2);    
    // Check for detection result
    return aResult1.IsFound();

In any case ,it return a value of 0,so what is the problem of the function?


TIAN DAJIANG's picture

why i do not have this clas ColDetectionProxy_Intersector?

Kirill Gavrilov's picture

Collision detection component is not part of open source OCCT framework, it is a commercial extension - see related page.

TIAN DAJIANG's picture