3dPrinting 3.1d1 :
- slicing multiplanare 45° - correzioni nel solidi e nella correzione in Z per multiplanare - piccola modifica stilistica al file delle costanti.
This commit is contained in:
+23
-15
@@ -96,25 +96,33 @@ local function AddZCorrection( LayerParams)
|
||||
local nSlicingType = EgtGetInfo( s_nPartId, KEY_SLICING_TYPE, 'i')
|
||||
|
||||
-- 1) correzione per il pezzo
|
||||
local dHBox = EgtGetInfo( s_nPartId, KEY_BOX_MIN_Z, 'i') or 0
|
||||
local dHBox = EgtGetInfo( s_nPartId, KEY_BOX_MIN_Z, 'd') or 0
|
||||
local dCorrZ = 0
|
||||
|
||||
-- se slicing multiplanare vtSlicing cambia ad ogni layer quindi la correzione deve essere calcolata sul singolo layer
|
||||
if nSlicingType == SLICING_TYPE.MULTIPLANAR then
|
||||
if nSlicingType == SLICING_TYPE.MULTIPLANAR or nSlicingType == SLICING_TYPE.MULTIPLANAR_DEG45 then
|
||||
|
||||
for i = 1, #vLayIds do
|
||||
-- calcolo i valori legati a vtSlicing per il layer corrente
|
||||
local vtSlicing = EgtGetInfo( vLayIds[i], KEY_SLICE_DIR, 'v')
|
||||
local dNxy = sqrt( vtSlicing:getX() * vtSlicing:getX() + vtSlicing:getY() * vtSlicing:getY())
|
||||
local dNz = vtSlicing:getZ()
|
||||
-- altezza necessaria per lo strand non serve perchè l'altezza viene adattata lungo il percorso
|
||||
-- altezza necessaria per il tool
|
||||
local dHTool = LayerParams.dTDiam / 2 * dNxy
|
||||
-- altezza disponibile
|
||||
local b3Layer = ComputeToolPathBox( vLayIds[i])
|
||||
local dHDisp = b3Layer:getMin():getZ() - max( dHBox, 0)
|
||||
|
||||
local dCurrCorrZ = max( 0, dHTool - dHDisp)
|
||||
dCorrZ = max( dCorrZ, dCurrCorrZ)
|
||||
if not b3Layer:isEmpty() then
|
||||
-- altezza necessaria per lo strand
|
||||
local dHStrand = 0
|
||||
if nSlicingType == SLICING_TYPE.MULTIPLANAR_DEG45 then
|
||||
-- nel caso multiplanar con partenza verticale l'altezza necessaria per lo strand non serve perchè l'altezza viene adattata lungo il percorso
|
||||
-- nel caso multiplanar 45° si considera come altezza strand quella settata nei parametri visto che varia lungo il percorso ( euristico)
|
||||
dHStrand = 0.5 * LayerParams.dStrand * dNxy + LayerParams.dLayHeight * dNz
|
||||
end
|
||||
-- altezza necessaria per il tool
|
||||
local dHTool = LayerParams.dTDiam / 2 * dNxy
|
||||
-- altezza disponibile
|
||||
local dHDisp = b3Layer:getMin():getZ() - max( dHBox, 0)
|
||||
local dCurrCorrZ = max( 0, max( dHStrand, dHTool) - dHDisp)
|
||||
dCorrZ = max( dCorrZ, dCurrCorrZ)
|
||||
end
|
||||
end
|
||||
|
||||
-- se slicing standard la correzione può essere calcolata sull'intero pezzo
|
||||
@@ -150,13 +158,13 @@ local function AddZCorrection( LayerParams)
|
||||
-- 2) correzione per i wipe
|
||||
-- altezza minima necessaria per i wipe. Se slicing multiplanare l'altezza minima per il wipe cambia ad ogni layer, altrimenti è un valore comune
|
||||
local dHMinWipe
|
||||
if nSlicingType ~= SLICING_TYPE.MULTIPLANAR then
|
||||
if nSlicingType ~= SLICING_TYPE.MULTIPLANAR and nSlicingType ~= SLICING_TYPE.MULTIPLANAR_DEG45 then
|
||||
local dNxy = sqrt( LayerParams.vtSlicing:getX() * LayerParams.vtSlicing:getX() + LayerParams.vtSlicing:getY() * LayerParams.vtSlicing:getY())
|
||||
dHMinWipe = LayerParams.dTDiam / 2 * dNxy + max( dHBox, 0) + s_dHSafeWipe
|
||||
end
|
||||
|
||||
for i = 1, #vLayIds do
|
||||
if nSlicingType == SLICING_TYPE.MULTIPLANAR then
|
||||
if nSlicingType == SLICING_TYPE.MULTIPLANAR or nSlicingType == SLICING_TYPE.MULTIPLANAR_DEG45 then
|
||||
local vtSlicing = EgtGetInfo( vLayIds[i], KEY_SLICE_DIR, 'v')
|
||||
local dNxy = sqrt( vtSlicing:getX() * vtSlicing:getX() + vtSlicing:getY() * vtSlicing:getY())
|
||||
dHMinWipe = LayerParams.dTDiam / 2 * dNxy + max( dHBox, 0) + s_dHSafeWipe
|
||||
@@ -2333,7 +2341,7 @@ local function SpiralVaseFull( vLayIds, LayerParams)
|
||||
-- gestione speciale dei primi layers per gestione dell'altezza e feed
|
||||
|
||||
local nSlicingType = EgtGetInfo( s_nPartId, KEY_SLICING_TYPE, 'i')
|
||||
if nSlicingType == SLICING_TYPE.MULTIPLANAR then
|
||||
if nSlicingType == SLICING_TYPE.MULTIPLANAR or nSlicingType == SLICING_TYPE.MULTIPLANAR_DEG45 then
|
||||
return SpiralVaseFullMultiPlanar( vLayIds, LayerParams)
|
||||
end
|
||||
|
||||
@@ -2749,7 +2757,7 @@ local function SpiralVasePartial( vLayIds, LayerParams)
|
||||
-- la continuità tra i layers viene risolta sul tratto finale del layer percedente
|
||||
|
||||
local nSlicingType = EgtGetInfo( s_nPartId, KEY_SLICING_TYPE, 'i')
|
||||
if nSlicingType == SLICING_TYPE.MULTIPLANAR then
|
||||
if nSlicingType == SLICING_TYPE.MULTIPLANAR or nSlicingType == SLICING_TYPE.MULTIPLANAR_DEG45 then
|
||||
return SpiralVasePartialMultiPlanar( vLayIds, LayerParams)
|
||||
end
|
||||
|
||||
@@ -2960,7 +2968,7 @@ function CalcToolPath.Exec( nPartId)
|
||||
|
||||
s_nCurrIdx = nIdx
|
||||
|
||||
if nSlicingType == SLICING_TYPE.MULTIPLANAR then
|
||||
if nSlicingType == SLICING_TYPE.MULTIPLANAR or nSlicingType == SLICING_TYPE.MULTIPLANAR_DEG45 then
|
||||
LayerParams.vtSlicing = EgtGetInfo( vLayIds[nIdx], KEY_SLICE_DIR, 'v')
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user