GDD: SIGSEGV in PipeTShape corrected

This commit is contained in:
gdd 2010-09-17 16:01:18 +00:00
parent 356b290042
commit 60865cf79f

View File

@ -281,6 +281,10 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(Handle(GEOM_Object) theShape, int
aShell->GetLastFunction()->SetDescription("");
// Get the common shapes between shell and shape
Handle(GEOM_Object) aCommonCompound = myBooleanOperations->MakeBoolean (theShape, aShell, 1); // MakeCommon
if (aCommonCompound.IsNull()) {
SetErrorCode(myBooleanOperations->GetErrorCode());
return false;
}
aCommonCompound->GetLastFunction()->SetDescription("");
// Explode the faces of common shapes => 3 faces
Handle(TColStd_HSequenceOfTransient) aCommonFaces = myShapesOperations->MakeExplode(aCommonCompound, TopAbs_FACE, true);
@ -328,13 +332,13 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(Handle(GEOM_Object) theShape, int
// aV1->GetLastFunction()->SetDescription("");
// aV2->GetLastFunction()->SetDescription("");
// aV3->GetLastFunction()->SetDescription("");
// Handle(GEOM_Object) aPln1 = myBasicOperations->MakePlanePntVec(aP1, aV1, 2*(theR1+theW1+theL2));
// Handle(GEOM_Object) aPln2 = myBasicOperations->MakePlanePntVec(aP2, aV2, 2*(theR2+theW2));
// Handle(GEOM_Object) aPln3 = myBasicOperations->MakePlanePntVec(aP3, aV3, 2*(theR1+theW1+theL2));
// Handle(GEOM_Object) aPln1 = myBasicOperations->MakePlanePntVec(aP1, aV1, 2*(aR1Ext+theL2));
// Handle(GEOM_Object) aPln2 = myBasicOperations->MakePlanePntVec(aP2, aV2, 2*(aR2Ext));
// Handle(GEOM_Object) aPln3 = myBasicOperations->MakePlanePntVec(aP3, aV3, 2*(aR1Ext+theL2));
// aPln1->GetLastFunction()->SetDescription("");
// aPln2->GetLastFunction()->SetDescription("");
// aPln3->GetLastFunction()->SetDescription("");
//
// BRepBuilderAPI_Transform aTransformation1(aPln1->GetValue(), aTrsf, Standard_False);
// TopoDS_Shape aTrsf_Shape1 = aTransformation1.Shape();
// aPln1->GetLastFunction()->SetValue(aTrsf_Shape1);
@ -386,7 +390,10 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(Handle(GEOM_Object) theShape, int
// theSeq->Append(aPln3);
// return false;
}
// Comment the following lines when GetInPlace bug is solved
// == BEGIN
}
// == END
/////////////////////////
//// Groups of Edges ////
/////////////////////////
@ -510,7 +517,7 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(Handle(GEOM_Object) theShape, int
}
else if (nbEdges == 8) {
incidentPipeFound = true;
mainPipeFound = false;
mainPipeFound = true;
flangeFound = false;
TopExp_Explorer Ex(aGroupShapeTrsfInv,TopAbs_VERTEX);
@ -1141,8 +1148,15 @@ GEOMImpl_IAdvancedOperations::MakePipeTShape(double theR1, double theW1, double
/*
* Get the groups: BEGIN
*/
try {
if (!MakeGroups(aShape, TSHAPE_BASIC, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, gp_Trsf()))
return NULL;
}
catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
SetErrorCode(aFail->GetMessageString());
return NULL;
}
TCollection_AsciiString aListRes, anEntry;
// Iterate over the sequence aSeq
@ -1271,9 +1285,16 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeWithPosition(double theR1, double th
//
// Get the groups: BEGIN
//
try {
if (!MakeGroups(aShape,TSHAPE_BASIC, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, aTrsf)) {
return NULL;
}
}
catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
SetErrorCode(aFail->GetMessageString());
return NULL;
}
TCollection_AsciiString aListRes, anEntry;
// Iterate over the sequence aSeq
@ -1465,8 +1486,15 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeChamfer(double theR1, double theW1,
// << ", " << theHexMesh << ")";
// }
// else {
try {
if (!MakeGroups(aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, gp_Trsf()))
return NULL;
}
catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
SetErrorCode(aFail->GetMessageString());
return NULL;
}
TCollection_AsciiString aListRes, anEntry;
// Iterate over the sequence aSeq
@ -1658,8 +1686,15 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeChamferWithPosition(double theR1, do
/*
* Get the groups: BEGIN
*/
try {
if (!MakeGroups(aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, aTrsf))
return NULL;
}
catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
SetErrorCode(aFail->GetMessageString());
return NULL;
}
TCollection_AsciiString aListRes, anEntry;
// Iterate over the sequence aSeq
@ -1830,8 +1865,15 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeFillet(double theR1, double theW1, d
/*
* Get the groups: BEGIN
*/
try {
if (!MakeGroups(aShape, TSHAPE_FILLET, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, gp_Trsf()))
return NULL;
}
catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
SetErrorCode(aFail->GetMessageString());
return NULL;
}
TCollection_AsciiString aListRes, anEntry;
// Iterate over the sequence aSeq
@ -2022,8 +2064,15 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeFilletWithPosition(double theR1, dou
/*
* Get the groups: BEGIN
*/
try {
if (!MakeGroups(aShape, TSHAPE_FILLET, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, aTrsf))
return NULL;
}
catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
SetErrorCode(aFail->GetMessageString());
return NULL;
}
TCollection_AsciiString aListRes, anEntry;
// Iterate over the sequence aSeq