3dPrinting :
- aggiunto parametro di overlap tra le passate dei riempimenti pieni - sistemata rotazione dei riempimenti pieni a zigzag.
This commit is contained in:
+9
-15
@@ -51,6 +51,7 @@ local function GetLayerParamsForPathCalc()
|
||||
if LayerParams.dInfillStrand < GEO.EPS_SMALL then LayerParams.dInfillStrand = LayerParams.dStrand end
|
||||
LayerParams.bInfillLink = EgtGetInfo( s_nPartId, KEY_INFILL_LINK, 'b') or false
|
||||
LayerParams.dInfillOverlap = EgtGetInfo( s_nPartId, KEY_INFILL_OVERLAP, 'd') or 0
|
||||
LayerParams.dInfillStrandOverlap = EgtGetInfo( s_nPartId, KEY_INFILL_STRAND_OVERLAP, 'd') or 0
|
||||
LayerParams.nInfillType = EgtGetInfo( s_nPartId, KEY_INFILL_TYPE, 'i') or FILL_TYPE.NONE
|
||||
|
||||
-- eventuale modifica dei parametri per gestire correttamente il caso spiral vase
|
||||
@@ -657,22 +658,15 @@ local function GetZigZagDirection( nSrfId, nBorderSurf, dStrand, nGrp, frLoc, nT
|
||||
|
||||
-- verifico se ho direzione definita nei layer precedenti
|
||||
local nPrevSlice = EgtGetPrevName( nSliceLayId, SLICE_LAYER .. '*')
|
||||
local nPrevPrevSlice = EgtGetPrevName( nPrevSlice or GDB_ID.NULL, SLICE_LAYER .. '*')
|
||||
if nPrevPrevSlice then
|
||||
vtDir = EgtGetInfo( nPrevPrevSlice, sInfoKey, 'v')
|
||||
if nPrevSlice then
|
||||
vtDir = EgtGetInfo( nPrevSlice, sInfoKey, 'v')
|
||||
end
|
||||
|
||||
if not vtDir then
|
||||
-- se è definita sul layer precedente la ruoto di 90° rispetto a Z ( visto che siamo in un frame locale a vtSlicing) altrimenti la calcolo in modo che sia quella ottimale
|
||||
if nPrevSlice then
|
||||
vtDir = EgtGetInfo( nPrevSlice, sInfoKey, 'v')
|
||||
if vtDir then
|
||||
vtDir:rotate( Z_AX(), 90)
|
||||
end
|
||||
end
|
||||
if not vtDir then
|
||||
vtDir = FindOptimalZigZagDirection( nSrfId, nBorderSurf, dStrand, nGrp, frLoc)
|
||||
end
|
||||
-- se è definita sul layer precedente la ruoto di 90° rispetto a Z ( visto che siamo in un frame locale a vtSlicing) altrimenti la calcolo in modo che sia quella ottimale
|
||||
if vtDir then
|
||||
vtDir:rotate( Z_AX(), 90)
|
||||
else
|
||||
vtDir = FindOptimalZigZagDirection( nSrfId, nBorderSurf, dStrand, nGrp, frLoc)
|
||||
end
|
||||
|
||||
EgtSetInfo( nSliceLayId, sInfoKey, vtDir)
|
||||
@@ -741,7 +735,7 @@ local function CalcSolidFillPath( nLayId, LayerParams, nStartLay, nFillType)
|
||||
end
|
||||
|
||||
-- distanza tra passate tenendo conto dell'overlap indicato
|
||||
local dDist = ( 1 - LayerParams.dStrandOverlap / 100) * LayerParams.dInfillStrand
|
||||
local dDist = ( 1 - LayerParams.dInfillStrandOverlap / 100) * LayerParams.dInfillStrand
|
||||
-- inserisco il riempimento
|
||||
if nFillType == FILL_TYPE.OFFSET then
|
||||
-- recupero le shell precedenti dal PathGrp
|
||||
|
||||
Reference in New Issue
Block a user