3dPrinting :
- corretto errore nella creazione wipe.
This commit is contained in:
@@ -124,16 +124,23 @@ end
|
||||
--------------------------------------------------------------------
|
||||
local function AddRetraction( nCrvId, dCoastingLen, dWipeLen)
|
||||
|
||||
-- curva ausiliaria per generare correttamente wipe
|
||||
local nCopyId = EgtCopyGlob( nCrvId, nCrvId, GDB_IN.AFTER)
|
||||
EgtCloseCurveCompo( nCopyId)
|
||||
local ptNewStart = EgtEP( nCrvId)
|
||||
EgtChangeClosedCurveStartPoint( nCopyId, ptNewStart)
|
||||
|
||||
local nCoastingId
|
||||
if dCoastingLen > GEO.EPS_SMALL then
|
||||
nCoastingId = EgtCopyGlob( nCrvId, nCrvId, GDB_IN.AFTER)
|
||||
local dPar = EgtCurveParamAtLength( nCoastingId, EgtCurveLength( nCoastingId) - dCoastingLen)
|
||||
if not dPar then
|
||||
if not dPar then
|
||||
EgtErase( nCopyId)
|
||||
EgtErase( nCoastingId)
|
||||
return
|
||||
end
|
||||
EgtTrimCurveStartAtParam( nCoastingId, dPar)
|
||||
-- aggiorno la curva originale
|
||||
end
|
||||
EgtTrimCurveStartAtParam( nCoastingId, dPar)
|
||||
-- aggiorno la curva originale
|
||||
if dPar > GEO.EPS_SMALL then
|
||||
EgtTrimCurveEndAtParam( nCrvId, dPar)
|
||||
else
|
||||
@@ -145,13 +152,14 @@ local function AddRetraction( nCrvId, dCoastingLen, dWipeLen)
|
||||
end
|
||||
|
||||
if dWipeLen > GEO.EPS_SMALL then
|
||||
local nWipeId = EgtCopyGlob( nCrvId, EgtIf( nCoastingId, nCoastingId, nCrvId), GDB_IN.AFTER)
|
||||
local nWipeId = EgtCopyGlob( nCopyId, nCoastingId or nCrvId, GDB_IN.AFTER)
|
||||
EgtTrimCurveEndAtLen( nWipeId, dWipeLen)
|
||||
EgtSetName( nWipeId, WIPE_CRV)
|
||||
EgtSetInfo( nWipeId, KEY_TYPE, TYPE.WIPE)
|
||||
EgtSetColor( nWipeId, EgtStdColor('TEAL'))
|
||||
end
|
||||
|
||||
EgtErase( nCopyId)
|
||||
return nCoastingId
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user