mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-24 11:50:33 +05:00
0023351: [CEA 1955] Crash if filling has only one edge
This commit is contained in:
parent
4605007378
commit
d3c209c26f
@ -10,6 +10,7 @@ following parameters:
|
|||||||
of the surface. You can select either several edges/wires or a
|
of the surface. You can select either several edges/wires or a
|
||||||
compound of them. To prepare for the filling, each input wire
|
compound of them. To prepare for the filling, each input wire
|
||||||
is converted into a single BSpline curve by concatenating its edges.
|
is converted into a single BSpline curve by concatenating its edges.
|
||||||
|
List of edges/wires must contain more than one edge.
|
||||||
\n \b Minimum and <b>Maximum Degree</b> of equation of the resulting
|
\n \b Minimum and <b>Maximum Degree</b> of equation of the resulting
|
||||||
BSpline or Besier curves describing the surface.
|
BSpline or Besier curves describing the surface.
|
||||||
\n \b Tolerance for \b 2D and for \b 3D - minimum distance between the
|
\n \b Tolerance for \b 2D and for \b 3D - minimum distance between the
|
||||||
|
@ -176,7 +176,7 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(LOGBOOK& log) const
|
|||||||
Standard_Integer aMethod = IF.GetMethod();
|
Standard_Integer aMethod = IF.GetMethod();
|
||||||
|
|
||||||
GeomFill_SectionGenerator Section;
|
GeomFill_SectionGenerator Section;
|
||||||
Standard_Integer i = 0;
|
Standard_Integer aNumSection = 0;
|
||||||
Handle(Geom_Curve) aLastC;
|
Handle(Geom_Curve) aLastC;
|
||||||
gp_Pnt PL1,PL2;
|
gp_Pnt PL1,PL2;
|
||||||
for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) {
|
for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) {
|
||||||
@ -198,7 +198,7 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(LOGBOOK& log) const
|
|||||||
C->Reverse();
|
C->Reverse();
|
||||||
}
|
}
|
||||||
else if (aMethod == 2) {
|
else if (aMethod == 2) {
|
||||||
if (i == 0) {
|
if (aNumSection == 0) {
|
||||||
PL1 = P1;
|
PL1 = P1;
|
||||||
PL2 = P2;
|
PL2 = P2;
|
||||||
}
|
}
|
||||||
@ -218,12 +218,17 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(LOGBOOK& log) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
Section.AddCurve(C);
|
Section.AddCurve(C);
|
||||||
i++;
|
aNumSection++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* a 'tolerance' is used to compare 2 knots : see GeomFill_Generator.cdl */
|
/* a 'tolerance' is used to compare 2 knots : see GeomFill_Generator.cdl */
|
||||||
Section.Perform(Precision::PConfusion());
|
Section.Perform(Precision::PConfusion());
|
||||||
Handle(GeomFill_Line) Line = new GeomFill_Line(i);
|
//imn: to fix the bug 23351: "Crash is filling has only one edge"
|
||||||
|
//after fix related occt bug 27875 must be removed
|
||||||
|
if (aNumSection < 2) {
|
||||||
|
Standard_ConstructionError::Raise("Input must contain more than one edge");
|
||||||
|
}
|
||||||
|
Handle(GeomFill_Line) Line = new GeomFill_Line(aNumSection);
|
||||||
|
|
||||||
GeomFill_AppSurf App (mindeg, maxdeg, tol3d, tol2d, nbiter); /* user parameters */
|
GeomFill_AppSurf App (mindeg, maxdeg, tol3d, tol2d, nbiter); /* user parameters */
|
||||||
App.Perform(Line, Section);
|
App.Perform(Line, Section);
|
||||||
|
Loading…
Reference in New Issue
Block a user