//---------------------------------------------------------------------------- // EgalTech 2015-2015 //---------------------------------------------------------------------------- // File : LUA_GdbModifySurf.cpp Data : 09.03.15 Versione : 1.6b6 // Contenuto : Funzioni di modifica delle superfici per LUA. // // // // Modifiche : 09.03.15 DS Creazione modulo. // // //---------------------------------------------------------------------------- //--------------------------- Include ---------------------------------------- #include "stdafx.h" #include "LUA.h" #include "EXE_Const.h" #include "/EgtDev/Include/EXeExecutor.h" #include "/EgtDev/Include/EXeConst.h" #include "/EgtDev/Include/EGkCurve.h" #include "/EgtDev/Include/EGkSurfTriMeshAux.h" #include "/EgtDev/Include/EGkGdbConst.h" #include "/EgtDev/Include/EGkLuaAux.h" using namespace std ; //---------------------------------------------------------------------------- static int LuaInvertSurf( lua_State* L) { // 1 parametro : Id/s INTVECTOR vId ; LuaCheckParam( L, 1, vId) LuaClearStack( L) ; // eseguo inversione superfici bool bOk = ExeInvertSurface( vId) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaExplodeSurf( lua_State* L) { // 1 parametro : Id int nId ; LuaCheckParam( L, 1, nId) LuaClearStack( L) ; // esplosione della superficie int nCount ; int nFirstId = ExeExplodeSurface( nId, &nCount) ; if ( nFirstId != GDB_ID_NULL) LuaSetParam( L, nFirstId) ; else LuaSetParam( L) ; LuaSetParam( L, nCount) ; return 2 ; } //------------------------------------------------------------------------------- static int LuaApproxSurf( lua_State* L) { // 1 o 2 parametri : Id [, dLinTol [, dTriaMinSide]] int nId ; LuaCheckParam( L, 1, nId) double dLinTol = LIN_TOL_SRF ; double dTriaMinSide = 100 * EPS_SMALL ; if ( LuaGetParam( L, 2, dLinTol)) LuaGetParam( L, 3, dTriaMinSide) ; LuaClearStack( L) ; // approssimazione della superficie bool bOk = ExeApproxSurface( nId, dLinTol, dTriaMinSide) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfFrAdd( lua_State* L) { // 2 parametro : Id1, Id2 int nId1 ; LuaCheckParam( L, 1, nId1) int nId2 ; LuaCheckParam( L, 2, nId2) LuaClearStack( L) ; // unisco alla prima regione la seconda bool bOk = ExeSurfFrAdd( nId1, nId2) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfFrSubtract( lua_State* L) { // 2 parametro : Id1, Id2 int nId1 ; LuaCheckParam( L, 1, nId1) int nId2 ; LuaCheckParam( L, 2, nId2) LuaClearStack( L) ; // sottraggo dalla prima regione la seconda bool bOk = ExeSurfFrSubtract( nId1, nId2) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfFrIntersect( lua_State* L) { // 2 parametro : Id1, Id2 int nId1 ; LuaCheckParam( L, 1, nId1) int nId2 ; LuaCheckParam( L, 2, nId2) LuaClearStack( L) ; // interseco la prima regione con la seconda bool bOk = ExeSurfFrIntersect( nId1, nId2) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfFrOffset( lua_State* L) { // 3 parametri : Id, dDist, nType int nId ; LuaCheckParam( L, 1, nId) double dDist ; LuaCheckParam( L, 2, dDist) int nType = ICurve::OFF_FILLET ; LuaGetParam( L, 3, nType) ; LuaClearStack( L) ; // eseguo l'offset della regione bool bOk = ExeSurfFrOffset( nId, dDist, nType) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfFrOffsetAdv( lua_State* L) { // 3 parametri : Id, dDist, nType int nId ; LuaCheckParam( L, 1, nId) double dDist ; LuaCheckParam( L, 2, dDist) int nType = ICurve::OFF_FILLET ; LuaGetParam( L, 3, nType) ; LuaClearStack( L) ; // eseguo l'offset della regione int nNewId = GDB_ID_NULL ; bool bOk = ExeSurfFrOffsetAdv( nId, dDist, nType, nNewId) ; if ( bOk) LuaSetParam( L, nNewId) ; else LuaSetParam( L) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfFrEraseChunk( lua_State* L) { // 2 parametri : Id, nChunk int nId ; LuaCheckParam( L, 1, nId) int nChunk ; LuaCheckParam( L, 2, nChunk) LuaClearStack( L) ; // eseguo l'offset della regione bool bOk = ExeSurfFrEraseChunk( nId, nChunk) ; LuaSetParam( L, bOk) ; return 1 ; } //---------------------------------------------------------------------------- static int LuaSurfTmMoveVertex( lua_State* L) { // 3 o 4 o 5 parametri : nId, nVert, ptNewVert [, nRefId] [, bUpdate] int nId ; LuaCheckParam( L, 1, nId) int nVert ; LuaCheckParam( L, 2, nVert) Point3d ptNewVert ; LuaCheckParam( L, 3, ptNewVert) int nRefType = RTY_DEFAULT ; bool bUpdate = true ; if ( LuaGetParam( L, 4, nRefType)) LuaGetParam( L, 5, bUpdate) ; else LuaGetParam( L, 4, bUpdate) ; LuaClearStack( L) ; // sposto il vertice di indice dato della trimesh bool bOk = ExeSurfTmMoveVertex( nId, nVert, ptNewVert, nRefType, bUpdate) ; LuaSetParam( L, bOk) ; return 1 ; } //---------------------------------------------------------------------------- static int LuaSurfTmMoveFacet( lua_State* L) { // 3 o 4 o 5 parametri : nId, nFacet, vtMove [, nRefId] [, bUpdate] int nId ; LuaCheckParam( L, 1, nId) int nFacet ; LuaCheckParam( L, 2, nFacet) Vector3d vtMove ; LuaCheckParam( L, 3, vtMove) int nRefType = RTY_DEFAULT ; bool bUpdate = true ; if ( LuaGetParam( L, 4, nRefType)) LuaGetParam( L, 5, bUpdate) ; else LuaGetParam( L, 4, bUpdate) ; LuaClearStack( L) ; // sposto la faccia di indice dato della trimesh bool bOk = ExeSurfTmMoveFacet( nId, nFacet, vtMove, nRefType, bUpdate) ; LuaSetParam( L, bOk) ; return 1 ; } //---------------------------------------------------------------------------- static int LuaSurfTmToTriangles( lua_State* L) { // 1 parametro : nId int nId ; LuaCheckParam( L, 1, nId) LuaClearStack( L) ; // esplosione della trimesh in triangoli int nCount ; int nFirstId = ExeSurfTmToTriangles( nId, &nCount) ; if ( nFirstId != GDB_ID_NULL) LuaSetParam( L, nFirstId) ; else LuaSetParam( L) ; LuaSetParam( L, nCount) ; return 2 ; } //---------------------------------------------------------------------------- static int LuaSurfTmRemoveFacet( lua_State* L) { // 2 parametri : nId, nFacet int nId ; LuaCheckParam( L, 1, nId) int nFacet ; LuaCheckParam( L, 2, nFacet) LuaClearStack( L) ; // eseguo rimozione della faccia dalla superficie bool bOk = ExeSurfTmRemoveFacet( nId, nFacet) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ; } //---------------------------------------------------------------------------- static int LuaSurfTmSwapFacets( lua_State* L) { // 3 parametri : nId, nFacet1, nFacet2 int nId ; LuaCheckParam( L, 1, nId) int nFacet1 ; LuaCheckParam( L, 2, nFacet1) int nFacet2 ; LuaCheckParam( L, 3, nFacet2) LuaClearStack( L) ; // eseguo scambio facce della superficie bool bOk = ExeSurfTmSwapFacets( nId, nFacet1, nFacet2) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ; } //---------------------------------------------------------------------------- static int LuaSurfTmRemovePart( lua_State* L) { // 2 parametri : nId, nPart int nId ; LuaCheckParam( L, 1, nId) int nPart ; LuaCheckParam( L, 2, nPart) LuaClearStack( L) ; // eseguo rimozione della parte dalla superficie bool bOk = ExeSurfTmRemovePart( nId, nPart) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ; } //---------------------------------------------------------------------------- static int LuaCutSurfTmPlane( lua_State* L) { // 4 o 5 parametri : Id, ptOn, vtN, bSaveOnEq [, nRefType] int nId ; LuaCheckParam( L, 1, nId) Point3d ptOn ; LuaCheckParam( L, 2, ptOn) Vector3d vtN ; LuaCheckParam( L, 3, vtN) bool bSaveOnEq ; LuaGetParam( L, 4, bSaveOnEq) ; int nRefType = RTY_DEFAULT ; LuaGetParam( L, 5, nRefType) ; LuaClearStack( L) ; // taglio la superficie con ilpiano bool bOk = ExeCutSurfTmPlane( nId, ptOn, vtN, bSaveOnEq, nRefType) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ; } //---------------------------------------------------------------------------- static int LuaCutSurfTmClosedCurve( lua_State* L) { // 3 parametri : SurfId, CurveId, bSaveOnEq int nSurfId ; LuaCheckParam( L, 1, nSurfId) int nCurveId ; LuaCheckParam( L, 2, nCurveId) bool bSaveOnEq ; LuaGetParam( L, 3, bSaveOnEq) ; LuaClearStack( L) ; // taglio la superficie con ilpiano bool bOk = ExeCutSurfTmClosedCurve( nSurfId, nCurveId, bSaveOnEq) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmAdd( lua_State* L) { // 2 o 3 parametri : Id1, Id2 [, bTwoColors] int nId1 ; LuaCheckParam( L, 1, nId1) int nId2 ; LuaCheckParam( L, 2, nId2) bool bTwoColors = false ; LuaGetParam( L, 3, bTwoColors) ; LuaClearStack( L) ; // unisco alla prima superficie la seconda bool bOk = ExeSurfTmAdd( nId1, nId2, bTwoColors) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmSubtract( lua_State* L) { // 2 o 3 parametri : Id1, Id2 [, bTwoColors] int nId1 ; LuaCheckParam( L, 1, nId1) int nId2 ; LuaCheckParam( L, 2, nId2) bool bTwoColors = false ; LuaGetParam( L, 3, bTwoColors) ; LuaClearStack( L) ; // sottraggo dalla prima superficie la seconda bool bOk = ExeSurfTmSubtract( nId1, nId2, bTwoColors) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmIntersect( lua_State* L) { // 2 o 3 parametri : Id1, Id2 [, bTwoColors] int nId1 ; LuaCheckParam( L, 1, nId1) int nId2 ; LuaCheckParam( L, 2, nId2) bool bTwoColors = false ; LuaGetParam( L, 3, bTwoColors) ; LuaClearStack( L) ; // interseco la prima superficie con la seconda bool bOk = ExeSurfTmIntersect( nId1, nId2, bTwoColors) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmSplit( lua_State* L) { // 2 parametri : nId, nSplitterId int nId ; LuaCheckParam( L, 1, nId) int nSplitterId ; LuaCheckParam( L, 2, nSplitterId) LuaClearStack( L) ; // divido la prima superficie in base alla seconda int nCount ; int nFirstId = ExeSurfTmSplit( nId, nSplitterId, &nCount) ; if ( nFirstId != GDB_ID_NULL) LuaSetParam( L, nFirstId) ; else LuaSetParam( L) ; LuaSetParam( L, nCount) ; return 2 ; } //------------------------------------------------------------------------------- static int LuaSurfTmCut( lua_State* L) { // 4 parametri : nId, nCutterId, bInVsOut, bOn int nId ; LuaCheckParam( L, 1, nId) int nCutterId ; LuaCheckParam( L, 2, nCutterId) bool bInVsOut ; LuaCheckParam( L, 3, bInVsOut) bool bOn ; LuaCheckParam( L, 4, bOn) LuaClearStack( L) ; // taglio la prima superficie in base alla seconda bool bOk = ExeSurfTmCut( nId, nCutterId, bInVsOut, bOn) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmSubtractProjectedFacesOnFace( lua_State* L) { // 3 o 4 o 5 parametri : nSurfId, nFaceInd, nDestGrpId [, vSurfsId] [, bOCFlag] int nSurfId ; LuaCheckParam( L, 1, nSurfId) ; int nFaceInd ; LuaCheckParam( L, 2, nFaceInd) ; int nDestGrpId ; LuaCheckParam( L, 3, nDestGrpId) ; INTVECTOR vSurfsId ; bool bOCFlag = true ; if ( LuaGetParam( L, 4, vSurfsId)) LuaGetParam( L, 5, bOCFlag) ; else LuaGetParam( L, 4, bOCFlag) ; LuaClearStack( L) ; // sottraggo alla faccia scelta la proiezione delle altre TriMesh int nNewId = GDB_ID_NULL; bool bExistProjection = false ; int nNewFaceNbr = 0 ; bool bOk = ExeSurfTmSubtractProjectedFacesOnFace( nSurfId, nFaceInd, nDestGrpId, vSurfsId, bOCFlag, bExistProjection, nNewId, nNewFaceNbr) ; LuaSetParam( L, bOk) ; LuaSetParam( L, bExistProjection) ; if ( nNewId != GDB_ID_NULL) LuaSetParam( L, nNewId) ; else LuaSetParam( L) ; LuaSetParam( L, nNewFaceNbr) ; return 4 ; } //------------------------------------------------------------------------------- static int LuaSurfTmSetFaceColor( lua_State* L) { // 3 parametri : Id, nFacet, nColor int nId ; LuaCheckParam( L, 1, nId) int nFacet ; LuaCheckParam( L, 2, nFacet) int nColor ; LuaCheckParam( L, 3, nColor) LuaClearStack( L) ; // imposto il colore alla faccia della superficie TM bool bOk = ExeSurfTmSetFaceColor( nId, nFacet, nColor) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmGetTriaColor( lua_State* L) { // 2 parametri : Id, nTria int nId ; LuaCheckParam( L, 1, nId) int nTria ; LuaCheckParam( L, 2, nTria) LuaClearStack( L) ; // recupero il flag di colore del triangolo della superficie TM int nColor ; bool bOk = ExeSurfTmGetTriaColor( nId, nTria, nColor) ; if ( bOk) LuaSetParam( L, nColor) ; else LuaSetParam( L) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmResetTwoColors( lua_State* L) { // 1 parametro : Id int nId ; LuaCheckParam( L, 1, nId) LuaClearStack( L) ; // eseguo reset TFlag per annullare due colori bool bOk = ExeSurfTmResetTwoColors( nId) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmSetShowEdges( lua_State* L) { // 2 parametri : Id, bShow int nId ; LuaCheckParam( L, 1, nId) bool bShow ; LuaCheckParam( L, 2, bShow) ; LuaClearStack( L) ; // imposto flag visualizzazione spigoli vivi bool bOk = ExeSurfTmSetShowEdges( nId, bShow) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmGetShowEdges( lua_State* L) { // 1 parametro : Id int nId ; LuaCheckParam( L, 1, nId) LuaClearStack( L) ; // recupero il flag di visualizzazione degli spigoli vivi della superficie TM bool bShow ; bool bOk = ExeSurfTmGetShowEdges( nId, bShow) ; if ( bOk) LuaSetParam( L, bShow) ; else LuaSetParam( L) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmSetSmoothAng( lua_State* L) { // 2 parametri : nId, dAngDeg int nId ; LuaCheckParam( L, 1, nId) double dAngDeg ; LuaCheckParam( L, 2, dAngDeg) LuaClearStack( L) ; // aggiorno lo smooth angle della superficie bool bOk = ExeSurfTmSetSmoothAng( nId, dAngDeg) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmGetSmoothAng( lua_State* L) { // 1 parametro : nId int nId ; LuaCheckParam( L, 1, nId) LuaClearStack( L) ; // recupero lo smooth angle della superficie double dAngDeg ; bool bOk = ExeSurfTmGetSmoothAng( nId, dAngDeg) ; if ( bOk) LuaSetParam( L, dAngDeg) ; else LuaSetParam( L) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmOffset( lua_State* L) { // 4 o 5 parametri : ParentId, vIds, dOffs, dLinTol [, nType] int nParentId ; LuaGetParam( L, 1, nParentId) ; INTVECTOR vIds ; LuaCheckParam( L, 2, vIds) double dOffs ; LuaCheckParam( L, 3, dOffs) double dLinTol ; LuaCheckParam( L, 4, dLinTol) ; int nType = STMOFF_FILLET ; LuaGetParam( L, 5, nType) ; LuaClearStack( L) ; // interseco la prima superficie con la seconda int nId = ExeSurfTmOffset( nParentId, vIds, dOffs, dLinTol, nType) ; LuaSetParam( L, nId) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfTmThickeningOffset( lua_State* L) { // 4 o 5 parametri : ParentId, vIds, dOffs, dLinTol [, nType] int nParentId ; LuaGetParam( L, 1, nParentId) ; INTVECTOR vIds ; LuaCheckParam( L, 2, vIds) double dOffs ; LuaCheckParam( L, 3, dOffs) double dLinTol ; LuaCheckParam( L, 4, dLinTol) ; int nType = STMOFF_FILLET ; LuaGetParam( L, 5, nType) ; LuaClearStack( L) ; // interseco la prima superficie con la seconda int nId = ExeSurfTmThickeningOffset( nParentId, vIds, dOffs, dLinTol, nType) ; LuaSetParam( L, nId) ; return 1 ; } //---------------------------------------------------------------------------- static int LuaCutSurfBzPlane( lua_State* L) { // 4 o 5 parametri : Id, ptOn, vtN, bSaveOnEq [, nRefType] int nId ; LuaCheckParam( L, 1, nId) Point3d ptOn ; LuaCheckParam( L, 2, ptOn) Vector3d vtN ; LuaCheckParam( L, 3, vtN) bool bSaveOnEq ; LuaGetParam( L, 4, bSaveOnEq) ; int nRefType = RTY_DEFAULT ; LuaGetParam( L, 5, nRefType) ; LuaClearStack( L) ; // taglio la superficie con ilpiano bool bOk = ExeCutSurfBzPlane( nId, ptOn, vtN, bSaveOnEq, nRefType) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- static int LuaSurfBzTrim( lua_State* L) { // 2 parametri : nId, nCutterId int nId ; LuaCheckParam( L, 1, nId) int nCutterId ; LuaCheckParam( L, 2, nCutterId) LuaClearStack( L) ; // taglio la prima superficie in base alla seconda bool bOk = ExeSurfBzTrim( nId, nCutterId) ; LuaSetParam( L, bOk) ; return 1 ; } //------------------------------------------------------------------------------- bool LuaInstallGdbModifySurf( LuaMgr& luaMgr) { bool bOk = true ; bOk = bOk && luaMgr.RegisterFunction( "EgtInvertSurf", LuaInvertSurf) ; bOk = bOk && luaMgr.RegisterFunction( "EgtExplodeSurf", LuaExplodeSurf) ; bOk = bOk && luaMgr.RegisterFunction( "EgtApproxSurf", LuaApproxSurf) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfFrAdd", LuaSurfFrAdd) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfFrSubtract", LuaSurfFrSubtract) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfFrIntersect", LuaSurfFrIntersect) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfFrOffset", LuaSurfFrOffset) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfFrOffsetAdv", LuaSurfFrOffsetAdv) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfFrEraseChunk", LuaSurfFrEraseChunk) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmMoveVertex", LuaSurfTmMoveVertex) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmMoveFacet", LuaSurfTmMoveFacet) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmToTriangles", LuaSurfTmToTriangles) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmRemoveFacet", LuaSurfTmRemoveFacet) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmSwapFacets", LuaSurfTmSwapFacets) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmRemovePart", LuaSurfTmRemovePart) ; bOk = bOk && luaMgr.RegisterFunction( "EgtCutSurfTmPlane", LuaCutSurfTmPlane) ; bOk = bOk && luaMgr.RegisterFunction( "EgtCutSurfTmClosedCurve", LuaCutSurfTmClosedCurve) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmAdd", LuaSurfTmAdd) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmSubtract", LuaSurfTmSubtract) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmIntersect", LuaSurfTmIntersect) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmSplit", LuaSurfTmSplit) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmCut", LuaSurfTmCut) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmSubtractProjectedFacesOnFace", LuaSurfTmSubtractProjectedFacesOnFace) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmSetFaceColor", LuaSurfTmSetFaceColor) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmGetTriaColor", LuaSurfTmGetTriaColor) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmResetTwoColors", LuaSurfTmResetTwoColors) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmSetShowEdges", LuaSurfTmSetShowEdges) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmGetShowEdges", LuaSurfTmGetShowEdges) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmSetSmoothAng", LuaSurfTmSetSmoothAng) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmGetSmoothAng", LuaSurfTmGetSmoothAng) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmOffset", LuaSurfTmOffset) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmThickeningOffset", LuaSurfTmThickeningOffset) ; bOk = bOk && luaMgr.RegisterFunction( "EgtCutSurfBzPlane", LuaCutSurfBzPlane) ; bOk = bOk && luaMgr.RegisterFunction( "EgtSurfBzTrim", LuaSurfBzTrim) ; return bOk ; }