3dPrinting :
- prima gestione solidi ausiliari ( solo riempimenti pieni) - gestione floor/ceil - modifiche progress bar.
This commit is contained in:
+19
-11
@@ -136,18 +136,26 @@ local function CreateSolidFromCurve( nCrvId, nSolidGrp, LayerParams)
|
||||
Color = EgtStdColor( 'LIME')
|
||||
elseif nType == TYPE.RIB then
|
||||
Color = EgtStdColor( 'OLIVE')
|
||||
end
|
||||
|
||||
local nParts = 1
|
||||
local LEN_REF = 100
|
||||
local dLen = EgtCurveLength( nCrvId)
|
||||
if dLen > LEN_REF and nType ~= TYPE.LINK and nType ~= TYPE.COASTING then
|
||||
nParts = EgtClamp( floor( dLen / LEN_REF), 1, 10)
|
||||
elseif nType == TYPE.AUX_SOLID then
|
||||
Color = EgtStdColor( 'AQUA')
|
||||
end
|
||||
|
||||
local nCopyId = EgtCopyGlob( nCrvId, nSolidGrp)
|
||||
local nId = EgtSplitCurve( nCopyId, nParts)
|
||||
if not nId then return false end
|
||||
local nId = GDB_ID.NULL
|
||||
local nParts = 1
|
||||
local LEN_REF = 100
|
||||
local bZigZagInfill = EgtGetInfo( nCopyId, KEY_ZIG_ZAG_INFILL, 'b') or false
|
||||
if bZigZagInfill then
|
||||
nId, nParts = EgtSplitCurveAtCorners( nCopyId, 80)
|
||||
else
|
||||
local dLen = EgtCurveLength( nCrvId)
|
||||
if dLen > LEN_REF and nType ~= TYPE.LINK and nType ~= TYPE.COASTING then
|
||||
nParts = EgtClamp( floor( dLen / LEN_REF), 1, 10)
|
||||
end
|
||||
nId = EgtSplitCurve( nCopyId, nParts)
|
||||
end
|
||||
|
||||
if nId == GDB_ID.NULL then return false end
|
||||
local bOk = true
|
||||
for nInd = 0, nParts - 1 do
|
||||
local nGuideId = nId + nInd
|
||||
@@ -259,7 +267,7 @@ function CalcSolids.Exec( nPartId)
|
||||
nCrvGrpId = EgtGetNextName( nCrvGrpId, CONTOUR_GRP.."*") or GDB_ID.NULL
|
||||
end
|
||||
EgtDraw()
|
||||
if EgtProcessEvents( nIdx / #vLayIds * 100, 0) == 1 then
|
||||
if EgtProcessEvents( EgtIf( PRINT, 300, 0) + nIdx / #vLayIds * 100, 0) == 1 then
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -269,7 +277,7 @@ function CalcSolids.Exec( nPartId)
|
||||
-- EgtOutBox( 'Error on layers :\n' .. table.concat( vErr, ','), 'SolidCalc')
|
||||
-- end
|
||||
|
||||
for i = 1, #vErr do
|
||||
for i = 1, #vErr do
|
||||
EgtOutLog( 'Error on solid creation (layer ' .. vErr[i] .. ') - SolidCalc')
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user