
Wed, 01/18/2006 - 17:19
Forums:
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?
Wed, 01/18/2006 - 17:52
did you check that the generated solid is valid before doing the fuse ?
Wed, 01/18/2006 - 18:03
Yes, I've checked, all are right, even Display is right.
Wed, 01/18/2006 - 18:06
The Problem is BRepAlgoAPI_Fuse or BRepAlgo_Fuse,
They don't work correctlly, or don't work with various Shape.
Wed, 01/18/2006 - 18:11
if your input shape is not 100% valid, the algorithms may failed.
did you try to fix your solid also ?
Wed, 01/18/2006 - 18:20
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));
Wed, 01/18/2006 - 18:29
for fixing, try :
ShapeFix_Shape FixShape;
FixShape.Init(solid);
FixShape.Perform();
TopoDS_Shape fixedShape = FixShape.Shape();
HTH,
Stephane
Wed, 01/18/2006 - 18:30
oops, sorry, replace solid with s10 in the code
Wed, 01/18/2006 - 18:32
Thanks
Wed, 01/18/2006 - 18:23
This line has always Problem during Runtime.
........
TopoDS_Shape s11 = BRepPrimAPI_MakeBox(pp2, pp8);
........
Wed, 01/18/2006 - 18:24
Sorry! False! This Line:
......
BRepAlgoAPI_Fuse c10(s11, s10);
Wed, 01/18/2006 - 18:06
The Problem is BRepAlgoAPI_Fuse or BRepAlgo_Fuse,
They don't work correctlly, or don't work with various Shapes.