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