mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-03 21:30:35 +05:00
Bug 0020043: EDF 865 GEOM: Object is non valid after translation. Fix object after translation.
This commit is contained in:
parent
48f71ad826
commit
315665caed
@ -24,11 +24,15 @@
|
|||||||
#include <GEOMImpl_ITranslate.hxx>
|
#include <GEOMImpl_ITranslate.hxx>
|
||||||
#include <GEOMImpl_Types.hxx>
|
#include <GEOMImpl_Types.hxx>
|
||||||
#include <GEOM_Function.hxx>
|
#include <GEOM_Function.hxx>
|
||||||
#include <gp_Trsf.hxx>
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <ShapeFix_Shape.hxx>
|
||||||
#include <gp_Vec.hxx>
|
#include <ShapeFix_ShapeTolerance.hxx>
|
||||||
#include <BRepBuilderAPI_Transform.hxx>
|
|
||||||
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
|
#include <BRepCheck_Analyzer.hxx>
|
||||||
|
#include <BRepBuilderAPI_Transform.hxx>
|
||||||
|
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Edge.hxx>
|
#include <TopoDS_Edge.hxx>
|
||||||
@ -37,7 +41,10 @@
|
|||||||
#include <TopExp.hxx>
|
#include <TopExp.hxx>
|
||||||
#include <TopoDS_Vertex.hxx>
|
#include <TopoDS_Vertex.hxx>
|
||||||
#include <TopoDS_Edge.hxx>
|
#include <TopoDS_Edge.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
|
||||||
|
#include <gp_Trsf.hxx>
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <gp_Vec.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GetID
|
//function : GetID
|
||||||
@ -237,9 +244,22 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
|
|||||||
}
|
}
|
||||||
else return 0;
|
else return 0;
|
||||||
|
|
||||||
|
|
||||||
if (aShape.IsNull()) return 0;
|
if (aShape.IsNull()) return 0;
|
||||||
|
|
||||||
|
BRepCheck_Analyzer ana (aShape, Standard_True);
|
||||||
|
if (!ana.IsValid()) {
|
||||||
|
ShapeFix_ShapeTolerance aSFT;
|
||||||
|
aSFT.LimitTolerance(aShape,Precision::Confusion(),Precision::Confusion());
|
||||||
|
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
|
||||||
|
aSfs->SetPrecision(Precision::Confusion());
|
||||||
|
aSfs->Perform();
|
||||||
|
aShape = aSfs->Shape();
|
||||||
|
|
||||||
|
ana.Init(aShape, Standard_False);
|
||||||
|
if (!ana.IsValid())
|
||||||
|
Standard_ConstructionError::Raise("Scaling aborted : algorithm has produced an invalid shape result");
|
||||||
|
}
|
||||||
|
|
||||||
aFunction->SetValue(aShape);
|
aFunction->SetValue(aShape);
|
||||||
|
|
||||||
log.SetTouched(Label());
|
log.SetTouched(Label());
|
||||||
|
Loading…
Reference in New Issue
Block a user