mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-15 19:53:09 +05:00
Fix a bug + Debug
This commit is contained in:
parent
392db299f7
commit
3f8a20c607
@ -689,14 +689,17 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) t
|
|||||||
v->GetLastFunction()->SetDescription("");
|
v->GetLastFunction()->SetDescription("");
|
||||||
TopoDS_Vertex aVertex = TopoDS::Vertex(v->GetValue());
|
TopoDS_Vertex aVertex = TopoDS::Vertex(v->GetValue());
|
||||||
gp_Pnt aP = BRep_Tool::Pnt(aVertex);
|
gp_Pnt aP = BRep_Tool::Pnt(aVertex);
|
||||||
|
// std::cout << "Coords: " << aP.X() << ", " << aP.Y() << ", " << aP.Z() << std::endl;
|
||||||
if (Abs(aP.X()) <= Precision::Confusion()) {
|
if (Abs(aP.X()) <= Precision::Confusion()) {
|
||||||
if (Abs(aP.Y()) - theR2 <= Precision::Confusion())
|
if (Abs(aP.Y()) - theR1 <= Precision::Confusion()) {
|
||||||
vi1 = v;
|
vi1 = v;
|
||||||
|
}
|
||||||
} else if (Abs(aP.Y()) <= Precision::Confusion()) {
|
} else if (Abs(aP.Y()) <= Precision::Confusion()) {
|
||||||
if (Abs(aP.X()) - theR1 <= Precision::Confusion())
|
if (Abs(aP.X()) - theR1 <= Precision::Confusion()) {
|
||||||
vi2 = v;
|
vi2 = v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::list<Handle(GEOM_Object)> theShapes;
|
std::list<Handle(GEOM_Object)> theShapes;
|
||||||
|
|
||||||
@ -740,14 +743,19 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) t
|
|||||||
v->GetLastFunction()->SetDescription("");
|
v->GetLastFunction()->SetDescription("");
|
||||||
TopoDS_Vertex aVertex = TopoDS::Vertex(v->GetValue());
|
TopoDS_Vertex aVertex = TopoDS::Vertex(v->GetValue());
|
||||||
gp_Pnt aP = BRep_Tool::Pnt(aVertex);
|
gp_Pnt aP = BRep_Tool::Pnt(aVertex);
|
||||||
|
// std::cout << "Coords: " << aP.X() << ", " << aP.Y() << ", " << aP.Z() << std::endl;
|
||||||
if (Abs(aP.X()) <= Precision::Confusion()) {
|
if (Abs(aP.X()) <= Precision::Confusion()) {
|
||||||
if (Abs(aP.Y()) - theR2 > Precision::Confusion())
|
if (Abs(aP.Y()) - theR2 > Precision::Confusion()) {
|
||||||
ve1 = v;
|
ve1 = v;
|
||||||
|
}
|
||||||
} else if (Abs(aP.Y()) <= Precision::Confusion()) {
|
} else if (Abs(aP.Y()) <= Precision::Confusion()) {
|
||||||
if (Abs(aP.X()) - theR2 > Precision::Confusion())
|
if (Abs(aP.X()) - theR2 > Precision::Confusion()) {
|
||||||
ve2 = v;
|
ve2 = v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( !ve1.IsNull() && !ve2.IsNull())
|
||||||
|
break;
|
||||||
|
}
|
||||||
Handle(GEOM_Object) edge_e1, edge_e2;
|
Handle(GEOM_Object) edge_e1, edge_e2;
|
||||||
|
|
||||||
edge_e1 = myBasicOperations->MakeLineTwoPnt(ve1, vi1);
|
edge_e1 = myBasicOperations->MakeLineTwoPnt(ve1, vi1);
|
||||||
@ -782,6 +790,16 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) t
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
face_t->GetLastFunction()->SetDescription("");
|
face_t->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
|
theShapes.push_back(theShape);
|
||||||
|
theShapes.push_back(vi1);
|
||||||
|
theShapes.push_back(vi2);
|
||||||
|
theShapes.push_back(ve1);
|
||||||
|
theShapes.push_back(ve2);
|
||||||
|
theShapes.push_back(edge_e1);
|
||||||
|
theShapes.push_back(edge_e2);
|
||||||
|
theShapes.push_back(wire_t);
|
||||||
|
theShapes.push_back(face_t);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Handle(GEOM_Object) P1, P2, P3, P4, P5, P6;
|
Handle(GEOM_Object) P1, P2, P3, P4, P5, P6;
|
||||||
|
Loading…
Reference in New Issue
Block a user