DataDoors 2.7e2 :
- aggiunta gestione decori da disegno (file nge) non specchiati da info Mirror=0 nel primo layer.
This commit is contained in:
+13
-13
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user