3dPrinting :
- aggiunta chiusura dei percorsi di extra shell - aggiunto clamp sui valori di strand width.
This commit is contained in:
@@ -23,6 +23,7 @@ local function GetLayerParamsForToolPathCalc()
|
||||
LayerParams.bSpiralVase = EgtGetInfo( s_nPartId, KEY_SPIRAL_VASE, 'b') or false
|
||||
LayerParams.dStrand = EgtGetInfo( s_nPartId, KEY_STRAND, 'd')
|
||||
LayerParams.dInnerStrand = EgtGetInfo( s_nPartId, KEY_INNER_STRAND, 'd') or LayerParams.dStrand
|
||||
LayerParams.dInnerStrand = EgtClamp( LayerParams.dInnerStrand, 0.5 * LayerParams.dStrand, 1.5 * LayerParams.dStrand)
|
||||
LayerParams.dLayHeight = EgtGetInfo( s_nPartId, KEY_SLICE_STEP, 'd')
|
||||
LayerParams.dOffs = EgtGetInfo( s_nPartId, KEY_OFFSET_SLICE, 'd')
|
||||
LayerParams.bInvert = ( EgtGetInfo( s_nPartId, KEY_PRINT_DIRECTION, 'i') == PRINT_DIRECTION.CW)
|
||||
@@ -45,6 +46,7 @@ local function GetLayerParamsForToolPathCalc()
|
||||
LayerParams.dTDiam = EgtGetInfo( s_nPartId, KEY_TOOL_DIAM, 'd')
|
||||
-- parametri infill
|
||||
LayerParams.dInfillStrand = EgtGetInfo( s_nPartId, KEY_INFILL_STRAND, 'd') or LayerParams.dStrand
|
||||
LayerParams.dInfillStrand = EgtClamp( LayerParams.dInfillStrand, 0.5 * LayerParams.dStrand, 1.5 * LayerParams.dStrand)
|
||||
LayerParams.bInfillLink = EgtGetInfo( s_nPartId, KEY_INFILL_LINK, 'b') or false
|
||||
LayerParams.dInfillCoasting = EgtGetInfo( s_nPartId, KEY_INFILL_COASTING, 'd') or 0
|
||||
LayerParams.dInfillWipe = EgtGetInfo( s_nPartId, KEY_INFILL_WIPE, 'd') or 0
|
||||
@@ -582,7 +584,15 @@ local function CalcExtraShellToolPath( vEntIds, nTpathGrpId, LayerParams)
|
||||
end
|
||||
sPrevName = sCurrName
|
||||
end
|
||||
|
||||
|
||||
-- aggiungo offset lead point sulle extra shell chiuse
|
||||
for i = 1, #vIds do
|
||||
if EgtCurveIsClosed( vIds[i]) then
|
||||
local nCopy = EgtCopyGlob( nTpathGrpId, vIds[i])
|
||||
AddOffsetLeadPoint( {vIds[i]}, nCopy, LayerParams.dOffsetLP, LINK_TYPE.NONE)
|
||||
end
|
||||
end
|
||||
|
||||
-- aggiungo coasting/wipe
|
||||
for i = 1, #vIds do
|
||||
-- verifico non sia collegato al successivo tramite link
|
||||
@@ -702,8 +712,8 @@ local function VerifyInfillLink( nLinkId, nCurr, nNext, vIds, dStrand, nGrpTmp)
|
||||
-- se tratto lineare allineato come curva corrente
|
||||
if AreSameVectorApprox( vtS, vtE) and vtS * vtDirCurr < - 1 + GEO.EPS_SMALL then
|
||||
-- verifico distanza
|
||||
local nCrvTest = EgtCurveCompoFromPoints( nGrpTmp, { EgtUP( nCurrLoc, dPar), EgtUP( nCurrLoc, dPar + 1)})
|
||||
local dDist = EgtPointCurveDist( EgtUP( nLinkLoc, dParCrv - 0.5), nNextLoc)
|
||||
local nCrvTest = EgtCurveCompoFromPoints( nGrpTmp, { EgtUP( nNextLoc, dPar), EgtUP( nNextLoc, dPar + 1)})
|
||||
local dDist = EgtPointCurveDist( EgtUP( nLinkLoc, dParCrv - 0.5), nCrvTest)
|
||||
if dDist < dMinDist + GEO.EPS_SMALL then
|
||||
return false
|
||||
end
|
||||
@@ -1123,7 +1133,7 @@ local function ComputeRibsLinkOnDiffCrvs( nCrvS, nCrvE, dParS, dParE)
|
||||
local _, _, dParFinal = EgtPointCurveDist( EgtUP( nCrvE, dParE, GDB_ID.ROOT), nCrvS, GDB_ID.ROOT)
|
||||
local nCrv1 = ComputeShortestCrv( nCrvS, dParS, dParFinal)
|
||||
|
||||
-- recupero il tratto interessato sulla cruva2
|
||||
-- recupero il tratto interessato sulla curva2
|
||||
local _, _, dParStart = EgtPointCurveDist( EgtUP( nCrvS, dParS, GDB_ID.ROOT), nCrvE, GDB_ID.ROOT)
|
||||
local nCrv2 = ComputeShortestCrv( nCrvE, dParStart, dParE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user