From be4575e9842da7f96dfedfeed26e318486398595 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 7 Apr 2026 14:58:39 +0200 Subject: [PATCH] =?UTF-8?q?-=20in=20DtMortise=20->=20CalcPathAtHeight=20or?= =?UTF-8?q?a=20lo=20spostamento=20viene=20fatto=20correttamente=20anche=20?= =?UTF-8?q?nel=20caso=20di=20pi=C3=B9=20curve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessDtMortise.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/LuaLibs/ProcessDtMortise.lua b/LuaLibs/ProcessDtMortise.lua index 8dd4887..a38a4d9 100644 --- a/LuaLibs/ProcessDtMortise.lua +++ b/LuaLibs/ProcessDtMortise.lua @@ -136,9 +136,11 @@ local function CalcPathAtHeight( nProcId, AuxId, nAddGrpId, dHeight, dSideAng, b local vtBoxDiag = b3Solid:getMax() - b3Solid:getMin() local nCount NewAuxId, nCount = EgtTrimFlatCurveWithBox( NewAuxId, refBox, vtBoxDiag, true, true, GDB_RT.GLOB) - -- eseguo traslazione e offset per portarla sul top + -- per ogni curva creata, eseguo traslazione e offset per portarla sul top local vtMove = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) * ( dHeight - 10 * GEO.EPS_SMALL) - EgtMove( NewAuxId, vtMove, GDB_RT.GLOB) + for i = 1, nCount do + EgtMove( NewAuxId + i - 1, vtMove, GDB_RT.GLOB) + end -- se divisa in più parti, le unisco congiungendole con segmenti if nCount > 1 then if EgtGetType( NewAuxId) ~= GDB_TY.CRV_COMPO then @@ -147,7 +149,7 @@ local function CalcPathAtHeight( nProcId, AuxId, nAddGrpId, dHeight, dSideAng, b for i = 2, nCount do local CrvId = NewAuxId + i - 1 local ptStart = EgtSP( CrvId) - EgtAddCurveCompoLine( NewAuxId, ptStart) + EgtAddCurveCompoLine( NewAuxId, ptStart) EgtAddCurveCompoCurve( NewAuxId, CrvId) end end