Bug in OC? Try code, please.

Hi,

I can not believe, that OC can not subtract two cylinders. Try the code bellow:

BRepPrimAPI_MakeCylinder o_mc1 (gp_Ax2 (gp_Pnt(0,-50,140), gp_Dir(1,0,0)), 50, 1000);
//BRepPrimAPI_MakeCylinder o_mc2 (gp_Ax2 (gp_Pnt(21.65064, -50.0, 127.5), gp_Dir(-sin(PI/3), 0.0, 0.5)), 5, 150);
BRepPrimAPI_MakeCylinder o_mc3 (gp_Ax2 (gp_Pnt(978.34936, -50.0, 127.5), gp_Dir(sin(PI/3), 0.0, 0.5)), 5, 150);

TopoDS_Shape o_cut_shape = BRepAlgoAPI_Cut (o_mc1.Solid (), o_mc3.Solid ());

Is it a bug, or am I wrong?

Best regards,
Adrian

Jérome Dufaure's picture

hello
for there are no pbs with your code.
But the result is not a Solid....
your shape is o_mc1+an ellipse which is the wire intersecting o_mc1 and o_mc3.
Boolean operations returns only shape and not solids
good luck
jerome

a-helcman's picture

Jerome,

Is o_mc1+an ellipse the wire intersecting of o_mc1 and o_mc3? Really??

Why is the result of mc1-mc2 different - correct? (Try to uncomment mc2.)

Greetings,
Adrian

Jérome Dufaure's picture

Adrian
you 're rigth the result is different with mc1-mc2 and mc1-mc3.
with mc1-mc2 the result is OK but in the other case it's not.
I do not understand what happens in the second case.
Good luck
Jerome