3dPrinting :
- correzioni varie.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- CalcToolPath.lua by Egaltech s.r.l. 2022/04/13
|
||||
-- CalcToolPath.lua by Egaltech s.r.l. 2022/04/19
|
||||
-- Calcolo percorsi di lavoro per Stampa 3d
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -55,12 +55,11 @@ local function AddLeadIn( nCrvId, LayerParams, nGrpId)
|
||||
local _, _, dAngIni = SphericalFromVector( vtTang)
|
||||
nLeadInCrv = EgtArc2PD( nGrpId, ptE, ptS, 180 + dAngIni)
|
||||
EgtInvertCurve( nLeadInCrv)
|
||||
|
||||
end
|
||||
EgtRelocate( nLeadInCrv, nGrpId, GDB_IN.FIRST_SON)
|
||||
EgtModifyCurveExtrusion( nLeadInCrv, Z_AX(), GDB_RT.GLOB)
|
||||
EgtSetInfo( nLeadInCrv, KEY_TYPE, TYPE.LINK)
|
||||
|
||||
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------
|
||||
@@ -84,9 +83,9 @@ local function AddLeadOut( nCrvId, LayerParams, nGrpId)
|
||||
elseif LayerParams.LeadOutType == LEAD_TYPE.ARC then
|
||||
local _, _, dAngIni = SphericalFromVector( vtTang)
|
||||
nLeadOutCrv = EgtArc2PD( nGrpId, ptS, ptE, dAngIni)
|
||||
|
||||
end
|
||||
EgtRelocate( nLeadOutCrv, nGrpId, GDB_IN.LAST_SON)
|
||||
EgtModifyCurveExtrusion( nLeadOutCrv, Z_AX(), GDB_RT.GLOB)
|
||||
EgtSetInfo( nLeadOutCrv, KEY_TYPE, TYPE.LINK)
|
||||
|
||||
end
|
||||
@@ -139,7 +138,8 @@ function CalcToolPath.Exec( nPartId)
|
||||
EgtMove( nNewEntId, Vector3d( 0, 0, LayerParams.dLayHeight), GDB_RT.GLOB)
|
||||
if LayerParams.bInvert then
|
||||
EgtInvertCurve( nNewEntId)
|
||||
end
|
||||
end
|
||||
EgtModifyCurveExtrusion( nNewEntId, Z_AX(), GDB_RT.GLOB)
|
||||
nEntId = EgtGetNext( nEntId)
|
||||
end
|
||||
|
||||
@@ -165,6 +165,7 @@ function CalcToolPath.Exec( nPartId)
|
||||
nLinkId = EgtBiArc( nTpathGrpId, EgtEP( nPrevId), EgtSP( nCurrId), dAngIni, dAngFin, 0.5)
|
||||
end
|
||||
EgtRelocate( nLinkId, nCurrId, GDB_IN.BEFORE)
|
||||
EgtModifyCurveExtrusion( nLinkId, Z_AX(), GDB_RT.GLOB)
|
||||
local nType = EgtGetInfo( nCurrId, KEY_TYPE, 'i')
|
||||
EgtSetInfo( nLinkId, KEY_TYPE, TYPE.LINK)
|
||||
nPrevId = nCurrId
|
||||
@@ -173,11 +174,15 @@ function CalcToolPath.Exec( nPartId)
|
||||
|
||||
-- aggiungo leadin/leadout
|
||||
local nFirstCurve = EgtGetFirstInGroup( nTpathGrpId)
|
||||
EgtTrimCurveStartAtLen( nFirstCurve, LayerParams.dOffsetLP)
|
||||
AddLeadIn( nFirstCurve, LayerParams, nTpathGrpId)
|
||||
if nFirstCurve then
|
||||
EgtTrimCurveStartAtLen( nFirstCurve, LayerParams.dOffsetLP)
|
||||
AddLeadIn( nFirstCurve, LayerParams, nTpathGrpId)
|
||||
end
|
||||
local nLastCurve = EgtGetLastInGroup( nTpathGrpId)
|
||||
EgtTrimCurveEndAtLen( nLastCurve, EgtCurveLength( nLastCurve) - LayerParams.dOffsetLP)
|
||||
AddLeadOut( nLastCurve, LayerParams, nTpathGrpId)
|
||||
if nLastCurve then
|
||||
EgtTrimCurveEndAtLen( nLastCurve, EgtCurveLength( nLastCurve) - LayerParams.dOffsetLP)
|
||||
AddLeadOut( nLastCurve, LayerParams, nTpathGrpId)
|
||||
end
|
||||
--passo al gruppo di contorni successivo
|
||||
nCrvGrpId = EgtGetNextName( nCrvGrpId, CONTOUR_GRP.."*")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user