- in BeamLib creata funzione GetPartBoxWithHeadTailOvermaterial per recuperare il box della parte con aggiunto il sovramateriale di testa e/o coda; implementata in vari punti

- in LeadInOutLib e PreSimulationLib se necessario si estende il box per contemplare materiale in testa e in coda
This commit is contained in:
luca.mazzoleni
2026-01-28 15:59:35 +01:00
parent 995917672c
commit ee4d443074
9 changed files with 93 additions and 39 deletions
+9 -9
View File
@@ -69,15 +69,15 @@ end
local function GetRestlengthSurfTm( Part, sRestLengthSideForPreSimulation)
-- si costruisce il box in globale
local b3RestLength = BBox3d()
if sRestLengthSideForPreSimulation == 'Tail' then
local ptRestLengthMax = Point3d( Part.b3Part:getMin()) + X_AX() * 500 * GEO.EPS_SMALL
local ptRestLengthMin = Point3d( Part.b3Part:getMin():getX() - Part.dRestLength, Part.b3Part:getMax():getY(), Part.b3Part:getMax():getZ())
b3RestLength = BBox3d( ptRestLengthMin, ptRestLengthMax)
elseif sRestLengthSideForPreSimulation == 'Head' then
local ptRestLengthMin = Point3d( Part.b3Part:getMax() - X_AX() * 500 * GEO.EPS_SMALL)
local ptRestLengthMax = Point3d( Part.b3Part:getMaX():getX() + Part.dHeadOverMaterial, Part.b3Part:getMin():getY(), Part.b3Part:getMin():getZ())
b3RestLength = BBox3d( ptRestLengthMin, ptRestLengthMax)
local b3RestLength
if ( sRestLengthSideForPreSimulation == 'Head') or Part.bIsLastPart then
b3RestLength = BeamLib.GetPartBoxWithHeadTailOvermaterial( Part, sRestLengthSideForPreSimulation)
elseif sRestLengthSideForPreSimulation == 'Tail' then
b3RestLength = BBox3d( Part.b3Part)
local ptPointAtRestLength = Point3d( b3RestLength:getMin():getX() - Part.dRestLength, b3RestLength:getMin():getY(), b3RestLength:getMin():getZ())
b3RestLength:Add( ptPointAtRestLength)
else
b3RestLength = BBox3d( Part.b3Part)
end
-- si crea la trimesh dal box