DataDoors 2.7e2 :

- aggiunta gestione decori da disegno (file nge) non specchiati da info Mirror=0 nel primo layer.
This commit is contained in:
Dario Sassi
2025-05-13 19:03:26 +02:00
parent 638e20883c
commit 6c9d861fd7
3 changed files with 48 additions and 27 deletions
+13 -13
View File
@@ -90,23 +90,23 @@ function ImportNgeFile.Draw( CustGeomPath, CustGeomFile )
-- applico la scala
if nNewLayer then
-- se è in mm
local dCompare = 1
if DGD.bMM then
dCompare = 1
else
dCompare = 25.4
end
-- se ha la nota che permette di scalare
local bScale = EgtGetInfo( nNewPart, 'AllowScale', 'b') or false
-- se inferiore ai 10"
if bScale and abs(DGD.LENGTH)/dCompare <= 10 and abs(DGD.WIDTH)/dCompare <= 10 then
local dLength = EgtIf( DGD.bMM, abs(DGD.LENGTH), abs(DGD.LENGTH)/dCompare)
local dWidth = EgtIf( DGD.bMM, abs(DGD.WIDTH), abs(DGD.WIDTH)/dCompare)
EgtScale(nNewPart,{{0,0,0},{1,0,0},{0,1,0},{0,0,1}}, dWidth, dLength, 1, GDB_RT.GLOB)
if bScale then
local dLength = abs( DGD.LENGTH) / EgtIf( DGD.bMM, 1, GEO.ONE_INCH)
local dWidth = abs( DGD.WIDTH) / EgtIf( DGD.bMM, 1, GEO.ONE_INCH)
-- se inferiore a 10 (come numero indipendente da unità di misura)
if bScale and dLength <= 10 and dWidth <= 10 then
EgtScale(nNewPart,{{0,0,0},{1,0,0},{0,1,0},{0,0,1}}, dWidth, dLength, 1, GDB_RT.GLOB)
end
end
end
-- recupero eventuale flag di mirror
local sMirr = EgtGetInfo( nNewLayer, 'Mirror')
if sMirr then
EgtSetInfo( Lg, 'Mirror', sMirr)
end
-- riloco tutti i nuovi layer dal nuovo pezzo al pezzo corrente
while nNewLayer do