- 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:
@@ -8,6 +8,7 @@ local LeadInOutLib = {}
|
||||
require( 'EgtBase')
|
||||
local BeamData = require( 'BeamDataNew')
|
||||
local FaceData = require( 'FaceData')
|
||||
local BeamLib = require( 'BeamLib')
|
||||
|
||||
EgtOutLog( ' LeadInOutLib started', 1)
|
||||
|
||||
@@ -99,7 +100,7 @@ end
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function LeadInOutLib.CalculateLeadInOut( sLeadInOutType, Parameters)
|
||||
function LeadInOutLib.CalculateLeadInOut( sLeadInOutType, Parameters, OptionalParameters)
|
||||
|
||||
-- parametri obbligatori
|
||||
local Face = Parameters.Face
|
||||
@@ -108,6 +109,11 @@ function LeadInOutLib.CalculateLeadInOut( sLeadInOutType, Parameters)
|
||||
local Tool = Parameters.Tool
|
||||
local dDepthToMachine = Parameters.dDepthToMachine
|
||||
|
||||
-- parametri opzionali
|
||||
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
||||
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
||||
local bMoveAfterSplit = OptionalParameters.bMoveAfterSplit or false
|
||||
|
||||
local LeadInOut = {}
|
||||
local bIsStartClosed = not Edge.bIsStartOpen
|
||||
local bIsEndClosed = not Edge.bIsEndOpen
|
||||
@@ -159,8 +165,18 @@ function LeadInOutLib.CalculateLeadInOut( sLeadInOutType, Parameters)
|
||||
local ptEndBladeCenter = ptEndAtDepth + Edge.vtN * Tool.dDiameter / 2
|
||||
|
||||
-- box per calcolo uscita lama
|
||||
-- se è un taglio di testa o coda oppure se di coda e non si sposta dopo separazione va aggiunto il sovramateriale
|
||||
local b3BoxPartExpanded = BBox3d( Part.b3Part)
|
||||
if bCannotSplitRestLength or ( not bMoveAfterSplit) then
|
||||
if ( sRestLengthSideForPreSimulation == 'Head') or Part.bIsLastPart then
|
||||
b3BoxPartExpanded = BeamLib.GetPartBoxWithHeadTailOvermaterial( Part, sRestLengthSideForPreSimulation)
|
||||
elseif sRestLengthSideForPreSimulation == 'Tail' then
|
||||
local ptPointAtRestLength = Point3d( b3BoxPartExpanded:getMin():getX() - Part.dRestLength, b3BoxPartExpanded:getMin():getY(), b3BoxPartExpanded:getMin():getZ())
|
||||
b3BoxPartExpanded:Add( ptPointAtRestLength)
|
||||
end
|
||||
end
|
||||
-- il box si espande in tutte le direzioni per contemplare la sicurezza CUT_SIC
|
||||
local b3BoxPartExpanded = BBox3d( Part.b3Part) ; b3BoxPartExpanded:expand( BeamData.CUT_SIC)
|
||||
b3BoxPartExpanded:expand( BeamData.CUT_SIC)
|
||||
|
||||
-- calcolo attacco scelto
|
||||
if sLeadInOutType == 'Perpendicular' then
|
||||
|
||||
Reference in New Issue
Block a user