mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 04:50:34 +05:00
checking arc and arcto input for invalid function arguments
This commit is contained in:
parent
539798971c
commit
1c0cfd8965
@ -160,6 +160,10 @@ public:
|
||||
{
|
||||
gp_Pnt2d P1 = localpos.Location();
|
||||
|
||||
//check input
|
||||
if(P1.X() == h && P1.Y() == v)
|
||||
throw Exception("points P1 and P2 must not be congruent");
|
||||
|
||||
localpos.SetLocation (gp_Pnt2d(h,v));
|
||||
gp_Pnt2d P2 = localpos.Location();
|
||||
|
||||
@ -231,6 +235,10 @@ public:
|
||||
{
|
||||
double newAngle = fmod(angle,360)*M_PI/180;
|
||||
|
||||
//check input
|
||||
if(newAngle<1e-16 && newAngle>-1e-16)
|
||||
throw Exception("angle must not be an integer multiple of 360");
|
||||
|
||||
gp_Dir2d dir = localpos.Direction();
|
||||
gp_Dir2d dirn;
|
||||
//compute center point of arc
|
||||
|
Loading…
Reference in New Issue
Block a user