3dPrinting :
- gestione uscite differenziate per regioni con diverse passate.
This commit is contained in:
@@ -43,10 +43,6 @@ local function GetLayerParamsForToolPathCalc()
|
||||
LayerParams.dTDiam = EgtGetInfo( s_nPartId, KEY_TOOL_DIAM, 'd')
|
||||
-- Parametri costolature
|
||||
LayerParams.bRibsLink = EgtGetInfo( s_nPartId, KEY_RIBS_LINK, 'b')
|
||||
-- Parametri regioni con diverse passate
|
||||
LayerParams.dShellNbrCoasting = EgtGetInfo( s_nPartId, KEY_SHELL_NBR_COASTING, 'd')
|
||||
LayerParams.dShellNbrWipe = EgtGetInfo( s_nPartId, KEY_SHELL_NBR_WIPE, 'd')
|
||||
LayerParams.dShellNbrWipeDir = EgtGetInfo( s_nPartId, KEY_SHELL_NBR_WIPE_DIR, 'd')
|
||||
|
||||
return LayerParams
|
||||
end
|
||||
@@ -1204,11 +1200,23 @@ function CalcToolPath.Exec( nPartId)
|
||||
if EgtGetName( nLastId or GDB_ID.NULL) == LEAD_OUT_CRV then nLastId = EgtGetPrev( nLastId) end
|
||||
while nId do
|
||||
-- recupero i parametri
|
||||
local dCoastingLen, dWipeLen, dWipeDir
|
||||
local nType = EgtGetInfo( nId, KEY_TYPE, 'i')
|
||||
local bClosed = EgtGetInfo( nId, KEY_CLOSED_CRV, 'b') or false
|
||||
local dCoastingLen = EgtIf( ( nType == TYPE.EXTRA_SHELL or nType == TYPE.EXTRA_OUTER_SHELL) and not bClosed, LayerParams.dShellNbrCoasting, LayerParams.dCoastingLen)
|
||||
local dWipeLen = EgtIf( ( nType == TYPE.EXTRA_SHELL or nType == TYPE.EXTRA_OUTER_SHELL) and not bClosed, LayerParams.dShellNbrWipe, LayerParams.dWipeLen)
|
||||
local dWipeDir = EgtIf( ( nType == TYPE.EXTRA_SHELL or nType == TYPE.EXTRA_OUTER_SHELL) and not bClosed, LayerParams.dShellNbrWipeDir, LayerParams.dWipeDir)
|
||||
if ( nType == TYPE.EXTRA_SHELL or nType == TYPE.EXTRA_OUTER_SHELL) and not bClosed then
|
||||
local bInverted = EgtGetInfo( nId, KEY_INVERTED_CRV, 'b') or false
|
||||
local vCoastLen = EgtGetInfo( nId, KEY_EXTRA_SHELL_COASTING, 'vd')
|
||||
local vWipeLen = EgtGetInfo( nId, KEY_EXTRA_SHELL_WIPE, 'vd')
|
||||
local vWipeDir = EgtGetInfo( nId, KEY_EXTRA_SHELL_WIPE_DIR, 'vd')
|
||||
-- se curva è stata invertita devo prendere le info legate a quello che era il suo punto di inizio, altrimenti prendo le info legate al punto finale
|
||||
dCoastingLen = EgtIf( bInverted, vCoastLen[1], vCoastLen[2])
|
||||
dWipeLen = EgtIf( bInverted, vWipeLen[1], vWipeLen[2])
|
||||
dWipeDir = EgtIf( bInverted, vWipeDir[1], vWipeDir[2])
|
||||
else
|
||||
dCoastingLen = LayerParams.dCoastingLen
|
||||
dWipeLen = LayerParams.dWipeLen
|
||||
dWipeDir = LayerParams.dWipeDir
|
||||
end
|
||||
|
||||
if nId == nLastId then
|
||||
AddRetractionOnLastCrv( nId, nTpathGrpId, LayerParams, dCoastingLen, dWipeLen, dWipeDir)
|
||||
|
||||
Reference in New Issue
Block a user