3dPrinting 2.7a1 :

- modificati i controlli per il valore di ritorno di EgtGetNameInGroup.
This commit is contained in:
SaraP
2025-01-31 11:05:57 +01:00
parent b0ebb4a871
commit 000bd0091f
5 changed files with 19 additions and 19 deletions
+9 -9
View File
@@ -21,7 +21,7 @@ local s_vtSlicing
local s_dOffsTol = 50 * GEO.EPS_SMALL
---------------------------------------------------------------------
local function GetLayerParamsForPathCalc()
local function GetLayerParamsForPathCalc()
local LayerParams = {}
LayerParams.bSpiralVase = EgtGetInfo( s_nPartId, KEY_SPIRAL_VASE, 'b') or false
LayerParams.nShellsNbr = EgtGetInfo( s_nPartId, KEY_SHELLS_NBR, 'i')
@@ -451,7 +451,8 @@ end
---------------------------------------------------------------------------
local function ReorderPath( vOldIds, vNewIds)
if not vNewIds or not vOldIds then return end
if not vNewIds or #vNewIds == 0 then return end
if not vOldIds or #vOldIds == 0 then return end
-- suddivido in base alla tipologia di loop ( esterno o interno)
local tOldIds = {{}, {}}
@@ -980,7 +981,7 @@ end
-------------------------------------------------------------------
local function FindHoleCurve( pt, vLoopIds)
-- trovo indice della curva di vLoopIds a cui appartiene pt ( in globale)
if not vLoopIds then return end
if not vLoopIds or #vLoopIds == 0 then return end
for i = 1, #vLoopIds do
local dPar = EgtCurveParamAtPoint( vLoopIds[i], pt, 100 * GEO.EPS_SMALL, GDB_RT.GLOB)
if dPar then
@@ -1726,13 +1727,12 @@ end
local function HandleRibsIntersections( nRibsGrp, nOffsGrp, nRibsPathGrp, nSrfInt, nSrfExt, bAllTwoStrands, vTypeSequence, nLoopGrp, tSurfOffs)
local bSpecialCase = false
local vOffsIds = EgtGetNameInGroup( nRibsPathGrp, RIBS_CRV .. '*') -- passate dei setti
local vAllRibsIds = EgtGetNameInGroup( nRibsGrp, RIBS_CRV .. '*') -- setti originali
local vRibsIds = {}
-- ignoro setti che non hanno passate corrispondenti
for i = 1, #vAllRibsIds do
local vOffs = EgtGetNameInGroup( nRibsPathGrp, EgtGetName( vAllRibsIds[i]))
if vOffs then table.insert( vRibsIds, vAllRibsIds[i]) end
if vOffs and #vOffs > 0 then table.insert( vRibsIds, vAllRibsIds[i]) end
end
-- creo un gruppo con frame locale per calcolare le intersezioni ( è il piano XY locale dove calcolare intersezioni)
@@ -2807,7 +2807,7 @@ local function HandleRibsIntersectionForRibsMergedShells( vOrigRibs, nRibsGrp, n
-- ignoro setti che non hanno passate corrispondenti
for i = 1, #vOrigRibs do
local vOffs = EgtGetNameInGroup( nRibsGrp, EgtGetName( vOrigRibs[i]))
if vOffs then table.insert( vRibsIds, vOrigRibs[i]) end
if vOffs and #vOffs > 0 then table.insert( vRibsIds, vOrigRibs[i]) end
end
-- creo un gruppo con frame locale per calcolare le intersezioni ( è il piano XY locale dove calcolare intersezioni)
@@ -3752,7 +3752,7 @@ local function ReorderExtraShells( nPathGrp, vPtStart, LayerParams)
end
local vIds = EgtGetNameInGroup( nPathGrp, EXTRA_SHELL_CRV .. '*')
if not vIds then return end
if not vIds or #vIds == 0 then return end
-- eventuale inversione di tutte le curve
if LayerParams.bPrintInvert then
@@ -4101,7 +4101,7 @@ end
local function AddExtraZigZag( nSrf, sName, dStrand, nGrp, nSrfTrim)
local vIds = EgtGetNameInGroup( nGrp, sName)
if not vIds then return end
if not vIds or #vIds == 0 then return end
local vtDir = EgtSV( vIds[1], GDB_ID.ROOT)
local vtYLoc = s_vtSlicing ^ vtDir
@@ -4308,7 +4308,7 @@ function CalcPaths.Exec( nPartId)
s_nPartId = nPartId
local vLayIds = EgtGetNameInGroup( s_nPartId, SLICE_LAYER.."*")
if not vLayIds then
if not vLayIds or #vLayIds == 0 then
EgtOutBox( 'Error no slice', 'PathCalc')
return true
end