- In STR0001 aggiunta lavorazione ti riduzione tenone in caso di P14>0

- Aggiornata gestione in BCS per Essetre
- Aggiunta funzione che verifica se un punto si trova su estremità box del pezzo
This commit is contained in:
andrea.villa
2025-09-03 09:15:02 +02:00
parent 7eff64d3bb
commit 0e4aeb49b8
3 changed files with 95 additions and 10 deletions
+15 -7
View File
@@ -118,6 +118,19 @@ function BeamLib.AddPhaseWithRawParts( idRaw, OriXR, PosXR, dDeltaSucc)
end
end
---------------------------------------------------------------------
function BeamLib.IsPointOnBoxLimit( ptPointToCheck, b3Solid)
local bOnBoxLimit = false
if abs( ptPointToCheck:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL or
abs( ptPointToCheck:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL or
abs( ptPointToCheck:getY() - b3Solid:getMax():getY()) < 100 * GEO.EPS_SMALL or
abs( ptPointToCheck:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL or
abs( ptPointToCheck:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL or
abs( ptPointToCheck:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL then
bOnBoxLimit = true
end
return bOnBoxLimit
end
---------------------------------------------------------------------
function BeamLib.SetOpenSide( nPathInt, b3Solid)
-- fondo tra loro le curve compatibili
@@ -130,14 +143,9 @@ function BeamLib.SetOpenSide( nPathInt, b3Solid)
-- se segmento di retta
if EgtCurveCompoRadius( nPathInt, i) == -1 then
-- verifico se giace in uno dei piani limite del pezzo quindi se è un lato aperto
local ptIni = EgtUP( nPathInt, i, GDB_RT.GLOB)
local ptIni = EgtUP( nPathInt, i, GDB_RT.GLOB)
local ptFin = EgtUP( nPathInt, i + 1, GDB_RT.GLOB)
if ( abs( ptIni:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL and abs( ptFin:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL and abs( ptFin:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getY() - b3Solid:getMax():getY()) < 100 * GEO.EPS_SMALL and abs( ptFin:getY() - b3Solid:getMax():getY()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL and abs( ptFin:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL and abs( ptFin:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL and abs( ptFin:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL) then
if BeamLib.IsPointOnBoxLimit( ptIni, b3Solid) and BeamLib.IsPointOnBoxLimit( ptFin, b3Solid) then
-- aggiorno il vettore dei lati aperti
table.insert( vOpen, i)
end