mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
Fix pb with number of points
This commit is contained in:
parent
e5c1402a68
commit
f861041473
@ -74,7 +74,7 @@ class GEOMImpl_IPoint
|
||||
|
||||
void SetParameter(double theParam) { _func->SetReal(ARG_PARAM, theParam); }
|
||||
void SetParameter2(double theParam) { _func->SetReal(ARG_PARAM2, theParam); }
|
||||
void SetNumberOfPoints(double theNumberOfPnts) { _func->SetReal(ARG_NBPNTS, theNumberOfPnts); }
|
||||
void SetNumberOfPoints(int theNumberOfPnts) { _func->SetInteger(ARG_NBPNTS, theNumberOfPnts); }
|
||||
void SetLength(double theLength) { _func->SetReal(ARG_LENGTH, theLength); }
|
||||
void SetTakeOrientationIntoAccount(bool takeOrientationIntoAccount)
|
||||
{ _func->SetInteger(ARG_USE_ORIENTATION, takeOrientationIntoAccount); }
|
||||
|
@ -302,6 +302,10 @@ Standard_Integer GEOMImpl_PointDriver::Execute(Handle(TFunction_Logbook)& log) c
|
||||
Handle(GEOM_Function) aRefFunc = aPI.GetSurface();
|
||||
TopoDS_Shape aRefShape = aRefFunc->GetValue();
|
||||
int aNbPnts = aPI.GetNumberOfPoints();
|
||||
if (aNbPnts < 1) {
|
||||
Standard_TypeMismatch::Raise
|
||||
("Point On Surface creation aborted : number of points is zero or negative");
|
||||
}
|
||||
if (aRefShape.ShapeType() != TopAbs_FACE) {
|
||||
Standard_TypeMismatch::Raise
|
||||
("Point On Surface creation aborted : surface shape is not a face");
|
||||
|
Loading…
Reference in New Issue
Block a user