DiscussionsIssue archiveOther usage issues

Archived discussion

An Error of Opencascade 5

Other usage issuesWed, 01/18/2006 - 17:1911 replies

Browse this forum
QuestionAuthor

I've constructed a complicated TopoDS_Solid
with 6 Shells. All of these Shells are Geom_BsplineSurfaces.

Now I want to fuse this Solid with a simple
TopoDS_Shape(For Example: A Box) using BRepAlgo_Fuse or BRepAlgoAPI_Fuse, but the results of the
Calculation of Opencascade are very funny and
unstable.

Has Anybody also found this Problem?

Discussion

11 archived replies

Posts are displayed in their archived order.

01Commenter-1

did you check that the generated solid is valid before doing the fuse ?

02Author

Yes, I've checked, all are right, even Display is right.

03Author

The Problem is BRepAlgoAPI_Fuse or BRepAlgo_Fuse,
They don't work correctlly, or don't work with various Shape.

04Commenter-1

if your input shape is not 100% valid, the algorithms may failed.
did you try to fix your solid also ?

05Author

How can I fix my Solid?
My Code is following:
Here shell, shell1, ..., shell5 are TopoDS_Shell and correct before using,
pp2, pp8 are cornors of this Solid,
.......
BRepBuilderAPI_MakeSolid solid(shell, shell1, shell2);
solid.Add(shell3);
solid.Add(shell4);
solid.Add(shell5);
TopoDS_Shape s10;
if(solid.IsDone())
s10 = solid.Shape();
myAISContext->Display(new AIS_Shape(s10));

TopoDS_Shape s11 = BRepPrimAPI_MakeBox(pp2, pp8);
BRepAlgoAPI_Fuse c10(s11, s10);
if(c10.IsDone())
s11 = c10.Shape();

myAISContext->Display(new AIS_Shape(s11));

06Commenter-1

for fixing, try :
ShapeFix_Shape FixShape;
FixShape.Init(solid);
FixShape.Perform();
TopoDS_Shape fixedShape = FixShape.Shape();

HTH,

Commenter-1

07Commenter-1

oops, sorry, replace solid with s10 in the code

08Author

Thanks

09Author

This line has always Problem during Runtime.
........
TopoDS_Shape s11 = BRepPrimAPI_MakeBox(pp2, pp8);
........

10Author

Sorry! False! This Line:
......
BRepAlgoAPI_Fuse c10(s11, s10);

11Author

The Problem is BRepAlgoAPI_Fuse or BRepAlgo_Fuse,
They don't work correctlly, or don't work with various Shapes.