mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-22 13:55:37 +05:00
NPAL18205: MakePipe problem on Debian Etch 32bits.
This commit is contained in:
parent
c007a25a7f
commit
23147de178
@ -29,10 +29,14 @@
|
|||||||
#include <GEOMImpl_Types.hxx>
|
#include <GEOMImpl_Types.hxx>
|
||||||
#include <GEOM_Function.hxx>
|
#include <GEOM_Function.hxx>
|
||||||
|
|
||||||
|
#include <GEOMAlgo_GlueAnalyser.hxx>
|
||||||
|
|
||||||
#include <ShapeAnalysis_FreeBounds.hxx>
|
#include <ShapeAnalysis_FreeBounds.hxx>
|
||||||
#include <ShapeAnalysis_Edge.hxx>
|
#include <ShapeAnalysis_Edge.hxx>
|
||||||
#include <ShapeFix_Face.hxx>
|
#include <ShapeFix_Face.hxx>
|
||||||
#include <ShapeFix_Shell.hxx>
|
#include <ShapeFix_Shell.hxx>
|
||||||
|
#include <ShapeFix_Shape.hxx>
|
||||||
|
#include <ShapeFix_ShapeTolerance.hxx>
|
||||||
|
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
@ -87,10 +91,6 @@
|
|||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
//#include "BRepTools.hxx"
|
|
||||||
//#include "GeomTools.hxx"
|
|
||||||
#include <GEOMAlgo_GlueAnalyser.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GetID
|
//function : GetID
|
||||||
@ -126,12 +126,12 @@ static bool FillForOtherEdges(const TopoDS_Shape& F1,
|
|||||||
// creating map of vertex edges for both faces
|
// creating map of vertex edges for both faces
|
||||||
TopTools_IndexedDataMapOfShapeListOfShape aMapVertEdge1;
|
TopTools_IndexedDataMapOfShapeListOfShape aMapVertEdge1;
|
||||||
TopExp::MapShapesAndAncestors(F1, TopAbs_VERTEX, TopAbs_EDGE, aMapVertEdge1);
|
TopExp::MapShapesAndAncestors(F1, TopAbs_VERTEX, TopAbs_EDGE, aMapVertEdge1);
|
||||||
if(!FF.Contains(F1))
|
if (!FF.Contains(F1))
|
||||||
cout<<" FillForOtherEdges: map FF not contains key F1"<<endl;
|
MESSAGE(" FillForOtherEdges: map FF not contains key F1");
|
||||||
if(!FF.Contains(E1))
|
if (!FF.Contains(E1))
|
||||||
cout<<" FillForOtherEdges: map FF not contains key E1"<<endl;
|
MESSAGE(" FillForOtherEdges: map FF not contains key E1");
|
||||||
if(!FF.Contains(V1))
|
if (!FF.Contains(V1))
|
||||||
cout<<" FillForOtherEdges: map FF not contains key V1"<<endl;
|
MESSAGE(" FillForOtherEdges: map FF not contains key V1");
|
||||||
const TopoDS_Shape& F2 = FF.FindFromKey(F1);
|
const TopoDS_Shape& F2 = FF.FindFromKey(F1);
|
||||||
const TopoDS_Shape& E2 = FF.FindFromKey(E1);
|
const TopoDS_Shape& E2 = FF.FindFromKey(E1);
|
||||||
const TopoDS_Shape& V2 = FF.FindFromKey(V1);
|
const TopoDS_Shape& V2 = FF.FindFromKey(V1);
|
||||||
@ -1514,8 +1514,7 @@ static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI)
|
|||||||
Handle(Geom_RectangularTrimmedSurface)::DownCast(S1);
|
Handle(Geom_RectangularTrimmedSurface)::DownCast(S1);
|
||||||
S1 = RTS->BasisSurface();
|
S1 = RTS->BasisSurface();
|
||||||
}
|
}
|
||||||
Handle(Geom_Plane) Pln1 =
|
Handle(Geom_Plane) Pln1 = Handle(Geom_Plane)::DownCast(S1);
|
||||||
Handle(Geom_Plane)::DownCast(S1);
|
|
||||||
if( Pln1.IsNull() ) {
|
if( Pln1.IsNull() ) {
|
||||||
if(aCI) delete aCI;
|
if(aCI) delete aCI;
|
||||||
Standard_ConstructionError::Raise("Surface from face is not plane");
|
Standard_ConstructionError::Raise("Surface from face is not plane");
|
||||||
@ -1904,10 +1903,9 @@ Standard_Integer GEOMImpl_PipeDriver::Execute(TFunction_Logbook& log) const
|
|||||||
|
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
|
|
||||||
if (aType == PIPE_BASE_PATH) {
|
if (aType == PIPE_BASE_PATH)
|
||||||
|
{
|
||||||
Handle(GEOM_Function) aRefBase = aCI->GetBase();
|
Handle(GEOM_Function) aRefBase = aCI->GetBase();
|
||||||
|
|
||||||
TopoDS_Shape aShapeBase = aRefBase->GetValue();
|
TopoDS_Shape aShapeBase = aRefBase->GetValue();
|
||||||
|
|
||||||
if (aShapeBase.IsNull()) {
|
if (aShapeBase.IsNull()) {
|
||||||
@ -2295,11 +2293,24 @@ Standard_Integer GEOMImpl_PipeDriver::Execute(TFunction_Logbook& log) const
|
|||||||
aShape = CreatePipeShellsWithoutPath(aCI);
|
aShape = CreatePipeShellsWithoutPath(aCI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (aCI) {
|
||||||
|
delete aCI;
|
||||||
|
aCI = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (aShape.IsNull()) return 0;
|
if (aShape.IsNull()) return 0;
|
||||||
|
|
||||||
BRepCheck_Analyzer ana (aShape, Standard_False);
|
BRepCheck_Analyzer ana (aShape, Standard_False);
|
||||||
if (!ana.IsValid()) {
|
if (!ana.IsValid()) {
|
||||||
if(aCI) delete aCI;
|
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("Algorithm have produced an invalid shape result");
|
Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2307,7 +2318,6 @@ Standard_Integer GEOMImpl_PipeDriver::Execute(TFunction_Logbook& log) const
|
|||||||
aFunction->SetValue(aRes);
|
aFunction->SetValue(aRes);
|
||||||
|
|
||||||
log.SetTouched(Label());
|
log.SetTouched(Label());
|
||||||
if(aCI) delete aCI;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user