From 83ee155b8adcb264e4d259bdf4a567a9575bca01 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 14 May 2026 13:04:07 +0200 Subject: [PATCH] =?UTF-8?q?EgtExecutor=20:=20-=20modifiche=20a=20EgtSurfTm?= =?UTF-8?q?Swept=20per=20avere=20RMF=20anche=20con=20curve=20piane=20e=20g?= =?UTF-8?q?arantendo=20la=20retrocompatibilit=C3=A0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GeoTools.cpp | 8 ++++++++ LUA_GdbCreateSurf.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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 ;