From 8a127f39ee1567ef467443bd2c424ef7af20f51b Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Fri, 16 May 2025 11:27:11 +0200 Subject: [PATCH] In STR0007, corretto Offset per antischeggia su mortasa a coda di rondine --- Strategies/Standard/STR0007/STR0007.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Strategies/Standard/STR0007/STR0007.lua b/Strategies/Standard/STR0007/STR0007.lua index fbcd96e..2ecf853 100644 --- a/Strategies/Standard/STR0007/STR0007.lua +++ b/Strategies/Standard/STR0007/STR0007.lua @@ -186,16 +186,20 @@ local function CalcTopPath( nProcId, AuxId, nAddGrpId, dAltMort, dSideAng, b3Sol EgtAddCurveCompoLineTg( NewAuxId, 100, false) EgtAddCurveCompoLineTg( NewAuxId, 100, true) EgtMergeCurvesInCurveCompo( NewAuxId) - -- eseguo traslazione e offset per portarla sul top - local vtMove = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) * ( dAltMort - 10 * GEO.EPS_SMALL) - EgtMove( NewAuxId, vtMove, GDB_RT.GLOB) + local dOffset = dAltMort * tan( dSideAng) - if not EgtOffsetCurve( NewAuxId, dOffset) then return end + if not EgtOffsetCurveAdv( NewAuxId, dOffset) then return end + -- la limito entro la trave local refBox = Frame3d( b3Solid:getMin()) 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 + local vtMove = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) * ( dAltMort - 10 * GEO.EPS_SMALL) + EgtMove( NewAuxId, vtMove, GDB_RT.GLOB) + -- se divisa in più parti, le unisco congiungendole con segmenti if nCount > 1 then if EgtGetType( NewAuxId) ~= GDB_TY.CRV_COMPO then