3dPrinting 2.5j2 :
- aggiunta possibilità di unire i setti alla shell interna - migliorie varie.
This commit is contained in:
@@ -28,8 +28,12 @@ LINK_CRV = "Link"
|
||||
FRAME_PART = "FramePart"
|
||||
START_GEOM = "Start"
|
||||
TOT_SHELL_TRIM_SURF = "TotalShellSurfForTrim"
|
||||
SHELL_SURF = "ShellSurf"
|
||||
COARSE_TRIM_SURF = "CoarseTrimSurf"
|
||||
TRIM_SURF_LOOP = "TrimSurfLoop"
|
||||
SURF_LOOP = "SurfLoop"
|
||||
LOOP_GRP = "LoopGrp"
|
||||
DIR_ARROW = "Arrow"
|
||||
|
||||
MIN_LEN = 0.1
|
||||
MIN_AREA = 0.01
|
||||
@@ -134,6 +138,8 @@ KEY_RIBS_USER_LINK_CCW = "RibUserLinkCCW"
|
||||
KEY_RIBS_USER_LINK_ORDER = "RibUserLinkOrder"
|
||||
KEY_RIBS_USER_LINK_TOT = "RibsUserLinkParts"
|
||||
KEY_RIBS_INVERT_STRAND_ORDER = "RibsInvertStrandOrder"
|
||||
KEY_RIBS_MERGE_WITH_SHELLS = "RibsMergeWithShell"
|
||||
KEY_INVERT_RIBS_MERGED_SHELL_LINK = "InvertRibsMergedShellMainLink"
|
||||
|
||||
-- Regioni con diverso numero di passate
|
||||
KEY_SHELL_NBR_DIFF = "ShellNbrDifference"
|
||||
@@ -196,6 +202,8 @@ KEY_PREV_CRV = "PrevCrv"
|
||||
KEY_NEXT_CRVS = "NextCrvs"
|
||||
KEY_CRV_STRAND = "CurveStrand"
|
||||
KEY_LAYER_CNT = "LayerCnt"
|
||||
KEY_CRV_OFFSET = "CurveOffset"
|
||||
KEY_ORIG_REF = "Orig"
|
||||
|
||||
SLICING_TYPE = {
|
||||
VERTICAL = 1,
|
||||
|
||||
+1055
-167
File diff suppressed because it is too large
Load Diff
@@ -120,6 +120,7 @@ local function GetRibParams( nId)
|
||||
ReadParam( nId, KEY_RIBS_LINK, 'b', false, RibParam)
|
||||
ReadParam( nId, KEY_RIBS_TYPE, 'i', RIB_TYPE.INTERNAL, RibParam)
|
||||
ReadParam( nId, KEY_RIBS_INVERT_STRAND_ORDER, 'b', false, RibParam)
|
||||
ReadParam( nId, KEY_RIBS_MERGE_WITH_SHELLS, 'b', false, RibParam)
|
||||
|
||||
return RibParam
|
||||
end
|
||||
@@ -1040,17 +1041,17 @@ local function SlicingWithSolid( nStmId, vZSlices, dDeltaZStart, dZmin, frSlicin
|
||||
nLayId = EgtGetNext( nLayId)
|
||||
end
|
||||
|
||||
-- costolature
|
||||
local nRibsLay = EgtGetFirstNameInGroup( s_nPartId, LAY_RIBS)
|
||||
ExtractRibsLoops( nRibsLay, nStmId)
|
||||
SlicingExtraObjects( nRibsLay, vtSlicing, TYPE.RIB, RIBS_CRV, RIBS_GRP, nStmId)
|
||||
if EgtProcessEvents( EgtIf( PRINT, 100, 0) + ( #vZSlices + 3) / nCounterTot * 100, 0) == 1 then return false end
|
||||
|
||||
local bSpiralVase = EgtGetInfo( s_nPartId, KEY_SPIRAL_VASE, 'b') or false
|
||||
if not bSpiralVase then
|
||||
|
||||
-- infill
|
||||
PrepareInfill( nStmId, vtSlicing)
|
||||
if EgtProcessEvents( EgtIf( PRINT, 100, 0) + ( #vZSlices + 3) / nCounterTot * 100, 0) == 1 then return false end
|
||||
|
||||
-- costolature
|
||||
local nRibsLay = EgtGetFirstNameInGroup( s_nPartId, LAY_RIBS)
|
||||
ExtractRibsLoops( nRibsLay, nStmId)
|
||||
SlicingExtraObjects( nRibsLay, vtSlicing, TYPE.RIB, RIBS_CRV, RIBS_GRP, nStmId)
|
||||
if EgtProcessEvents( EgtIf( PRINT, 100, 0) + ( #vZSlices + 6) / nCounterTot * 100, 0) == 1 then return false end
|
||||
|
||||
-- solidi per regioni con diverso numero di passate
|
||||
|
||||
+61
-58
@@ -1872,7 +1872,8 @@ local function SpiralVase( vLayIds, LayerParams)
|
||||
local vCrvGrpIds = EgtGetNameInGroup( vLayIds[ nIdx], CONTOUR_GRP.."*")
|
||||
if #vCrvGrpIds > 1 then
|
||||
-- se più di un gruppo di curve warning
|
||||
EgtOutLog( 'Warning : in spiral vase mode more than one curve (layer '..tostring( nIdx)..') - CalcToolPath')
|
||||
EgtOutBox( 'Error in spiral vase : layer ' .. tostring( nIdx) .. ' has more than one toolpath', 'ToolPathCalc')
|
||||
return false
|
||||
end
|
||||
|
||||
for i = 1, #vCrvGrpIds do
|
||||
@@ -1895,65 +1896,67 @@ local function SpiralVase( vLayIds, LayerParams)
|
||||
end
|
||||
|
||||
-- creo il percorso di lavoro :
|
||||
local nEntId = EgtGetFirstInGroup( nPathGrpId)
|
||||
while nEntId do
|
||||
local nNewEntId = EgtCopyGlob( nEntId, nTpathGrpId, GDB_IN.LAST_SON)
|
||||
|
||||
local vtMove = V_NULL()
|
||||
-- eventuale spostamento dell'altezza layer
|
||||
if nSlicingType == SLICING_TYPE.DEG45_X or nSlicingType == SLICING_TYPE.DEG45_Y then
|
||||
vtMove = LayerParams.dLayHeight * LayerParams.vtSlicing
|
||||
EgtMove( nNewEntId, vtMove, GDB_RT.GLOB)
|
||||
end
|
||||
|
||||
EgtModifyCurveExtrusion( nNewEntId, LayerParams.vtSlicing, GDB_RT.GLOB)
|
||||
EgtSetInfo( nNewEntId, KEY_CRV_STRAND, LayerParams.dStrand)
|
||||
|
||||
-- eventuale inversione
|
||||
if LayerParams.bInvert then
|
||||
EgtInvertCurve( nNewEntId)
|
||||
EgtSetInfo( nNewEntId, KEY_INVERTED_CRV, 1)
|
||||
end
|
||||
EgtSetColor( nNewEntId, EgtStdColor('GRAY'))
|
||||
|
||||
-- se primo layer
|
||||
if bFirst and nNewEntId then
|
||||
-- mi sposto dell'altezza layer
|
||||
EgtMove( nNewEntId, LayerParams.dLayHeight * LayerParams.vtSlicing, GDB_RT.GLOB)
|
||||
-- eventuale lead in
|
||||
if LayerParams.nLeadInType ~= LEAD_TYPE.NONE then
|
||||
EgtTrimCurveStartAtLen( nNewEntId, LayerParams.dOffsetLP)
|
||||
AddLeadIn( nNewEntId, LayerParams, nTpathGrpId)
|
||||
end
|
||||
bFirst = false
|
||||
else
|
||||
local ptOld = EgtEP( nOldId, GDB_ID.ROOT)
|
||||
local ptNew = EgtSP( nNewEntId, GDB_ID.ROOT)
|
||||
if dist( ptNew, ptOld) < LayerParams.dStrand then
|
||||
-- se i punti sono vicini ma non coincidenti modifico la curva per avere transizione più uniforme
|
||||
if not AreSamePointApprox( ptOld, ptNew) then
|
||||
-- recupero la curva da usare come guida
|
||||
local nGuideId = EgtCopyGlob( nOldPathId, nTpathGrpId)
|
||||
-- la porto alla stessa quota del toolpath
|
||||
EgtMove( nGuideId, vtMove + LayerParams.dLayHeight * LayerParams.vtSlicing, GDB_RT.GLOB)
|
||||
EgtChangeClosedCurveStartPoint( nGuideId, ptOld, GDB_RT.GLOB)
|
||||
|
||||
EgtSpiralizeCurveAlongGuide( nNewEntId, nGuideId)
|
||||
EgtErase( nGuideId)
|
||||
end
|
||||
else
|
||||
EgtOutLog( 'Warning : in spiral vase mode no link betweeen toolpaths (layer '..tostring( nIdx)..') - CalcToolPath')
|
||||
-- aggiungo uscita, coasting e wipe sulla curva precedente
|
||||
AddSpiralVaseLeadOut( nOldId, LayerParams)
|
||||
end
|
||||
EgtSpiralizeCurveAlongExtrusion( nNewEntId, LayerParams.dLayHeight)
|
||||
end
|
||||
|
||||
nOldPathId = nEntId
|
||||
nOldId = nNewEntId
|
||||
nEntId = EgtGetNext( nEntId)
|
||||
local vEntIds = EgtGetAllInGroup( nPathGrpId)
|
||||
if #vEntIds > 1 then
|
||||
EgtOutBox( 'Error in spiral vase : layer ' .. tostring( nIdx) .. ' has more than one toolpath', 'ToolPathCalc')
|
||||
return false
|
||||
end
|
||||
|
||||
local nNewEntId = EgtCopyGlob( vEntIds[1], nTpathGrpId, GDB_IN.LAST_SON)
|
||||
|
||||
local vtMove = V_NULL()
|
||||
-- eventuale spostamento dell'altezza layer
|
||||
if nSlicingType == SLICING_TYPE.DEG45_X or nSlicingType == SLICING_TYPE.DEG45_Y then
|
||||
vtMove = LayerParams.dLayHeight * LayerParams.vtSlicing
|
||||
EgtMove( nNewEntId, vtMove, GDB_RT.GLOB)
|
||||
end
|
||||
|
||||
EgtModifyCurveExtrusion( nNewEntId, LayerParams.vtSlicing, GDB_RT.GLOB)
|
||||
EgtSetInfo( nNewEntId, KEY_CRV_STRAND, LayerParams.dStrand)
|
||||
|
||||
-- eventuale inversione
|
||||
if LayerParams.bInvert then
|
||||
EgtInvertCurve( nNewEntId)
|
||||
EgtSetInfo( nNewEntId, KEY_INVERTED_CRV, 1)
|
||||
end
|
||||
EgtSetColor( nNewEntId, EgtStdColor('GRAY'))
|
||||
|
||||
-- se primo layer
|
||||
if bFirst and nNewEntId then
|
||||
-- mi sposto dell'altezza layer
|
||||
EgtMove( nNewEntId, LayerParams.dLayHeight * LayerParams.vtSlicing, GDB_RT.GLOB)
|
||||
-- eventuale lead in
|
||||
if LayerParams.nLeadInType ~= LEAD_TYPE.NONE then
|
||||
EgtTrimCurveStartAtLen( nNewEntId, LayerParams.dOffsetLP)
|
||||
AddLeadIn( nNewEntId, LayerParams, nTpathGrpId)
|
||||
end
|
||||
bFirst = false
|
||||
else
|
||||
local ptOld = EgtEP( nOldId, GDB_ID.ROOT)
|
||||
local ptNew = EgtSP( nNewEntId, GDB_ID.ROOT)
|
||||
if dist( ptNew, ptOld) < LayerParams.dStrand then
|
||||
-- se i punti sono vicini ma non coincidenti modifico la curva per avere transizione più uniforme
|
||||
if not AreSamePointApprox( ptOld, ptNew) then
|
||||
-- recupero la curva da usare come guida
|
||||
local nGuideId = EgtCopyGlob( nOldPathId, nTpathGrpId)
|
||||
-- la porto alla stessa quota del toolpath
|
||||
EgtMove( nGuideId, vtMove + LayerParams.dLayHeight * LayerParams.vtSlicing, GDB_RT.GLOB)
|
||||
EgtChangeClosedCurveStartPoint( nGuideId, ptOld, GDB_RT.GLOB)
|
||||
|
||||
EgtSpiralizeCurveAlongGuide( nNewEntId, nGuideId)
|
||||
EgtErase( nGuideId)
|
||||
end
|
||||
else
|
||||
EgtOutLog( 'Warning : in spiral vase mode no link betweeen toolpaths (layer '..tostring( nIdx)..') - CalcToolPath')
|
||||
-- aggiungo uscita, coasting e wipe sulla curva precedente
|
||||
AddSpiralVaseLeadOut( nOldId, LayerParams)
|
||||
end
|
||||
EgtSpiralizeCurveAlongExtrusion( nNewEntId, LayerParams.dLayHeight)
|
||||
end
|
||||
|
||||
nOldPathId = vEntIds[1]
|
||||
nOldId = nNewEntId
|
||||
|
||||
-- aggiorno il box dei toolpath
|
||||
local b3Box = ComputeToolPathBox( nTpathGrpId)
|
||||
b3Tot:Add( b3Box)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
-- Version.lua by Egaltech s.r.l. 2023/10/02
|
||||
-- Gestione della versione di 3dPrinting
|
||||
|
||||
VERSION = '2.5j1'
|
||||
VERSION = '2.5j2'
|
||||
Reference in New Issue
Block a user