- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user