From 56ce2b317d314bc48e12c6ccfa93b6b683e28eac Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Wed, 5 Feb 2025 10:48:26 +0100 Subject: [PATCH] - cambiata la convenzione per le info di pairing. --- CreateSOLID_FromPartsInPark.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/CreateSOLID_FromPartsInPark.lua b/CreateSOLID_FromPartsInPark.lua index 05db730..3588626 100644 --- a/CreateSOLID_FromPartsInPark.lua +++ b/CreateSOLID_FromPartsInPark.lua @@ -215,7 +215,11 @@ end -- restituisce il valore dell'angolo successivo (se <0 angolo concavo) local function GetnNextAng( nInd) local A = EgtGetInfo( nInd, 'NextAng', 'd') - return A + if not A then + SLD.ERR = 2 + SLD.MSG = 'Non è presente NAng, probabilmente non ci sono le info di machining sugli edge' + end + return A end -- @@ -754,10 +758,12 @@ local function SideAngSolid( tbLoop, bInLoop) end -- -local function CorrectReference() - local sName = EgtGetName( IdFP) +function SLD.CorrectReference(IdPart) + if not IdPart then IdPart = SLD.CurrId end + + local sName = EgtGetName( IdPart) if sName ~= "SOLID" then - local nLayRef = EgtGetFirstNameInGroup( IdFP, "Ref") + local nLayRef = EgtGetFirstNameInGroup( IdPart, "Ref") local nRef = EgtGetFirstInGroup(nLayRef) while nRef do -- controllo se l'offset ai riferimenti è già stato eseguito @@ -778,7 +784,7 @@ local function CorrectReference() table.insert(vtDir, EgtEvalNumExpr(sDir)) end vtDir = Vector3d(vtDir) - EgtMove(nRef,vtDir, GDB_RT.GLOB) + EgtMove(nRef,vtDir, GDB_RT.LOC) end -- setto l'info che certifica che l'offset è stato eseguito EgtSetInfo(nRef, 'OffsetDone', true) @@ -914,7 +920,7 @@ local function Draw(bPreview) OnPathSolid() -- WIREFRAME ---- Correzione dei riferimenti - CorrectReference() + SLD.CorrectReference(IdFP) ExtractBoundaryAndFaces()