3dPrinting :
- in spiral vase spostata approssimazione delle curve per farla sempre su curva piana.
This commit is contained in:
+22
-21
@@ -2105,18 +2105,28 @@ local function SpiralVase( vLayIds, LayerParams)
|
||||
EgtModifyCurveStartPoint( nNewEntId, ptOld, GDB_RT.GLOB)
|
||||
else
|
||||
-- distribuisco la differenza su tutta la curva
|
||||
-- recupero la curva da usare come guida
|
||||
local nGuideId = EgtCopyGlob( nOldPathId, nPathGrpId)
|
||||
-- la rendo coerente con il toolpath
|
||||
EgtMove( nGuideId, vtMove + LayerParams.dLayHeight * LayerParams.vtSlicing, GDB_RT.GLOB)
|
||||
if LayerParams.bInvert then
|
||||
EgtInvertCurve( nGuideId)
|
||||
if not AreSamePointApprox( ptOld, ptNew) then
|
||||
-- recupero la curva da usare come guida
|
||||
local nGuideId = EgtCopyGlob( nOldPathId, nPathGrpId)
|
||||
-- la rendo coerente con il toolpath
|
||||
EgtMove( nGuideId, vtMove + LayerParams.dLayHeight * LayerParams.vtSlicing, GDB_RT.GLOB)
|
||||
if LayerParams.bInvert then
|
||||
EgtInvertCurve( nGuideId)
|
||||
end
|
||||
-- modifico i punti iniziali affinchè coincidano con il punto finale del percorso precedente
|
||||
EgtChangeClosedCurveStartPoint( nGuideId, ptOld, GDB_RT.GLOB)
|
||||
EgtChangeClosedCurveStartPoint( nNewEntId, ptOld, GDB_RT.GLOB)
|
||||
EgtSpiralizeCurveAlongGuide( nNewEntId, nGuideId)
|
||||
EgtErase( nGuideId)
|
||||
end
|
||||
-- modifico i punti iniziali affinchè coincidano con il punto finale del percorso precedente
|
||||
EgtChangeClosedCurveStartPoint( nGuideId, ptOld, GDB_RT.GLOB)
|
||||
EgtChangeClosedCurveStartPoint( nNewEntId, ptOld, GDB_RT.GLOB)
|
||||
EgtSpiralizeCurveAlongGuide( nNewEntId, nGuideId)
|
||||
EgtErase( nGuideId)
|
||||
end
|
||||
|
||||
-- approssimo
|
||||
local ptS = EgtSP( nNewEntId, GDB_ID.ROOT)
|
||||
EgtCopyGlob( nNewEntId, nPathGrpId)
|
||||
EgtApproxCurve( nNewEntId, GDB_CA.ARCS, s_dApproxTol)
|
||||
if EgtCurveIsClosed( nNewEntId) then
|
||||
EgtChangeClosedCurveStartPoint( nNewEntId, ptS, GDB_RT.GLOB)
|
||||
end
|
||||
|
||||
-- modifica graduale del'altezza
|
||||
@@ -2129,17 +2139,8 @@ local function SpiralVase( vLayIds, LayerParams)
|
||||
EgtSpiralizeCurveAlongExtrusion( nNewEntId, LayerParams.dLayHeight)
|
||||
end
|
||||
end
|
||||
|
||||
-- approssimo
|
||||
|
||||
local vTPathsCrvs = EgtGetAllInGroup( nTpathGrpId)
|
||||
for i = 1, #vTPathsCrvs do
|
||||
local ptS = EgtSP( vTPathsCrvs[i], GDB_ID.ROOT)
|
||||
EgtApproxCurve( vTPathsCrvs[i], GDB_CA.ARCS, s_dApproxTol)
|
||||
if EgtCurveIsClosed( vTPathsCrvs[i]) then
|
||||
EgtChangeClosedCurveStartPoint( vTPathsCrvs[i], ptS, GDB_RT.GLOB)
|
||||
end
|
||||
end
|
||||
|
||||
nOldPathId = vEntIds[1]
|
||||
nOldId = vTPathsCrvs[#vTPathsCrvs]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user