diff --git a/GeoTools.cpp b/GeoTools.cpp index d6e0ad5..d831f6d 100644 --- a/GeoTools.cpp +++ b/GeoTools.cpp @@ -38,6 +38,8 @@ AdjustId( int nId, int nCtx) Vector3d GetVectorLocal( IGeomDB* pGeomDB, const Vector3d& vtV, int nRefType, const Frame3d& frLoc) { + if ( ! vtV.IsValid()) + return vtV ; Vector3d vtVL( vtV) ; if ( nRefType == RTY_GLOB) vtVL.ToLoc( frLoc) ; @@ -50,6 +52,8 @@ GetVectorLocal( IGeomDB* pGeomDB, const Vector3d& vtV, int nRefType, const Frame Vector3d GetVectorInRef( IGeomDB* pGeomDB, const Vector3d& vtV, const Frame3d& frLoc, int nRefType) { + if ( ! vtV.IsValid()) + return vtV ; Vector3d vtVL( vtV) ; if ( nRefType == RTY_GLOB) vtVL.ToGlob( frLoc) ; @@ -62,6 +66,8 @@ GetVectorInRef( IGeomDB* pGeomDB, const Vector3d& vtV, const Frame3d& frLoc, int Point3d GetPointLocal( IGeomDB* pGeomDB, const Point3d& ptP, int nRefType, const Frame3d& frLoc) { + if ( ! ptP.IsValid()) + return ptP ; Point3d ptPL( ptP) ; if ( nRefType == RTY_GLOB) ptPL.ToLoc( frLoc) ; @@ -74,6 +80,8 @@ GetPointLocal( IGeomDB* pGeomDB, const Point3d& ptP, int nRefType, const Frame3d Point3d GetPointInRef( IGeomDB* pGeomDB, const Point3d& ptP, const Frame3d& frLoc, int nRefType) { + if ( ! ptP.IsValid()) + return ptP ; Point3d ptPL( ptP) ; if ( nRefType == RTY_GLOB) ptPL.ToGlob( frLoc) ; diff --git a/LUA_GdbCreateSurf.cpp b/LUA_GdbCreateSurf.cpp index 1fa9578..a5e0957 100644 --- a/LUA_GdbCreateSurf.cpp +++ b/LUA_GdbCreateSurf.cpp @@ -805,7 +805,7 @@ LuaCreateSurfTmSwept( lua_State* L) int nGuideId ; LuaCheckParam( L, 3, nGuideId) int nPar = 4 ; - Vector3d vtAx = V_NULL ; + Vector3d vtAx = V_INVALID ; if ( LuaGetParam( L, nPar, vtAx)) ++ nPar ; bool bCapEnds ;