- aggiunta gestione countersink e profili chamfer

- aggiunta materiali
- aggiunta possibilita' di creare svg su richiesta
- aggiunta gestione etichetta remnant
This commit is contained in:
Emmanuele Sassi
2023-10-05 13:06:40 +02:00
parent 04c7b07d0e
commit 173465984a
4 changed files with 250 additions and 18 deletions
+6 -3
View File
@@ -124,14 +124,16 @@ local PDF = {"PDF LINK"}
local CUTOPT = {"CUT OPT", "CutOpt"}
local LABEL = {"LABEL", "Label"}
local NAME = {"NAME", "Name"}
local INCHAMFER = {"INSIDE CHAMFER WIDTH", "InsideChamferWidth"}
local OUTCHAMFER = {"OUTSIDE CHAMFER WIDTH", "OutsideChamferWidth"}
local DXFFlags = {MATERIAL, PAINT, ASSEMBLY, TNUT, ROUND, TAB, PDF, CUTOPT, LABEL, NAME}
local DXFFlags = {MATERIAL, PAINT, ASSEMBLY, TNUT, ROUND, TAB, PDF, CUTOPT, LABEL, NAME, INCHAMFER, OUTCHAMFER}
-- funzione che legge i dxf
-- valore di ritorno numero 5 e' ErrorType:
-- 1) File not found
-- 2) Material layer not found
function UtilityLib.readDXF(DXFpath, PartExtCode, IsEstimation)
function UtilityLib.readDXF(DXFpath, PartExtCode, IsEstimation, CreatePng)
-- elimino doppie barre dalla path
DXFpath = string.gsub(DXFpath, "\\", '/')
local errorType = 0
@@ -191,7 +193,7 @@ function UtilityLib.readDXF(DXFpath, PartExtCode, IsEstimation)
end
end
end
if IsEstimation and paint then
if ( IsEstimation and paint) or CreatePng then
-- verifico se gia' processato
local Index = 1
local bFound = false
@@ -242,6 +244,7 @@ function SavePartImage(PartExtCode)
-- EgtMove(nPartId, Vector3d(- (b3PartId:getDimX() / 2), - (b3PartId:getDimY() / 2), 0))
EgtZoom(SCE_ZM.ALL)
EgtGetImage( SCE_SM.SH, WHITE(), WHITE(), 1600, 1000, PNGPath .. "/" .. PartExtCode .. ".png")
EgtGetImage( SCE_SM.SH, WHITE(), WHITE(), 2000, 800, PNGPath .. "/" .. PartExtCode .. "_SP.png")
-- EgtSaveFile(PNGPath .. "/" .. PartExtCode .. ".nge")
end
--