mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-28 04:05:38 +05:00
0020731: EDF 1302 GEOM: Fillet 1D anomaly
This commit is contained in:
parent
1159b0e00e
commit
b6bb3a882a
@ -103,48 +103,26 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
|
|||||||
|
|
||||||
if (aType == WIRE_EDGES) {
|
if (aType == WIRE_EDGES) {
|
||||||
Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes();
|
Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes();
|
||||||
unsigned int ind, nbshapes = aShapes->Length();
|
|
||||||
|
|
||||||
TopoDS_Wire aWire;
|
TopoDS_Wire aWire;
|
||||||
B.MakeWire(aWire);
|
B.MakeWire(aWire);
|
||||||
BRepBuilderAPI_MakeWire MW;
|
|
||||||
bool isMWDone = true;
|
|
||||||
|
|
||||||
// add edges
|
// add edges
|
||||||
for (ind = 1; ind <= nbshapes; ind++) {
|
for (uint ind = 1; ind <= aShapes->Length(); ind++) {
|
||||||
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
|
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
|
||||||
TopoDS_Shape aShape_i = aRefShape->GetValue();
|
TopoDS_Shape aShape_i = aRefShape->GetValue();
|
||||||
if (aShape_i.IsNull()) {
|
if (aShape_i.IsNull()) {
|
||||||
Standard_NullObject::Raise("Shape for wire construction is null");
|
Standard_NullObject::Raise("Shape for wire construction is null");
|
||||||
}
|
}
|
||||||
if (aShape_i.ShapeType() == TopAbs_EDGE) {
|
if (aShape_i.ShapeType() == TopAbs_EDGE || aShape_i.ShapeType() == TopAbs_WIRE) {
|
||||||
B.Add(aWire, TopoDS::Edge(aShape_i));
|
|
||||||
MW.Add(TopoDS::Edge(aShape_i));
|
|
||||||
if (!MW.IsDone()) {
|
|
||||||
// check status after each edge/wire addition, because the final status
|
|
||||||
// can be OK even in case, when some edges/wires was not accepted.
|
|
||||||
isMWDone = false;
|
|
||||||
}
|
|
||||||
} else if (aShape_i.ShapeType() == TopAbs_WIRE) {
|
|
||||||
TopExp_Explorer exp (aShape_i, TopAbs_EDGE);
|
TopExp_Explorer exp (aShape_i, TopAbs_EDGE);
|
||||||
for (; exp.More(); exp.Next()) {
|
for (; exp.More(); exp.Next())
|
||||||
B.Add(aWire, TopoDS::Edge(exp.Current()));
|
B.Add(aWire, TopoDS::Edge(exp.Current()));
|
||||||
MW.Add(TopoDS::Edge(exp.Current()));
|
|
||||||
if (!MW.IsDone()) {
|
|
||||||
// check status after each edge/wire addition, because the final status
|
|
||||||
// can be OK even in case, when some edges/wires was not accepted.
|
|
||||||
isMWDone = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Standard_TypeMismatch::Raise
|
Standard_TypeMismatch::Raise
|
||||||
("Shape for wire construction is neither an edge nor a wire");
|
("Shape for wire construction is neither an edge nor a wire");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMWDone) {
|
|
||||||
aShape = MW;
|
|
||||||
} else {
|
|
||||||
// fix edges order
|
// fix edges order
|
||||||
Handle(ShapeFix_Wire) aFW = new ShapeFix_Wire;
|
Handle(ShapeFix_Wire) aFW = new ShapeFix_Wire;
|
||||||
aFW->Load(aWire);
|
aFW->Load(aWire);
|
||||||
@ -154,8 +132,6 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
|
|||||||
Standard_ConstructionError::Raise("Wire construction failed: several loops detected");
|
Standard_ConstructionError::Raise("Wire construction failed: several loops detected");
|
||||||
} else if (aFW->StatusReorder(ShapeExtend_FAIL)) {
|
} else if (aFW->StatusReorder(ShapeExtend_FAIL)) {
|
||||||
Standard_ConstructionError::Raise("Wire construction failed");
|
Standard_ConstructionError::Raise("Wire construction failed");
|
||||||
//} else if (aFW->StatusReorder(ShapeExtend_DONE2)) {
|
|
||||||
// Standard_ConstructionError::Raise("Wire construction failed: some gaps detected");
|
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,10 +162,8 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
|
|||||||
Standard_ConstructionError::Raise("Wire construction failed: cannot fix 3d gaps");
|
Standard_ConstructionError::Raise("Wire construction failed: cannot fix 3d gaps");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aShape = aFW->WireAPIMake();
|
aShape = aFW->WireAPIMake();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (aType == FACE_WIRE) {
|
else if (aType == FACE_WIRE) {
|
||||||
Handle(GEOM_Function) aRefBase = aCI.GetBase();
|
Handle(GEOM_Function) aRefBase = aCI.GetBase();
|
||||||
TopoDS_Shape aShapeBase = aRefBase->GetValue();
|
TopoDS_Shape aShapeBase = aRefBase->GetValue();
|
||||||
|
Loading…
Reference in New Issue
Block a user