mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 10:08:35 +05:00
report error when a major radius is less that a minor one
This commit is contained in:
parent
16e5d35158
commit
e403b95e1b
@ -133,9 +133,18 @@ Standard_Integer GEOMImpl_EllipseDriver::Execute(TFunction_Logbook& log) const
|
|||||||
anAxes = gp_Ax2 (aP, aV, aVM);
|
anAxes = gp_Ax2 (aP, aV, aVM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Radiuses
|
||||||
|
double radiusMaj = aCI.GetRMajor();
|
||||||
|
double radiusMin = aCI.GetRMinor();
|
||||||
|
if ( radiusMaj < radiusMin )
|
||||||
|
Standard_ConstructionError::Raise
|
||||||
|
("Ellipse creation aborted: a major radius is less that a minor one");
|
||||||
|
if ( radiusMin < 0.0 )
|
||||||
|
Standard_ConstructionError::Raise
|
||||||
|
("Ellipse creation aborted: raduis must be positive");
|
||||||
|
|
||||||
// Ellipse
|
// Ellipse
|
||||||
gp_Elips anEll (anAxes, aCI.GetRMajor(), aCI.GetRMinor());
|
gp_Elips anEll (anAxes, radiusMaj, radiusMin);
|
||||||
aShape = BRepBuilderAPI_MakeEdge(anEll).Edge();
|
aShape = BRepBuilderAPI_MakeEdge(anEll).Edge();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user