problems with performing the operation fillet 3D

Hello.
I have been using OpenCascade for a couple of months now, so I´m still familiarizing with it. I'm using BRepFilletAPI_MakeFillet to make a fillet operation to a solid´s edge. This works OK.
In order to have a reference to original model for possible changes and parametric issues, the original edge is saved in an OCAF TDF_Label by using a TNaming_NamedShape attribute. Same procedure is followed with the original solid shape, using another TDF_Label and TNaming_NamedShape.
Here is my problem: When a change on the original solid model is made, its label is notified through TNaming_Builder package about it, so it could recalculate all operations again. However, the fillet operation cannot be made on the modified solid shape. Application shows an error (standard failure). Seems it does not recognize the saved edge of the original shape as part of the modified shape, so it does not apply the fillet operation with the new parameters.
Maybe this example could help out me clarifying the above ideas…

gp_Vec prismDir;
TopoDS_Face profile;
Standard_Real radius;
TopoDS_Edge edge;
TDF_Label label;

BRepPrimAPI_MakePrism prism(profile, prismDir);
TopoDS_Shape prism1 = prism.Shape();

BRepFilletAPI_MakeFillet fillet(prism1);
fillet.Add(radius,edge);

TNaming_Builder namingBuilder(label);
namingBuilder.Generated(fillet.Shape());

//-----Modify solidModel------//

BRepPrimAPI_MakePrism prism(profile, prismDir); // same parameters of prism1
TopoDS_Shape prism2 = prism.Shape();

TNaming_Builder namingBuilder(label);
namingBuilder.Modify(prism1, prism2);

Handle(TNaming_NamedShape) nShapeSolid;
if(label.FindAttribute(TNaming_NamedShape::GetID(), nShapeSolid))
{
BRepFilletAPI_MakeFillet fillet(nShapeSolid->Get());
fillet.Add(radius,edge); //radius and edge are the same parameters of prism1
TopoDS_Shape filletShape = fillet.Shape();
}

Thanks in advance,

Forum supervisor's picture

Dear Marvyn,

To rebuild a fillet you should provide for the algorithm as new context shape (prism1)
as new edge (belonging to the new context shape).
For details concerning Naming services see "Application Framework User’s Guide".
In case if you will not succeed and the problem is critical for you, you may contact us via the Contact Form http://www.opencascade.org/about/contacts/.
Training and e-learning courses are also at your disposal - http://www.opencascade.org/support/training/.
Regards

marvynbrasil84's picture

Thank you very much for your attention, Supervisor,
I would like to notice that in my code, fillet operation always works fine; where I’m getting stuck when I try to recalculate that fillet in a solid that has been modified.
I will continue looking for a solution. Any other help or clue you could give me will always be welcome.
Thanks again,
Marvyn

Forum supervisor's picture

Dear Marvyn,
My note concerns exactly the modified solid ('new' - means modified shape).
Regards