Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 348cd4401a | |||
| b472c6b88e | |||
| 0c7849263c | |||
| 6313edfaea | |||
| 056a58f256 | |||
| 2fe9082c76 | |||
| 1cbd3dd543 | |||
| 1b14161097 | |||
| b8df81d05d | |||
| 5610683287 | |||
| 56be11a18b | |||
| 0613fa0df6 | |||
| 747b74d2bf | |||
| e44f5fae57 | |||
| c608187245 | |||
| 744ac0d86f | |||
| 6c9d861fd7 | |||
| 638e20883c | |||
| c9141e4f7a | |||
| a2e5241fdf | |||
| c9763a6834 | |||
| 4f17a95ebd | |||
| 74fc7d80fd |
+113
-73
@@ -1,16 +1,4 @@
|
||||
--
|
||||
-- EEEEEEEEEE GGGGGG wwww wwww
|
||||
-- EEEEEEEEEE GGGGGGGGGG wwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwww wwww
|
||||
-- EEEE GGGG wwww wwww wwww
|
||||
-- EEEEEEE GGGG GGGGGGG wwww wwwwww wwww
|
||||
-- EEEEEEE GGGG GGGGGGG wwww wwwwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwwwwwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwww wwww wwww
|
||||
-- EEEEEEEEEE GGGGGGGGGG wwwwwwww wwwwwwww
|
||||
-- EEEEEEEEEE GGGGGG wwwwwww wwwwwww
|
||||
--
|
||||
-- EgtDoorsBase.lua by EgalWare s.r.l. 2016.06.22
|
||||
-- EgtDoorsBase.lua by EgalWare s.r.l. 2025.10.19
|
||||
-- Doors Base library
|
||||
|
||||
-- 2016.06.22 V1.000 FM First version
|
||||
@@ -23,9 +11,10 @@
|
||||
-- 2021.06.08 V2.005 FM Modify function MakeClcPath to clean corner for DiamondShape
|
||||
-- 2022.01.17 V2.006 FM Add function MakeConeClcPath
|
||||
-- 2024.02.21 V2.007 FM Add function mm()
|
||||
-- 2025.05.05 v2.7e1 DS Nuovo tipo di ConeCleanCorner che fa metà da sopra e metà da sotto senza baffi ( -1 < dMode < 0).
|
||||
-- 2025.10.19 v2.7j1 DS Controllo regioni in Z di lavorazioni ora verifica che facce arrivino o superino sopra o sotto della porta.
|
||||
|
||||
require( 'EgtBase')
|
||||
require( 'EgtConst')
|
||||
require( 'EgtLinearDimension')
|
||||
|
||||
-- Tavola per definizione modulo
|
||||
@@ -228,24 +217,23 @@ end
|
||||
function MakeConeClcPath( CLCN, nGroup, dThick, dLengthOri, dMode)
|
||||
|
||||
local tHint = {}
|
||||
local nPath
|
||||
local pEnd
|
||||
local ptEnd
|
||||
local nAuxId
|
||||
local ptApPoint
|
||||
|
||||
-- disegno angolo X+ Y-
|
||||
local vtExtr = VectorFromSpherical( 1, 45, -45)
|
||||
-- attenzione spessore deve essere negativo
|
||||
dThick = - abs( dThick)
|
||||
-- lunghezza approccio
|
||||
local dLongLine = EgtIf( dLengthOri, dLengthOri + 1, 1)
|
||||
-- versori utilizzati
|
||||
local vtExtrExit, vtExtr
|
||||
local vtN2 = Vector3d(0,-1,0)
|
||||
local vtN3 = Vector3d(1,0,0)
|
||||
-- lunghezza approccio inclinato
|
||||
local dLongAngLine = dLongLine / vtExtr:getX()
|
||||
-- note per variazioni
|
||||
local sMVar
|
||||
|
||||
-- disegno angolo x-y+
|
||||
-- sommo i tre versori per avere una direzione media
|
||||
vtExtrExit = vtN2 + vtN3
|
||||
vtExtrExit:normalize()
|
||||
vtExtr = vtExtrExit + Z_AX()
|
||||
vtExtr:normalize()
|
||||
|
||||
if dMode < GEO.EPS_SMALL then
|
||||
-- pulizia standard (dall'alto in basso e poi baffi sotto)
|
||||
if abs( dMode) < GEO.EPS_SMALL then
|
||||
-- prima linea discendente
|
||||
nAuxId = EgtLine( nGroup, Point3d(0,0,0), Point3d(0,0,dThick), GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
@@ -264,92 +252,147 @@ function MakeConeClcPath( CLCN, nGroup, dThick, dLengthOri, dMode)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, Point3d(0,0,dThick), GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- ultima linea di distacco (5mm in direzione utensile)
|
||||
pEnd = Point3d(0,0,dThick) + ( 5 * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, Point3d(0,0,dThick), pEnd, GDB_RT.GLOB)
|
||||
ptEnd = Point3d(0,0,dThick) + ( 5 * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, Point3d(0,0,dThick), ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
|
||||
-- da sotto il pezzo in alto
|
||||
elseif dMode < -1.5 then
|
||||
-- parto da sopra + 15 (per evitare movimenti in feed)
|
||||
ptApPoint = ORIG() + ( dLongAngLine * vtExtr) ; ptApPoint:setZ( 15.0)
|
||||
ptEnd = Point3d( ptApPoint) ; ptEnd:setZ( dThick)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- mi porto in basso staccato
|
||||
ptApPoint = Point3d( ptEnd)
|
||||
ptEnd = ptApPoint - ( dLongAngLine * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- risalita fino a sopra + 0.5
|
||||
ptApPoint = Point3d( ptEnd)
|
||||
ptEnd:setZ( 0.5)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- variazioni
|
||||
sMVar = '{ent=1,code=MaxFeed}'
|
||||
|
||||
-- dall'alto a metà, poi da sotto il pezzo in su
|
||||
elseif dMode < 0 then
|
||||
-- linea discendente a metà spessore - 1
|
||||
ptApPoint = Point3d(0,0,-dMode)
|
||||
ptEnd = Point3d(0,0,( ( dThick/2) - 1))
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- linea di distacco (pari a dLongAngLine in direzione utensile)
|
||||
ptApPoint = ptEnd
|
||||
ptEnd = ptApPoint + ( dLongAngLine * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- linea discendente alla profondità pari allo spessore
|
||||
ptApPoint = ptEnd
|
||||
ptEnd = Point3d( ptApPoint:getX(), ptApPoint:getY(), dThick)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- linea discendente inclinata sulla direzione dello spigolo
|
||||
ptApPoint = ptEnd
|
||||
ptEnd = ptApPoint - ( dLongAngLine * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- risalita a metà spessore + 1
|
||||
ptApPoint = ptEnd
|
||||
ptEnd = Point3d( ptApPoint:getX(), ptApPoint:getY(), ( ( dThick/2) + 1))
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- ultima linea di distacco (5mm in direzione utensile)
|
||||
ptApPoint = ptEnd
|
||||
ptEnd = Point3d(0,0,( ( dThick/2) + 1)) + ( 5 * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
|
||||
-- baffi in alto, poi discesa a metà infine da sotto il pezzo in su
|
||||
else
|
||||
-- prima linea discendente al valore di dMode
|
||||
pEnd = Point3d(0,0,-dMode)
|
||||
nAuxId = EgtLine( nGroup, Point3d(0,0,0), pEnd, GDB_RT.GLOB)
|
||||
ptEnd = Point3d(0,0,-dMode)
|
||||
nAuxId = EgtLine( nGroup, Point3d(0,0,0), ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- seconda linea
|
||||
ptApPoint = Point3d( 0, -dLongLine, -dMode)
|
||||
nAuxId = EgtLine( nGroup, pEnd, ptApPoint, GDB_RT.GLOB)
|
||||
nAuxId = EgtLine( nGroup, ptEnd, ptApPoint, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- creo linea di ritorno
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, pEnd, GDB_RT.GLOB)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- quarta linea
|
||||
ptApPoint = Point3d( dLongLine, 0, -dMode)
|
||||
nAuxId = EgtLine( nGroup, pEnd, ptApPoint, GDB_RT.GLOB)
|
||||
nAuxId = EgtLine( nGroup, ptEnd, ptApPoint, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- creo linea di ritorno
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, pEnd, GDB_RT.GLOB)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- linea discendente a metà spessore - 1
|
||||
ptApPoint = pEnd
|
||||
pEnd = Point3d(0,0,( ( dThick/2) - 1))
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, pEnd, GDB_RT.GLOB)
|
||||
ptApPoint = ptEnd
|
||||
ptEnd = Point3d(0,0,( ( dThick/2) - 1))
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- linea di distacco (pari a dLongLine in direzione utensile)
|
||||
ptApPoint = pEnd
|
||||
pEnd = ptApPoint + ( dLongLine * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, pEnd, GDB_RT.GLOB)
|
||||
-- linea di distacco (pari a dLongAngLine in direzione utensile)
|
||||
ptApPoint = ptEnd
|
||||
ptEnd = ptApPoint + ( dLongAngLine * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- linea discendente alla profondità pari allo spessore
|
||||
ptApPoint = pEnd
|
||||
pEnd = Point3d( ptApPoint:getX(), ptApPoint:getY(), dThick)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, pEnd, GDB_RT.GLOB)
|
||||
ptApPoint = ptEnd
|
||||
ptEnd = Point3d( ptApPoint:getX(), ptApPoint:getY(), dThick)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- linea discendente inclinata sulla direzione dello spigolo
|
||||
ptApPoint = pEnd
|
||||
pEnd = ptApPoint - ( dLongLine * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, pEnd, GDB_RT.GLOB)
|
||||
ptApPoint = ptEnd
|
||||
ptEnd = ptApPoint - ( dLongAngLine * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- risalita a metà spessore + 1
|
||||
ptApPoint = pEnd
|
||||
pEnd = Point3d( ptApPoint:getX(), ptApPoint:getY(), ( ( dThick/2) + 1))
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, pEnd, GDB_RT.GLOB)
|
||||
ptApPoint = ptEnd
|
||||
ptEnd = Point3d( ptApPoint:getX(), ptApPoint:getY(), ( ( dThick/2) + 1))
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
-- ultima linea di distacco (5mm in direzione utensile)
|
||||
ptApPoint = pEnd
|
||||
pEnd = Point3d(0,0,( ( dThick/2) + 1)) + ( 5 * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, pEnd, GDB_RT.GLOB)
|
||||
ptApPoint = ptEnd
|
||||
ptEnd = Point3d(0,0,( ( dThick/2) + 1)) + ( 5 * vtExtr)
|
||||
nAuxId = EgtLine( nGroup, ptApPoint, ptEnd, GDB_RT.GLOB)
|
||||
table.insert( tHint, nAuxId)
|
||||
end
|
||||
|
||||
-- trasformo in percorso
|
||||
local nPath
|
||||
if #tHint > 0 then
|
||||
nPath = EgtCurveCompo( nGroup, tHint, true)
|
||||
end
|
||||
|
||||
if nPath then
|
||||
EgtModifyCurveExtrusion( nPath, vtExtr, GDB_RT.GLOB)
|
||||
EgtModifyCurveThickness( nPath, 0)
|
||||
EgtSetName( nPath, CLCN)
|
||||
-- modifico versore direzione
|
||||
EgtModifyCurveExtrusion( nPath, vtExtr, GDB_RT.GLOB)
|
||||
EgtSetInfo( nPath, 'ActiveStopMach', 1)
|
||||
EgtSetInfo( nPath, 'SetMaxElev', 1)
|
||||
if sMVar then EgtSetInfo( nPath, 'MVar', sMVar) end
|
||||
end
|
||||
|
||||
return nPath
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
local function SetUpRegion( nSrfU, pIni, ptMin, ptMax, sNameDwReg, sNameUpReg, bReference, bGenOutput, dThId, vtExtr, bMove)
|
||||
local function SetUpRegion( nSrfU, ptIni, ptMin, ptMax, sNameDwReg, sNameUpReg, bReference, bGenOutput, dThId, vtExtr, bMove)
|
||||
|
||||
local bSurfUp
|
||||
|
||||
if not DGD.Dws then
|
||||
if bMove then
|
||||
-- EgtMove( nSrfU, Point3d(0,0,(dThId * vtExtr:getZ())) - ORIG())
|
||||
EgtMove( nSrfU, Point3d(dThId * vtExtr) - ORIG())
|
||||
end
|
||||
if abs( pIni:getZ() - ptMin:getZ()) < GEO.EPS_SMALL then -- se geometria è sulla faccia sotto
|
||||
if ptIni:getZ() < ptMin:getZ() + GEO.EPS_SMALL then -- se geometria è sulla faccia sotto
|
||||
EgtSetName( nSrfU, sNameDwReg)
|
||||
EgtSetInfo( nSrfU, 'ReferHw', bReference) -- setto la nota che indica a cosa è riferita, false: per backset true: per door side
|
||||
bSurfUp = false
|
||||
elseif abs( pIni:getZ() - ptMax:getZ()) < GEO.EPS_SMALL then -- se geometria è sulla faccia sopra
|
||||
elseif ptIni:getZ() > ptMax:getZ() - GEO.EPS_SMALL then -- se geometria è sulla faccia sopra
|
||||
EgtSetName( nSrfU, sNameUpReg)
|
||||
EgtSetInfo( nSrfU, 'ReferHw', bReference) -- setto la nota che indica a cosa è riferita, false: per backset true: per door side
|
||||
bSurfUp = true
|
||||
@@ -359,14 +402,13 @@ local function SetUpRegion( nSrfU, pIni, ptMin, ptMax, sNameDwReg, sNameUpReg, b
|
||||
else
|
||||
if DGD.nTypePz == 3 then -- se frame left
|
||||
if bMove then
|
||||
-- EgtMove( nSrfU, Point3d((dThId * vtExtr:getX()),0,0) - ORIG())
|
||||
EgtMove( nSrfU, Point3d(dThId * vtExtr) - ORIG())
|
||||
end
|
||||
if abs( pIni:getX() - ptMin:getX()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sotto
|
||||
if abs( ptIni:getX() - ptMin:getX()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sotto
|
||||
EgtSetName( nSrfU, sNameDwReg)
|
||||
EgtSetInfo( nSrfU, 'ReferHw', bReference) -- setto la nota che indica a cosa è riferita, false: per backset true: per door side
|
||||
bSurfUp = false
|
||||
elseif abs( pIni:getX() - ptMax:getX()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sopra
|
||||
elseif abs( ptIni:getX() - ptMax:getX()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sopra
|
||||
EgtSetName( nSrfU, sNameUpReg)
|
||||
EgtSetInfo( nSrfU, 'ReferHw', bReference) -- setto la nota che indica a cosa è riferita, false: per backset true: per door side
|
||||
bSurfUp = true
|
||||
@@ -375,14 +417,13 @@ local function SetUpRegion( nSrfU, pIni, ptMin, ptMax, sNameDwReg, sNameUpReg, b
|
||||
end
|
||||
elseif DGD.nTypePz == 4 then -- se frame right
|
||||
if bMove then
|
||||
-- EgtMove( nSrfU, Point3d((dThId * vtExtr:getX()),0,0) - ORIG())
|
||||
EgtMove( nSrfU, Point3d(dThId * vtExtr) - ORIG())
|
||||
end
|
||||
if abs( pIni:getX() - ptMax:getX()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sotto
|
||||
if abs( ptIni:getX() - ptMax:getX()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sotto
|
||||
EgtSetName( nSrfU, sNameDwReg)
|
||||
EgtSetInfo( nSrfU, 'ReferHw', bReference) -- setto la nota che indica a cosa è riferita, false: per backset true: per door side
|
||||
bSurfUp = false
|
||||
elseif abs( pIni:getX() - ptMin:getX()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sopra
|
||||
elseif abs( ptIni:getX() - ptMin:getX()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sopra
|
||||
EgtSetName( nSrfU, sNameUpReg)
|
||||
EgtSetInfo( nSrfU, 'ReferHw', bReference) -- setto la nota che indica a cosa è riferita, false: per backset true: per door side
|
||||
bSurfUp = true
|
||||
@@ -391,14 +432,13 @@ local function SetUpRegion( nSrfU, pIni, ptMin, ptMax, sNameDwReg, sNameUpReg, b
|
||||
end
|
||||
elseif DGD.nTypePz == 5 then -- se frame top
|
||||
if bMove then
|
||||
-- EgtMove( nSrfU, Point3d(0,(dThId * vtExtr:getY()),0) - ORIG())
|
||||
EgtMove( nSrfU, Point3d(dThId * vtExtr) - ORIG())
|
||||
end
|
||||
if abs( pIni:getY() - ptMax:getY()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sotto
|
||||
if abs( ptIni:getY() - ptMax:getY()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sotto
|
||||
EgtSetName( nSrfU, sNameDwReg)
|
||||
EgtSetInfo( nSrfU, 'ReferHw', bReference) -- setto la nota che indica a cosa è riferita, false: per backset true: per door side
|
||||
bSurfUp = false
|
||||
elseif abs( pIni:getY() - ptMin:getY()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sopra
|
||||
elseif abs( ptIni:getY() - ptMin:getY()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sopra
|
||||
EgtSetName( nSrfU, sNameUpReg)
|
||||
EgtSetInfo( nSrfU, 'ReferHw', bReference) -- setto la nota che indica a cosa è riferita, false: per backset true: per door side
|
||||
bSurfUp = true
|
||||
@@ -407,14 +447,13 @@ local function SetUpRegion( nSrfU, pIni, ptMin, ptMax, sNameDwReg, sNameUpReg, b
|
||||
end
|
||||
elseif DGD.nTypePz == 6 then -- se frame bottom
|
||||
if bMove then
|
||||
-- EgtMove( nSrfU, Point3d(0,(dThId * vtExtr:getY()),0) - ORIG())
|
||||
EgtMove( nSrfU, Point3d(dThId * vtExtr) - ORIG())
|
||||
end
|
||||
if abs( pIni:getY() - ptMin:getY()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sotto
|
||||
if abs( ptIni:getY() - ptMin:getY()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sotto
|
||||
EgtSetName( nSrfU, sNameDwReg)
|
||||
EgtSetInfo( nSrfU, 'ReferHw', bReference) -- setto la nota che indica a cosa è riferita, false: per backset true: per door side
|
||||
bSurfUp = false
|
||||
elseif abs( pIni:getY() - ptMax:getY()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sopra
|
||||
elseif abs( ptIni:getY() - ptMax:getY()) < GEO.EPS_SMALL then -- se geometria è sulla relativa faccia sopra
|
||||
EgtSetName( nSrfU, sNameUpReg)
|
||||
EgtSetInfo( nSrfU, 'ReferHw', bReference) -- setto la nota che indica a cosa è riferita, false: per backset true: per door side
|
||||
bSurfUp = true
|
||||
@@ -468,6 +507,7 @@ function AddSurfTmByExtrusion( ParId, EntId, bSingleGeom, nSpecialGeom, bSideSur
|
||||
sNameGeom == 'flat_dw_sd_blind' then
|
||||
bExclude = true
|
||||
end
|
||||
if EgtGetInfo( EntId, 'ConeCleanCorner', 'b') then bExclude = true end
|
||||
end
|
||||
if not bExclude then
|
||||
dThId = EgtCurveThickness( nIdGeom)
|
||||
|
||||
@@ -438,7 +438,7 @@ else -- default 'ENG'
|
||||
EgtDoorsMsg[528] = " Disposition for Cms-PF122R8RR :"
|
||||
EgtDoorsMsg[529] = " Disposition for Multiax-N1216 :"
|
||||
EgtDoorsMsg[530] = " Error on MOBILE or FIXED table bar"
|
||||
EgtDoorsMsg[531] = " Error on vacuum disposition: the active vacuums are not enought. Check the cutout geometries or hardware machinings near vacuums"
|
||||
EgtDoorsMsg[531] = " Error on vacuum disposition: the active vacuums are not enough. Check the cutout geometries or hardware machinings near vacuums"
|
||||
EgtDoorsMsg[532] = " Error on vacuum disposition: too many disabled vacuums on left side door. Check the cutout geometries or hardware machinings near vacuums"
|
||||
EgtDoorsMsg[533] = " Error on vacuum disposition: too many disabled vacuums on middle door. Check the cutout geometries or hardware machinings near vacuums"
|
||||
EgtDoorsMsg[534] = " Error on vacuum disposition: too many disabled vacuums on right side door. Check the cutout geometries or hardware machinings near vacuums"
|
||||
@@ -560,7 +560,7 @@ else -- default 'ENG'
|
||||
EgtDoorsMsg[680] = " Error reading Profiles: radius parameters of top side arc makes the length of one side null. Check Top Arc parameters (into ddf file)"
|
||||
EgtDoorsMsg[681] = " Warning! (%s) Into model: %s of piece: %s the parameter %s value %s is modified to: %s because it's bigger or near than jamb thickness: %s "
|
||||
EgtDoorsMsg[682] = " Error in table setting. Verify the parameters nNumTableOnMachine and nNumTableForOtherMaterial into CurrcamInfo.lua file"
|
||||
EgtDoorsMsg[683] = " Error on vise disposition: the active vises are not enought. Check the hardware machinings near vises"
|
||||
EgtDoorsMsg[683] = " Error on vise disposition: the active vises are not enough. Check the hardware machinings near vises"
|
||||
EgtDoorsMsg[684] = " Error on vise disposition: too many disabled vises on left side frame. Check the hardware machinings near vises"
|
||||
EgtDoorsMsg[685] = " Error on vise disposition: too many disabled vises on right side frame. Check the hardware machinings near vises"
|
||||
EgtDoorsMsg[686] = " Error starting simulation: %s"
|
||||
|
||||
+27
-149
@@ -1,17 +1,4 @@
|
||||
--
|
||||
-- EEEEEEEEEE GGGGGG wwww wwww
|
||||
-- EEEEEEEEEE GGGGGGGGGG wwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwww wwww
|
||||
-- EEEE GGGG wwww wwww wwww
|
||||
-- EEEEEEE GGGG GGGGGGG wwww wwwwww wwww
|
||||
-- EEEEEEE GGGG GGGGGGG wwww wwwwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwwwwwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwww wwww wwww
|
||||
-- EEEEEEEEEE GGGGGGGGGG wwwwwwww wwwwwwww
|
||||
-- EEEEEEEEEE GGGGGG wwwwwww wwwwwww
|
||||
--
|
||||
-- Groove.lua by EgalWare s.r.l. 2017.10.13
|
||||
-- Autore: Filippo Monchi
|
||||
-- Groove.lua by EgalWare s.r.l. 2025.11.05
|
||||
-- Groove dati i valori 'L' e 'H' e 'T' e 'd' e 'p' e con nomi attributi
|
||||
|
||||
-- 2016.09.21 V1.011 FM aggiunta messaggi di wanrning
|
||||
@@ -39,7 +26,11 @@
|
||||
-- 2024.10.17 V2.006 FM Improve multiple blade step (on Z dir) when wide groobe is bigger than double blade thickness
|
||||
-- 2024.10.30 V2.007 FM Manage a new .alw parameter to allow width door bigger than door thickness and
|
||||
-- when blade is enables, get the mill max thickness as blade thickness in case mill is used instead blade
|
||||
-- 2025.01.20 V2.008 FM Manage a new .slb parameter to set to force use 1 blade for machining LH side
|
||||
-- 2025.01.20 V2.008 FM Manage a new .slb parameter to set to force use 1 blade for machining LH side.
|
||||
-- 2025.10.19 V2.7j1 DS Aggiunto BOXGROOVE anche nel caso di lama sul top della porta.
|
||||
-- 2025.10.22 V2.7j2 DS Il box precedente è limitato alla sola parte che interseca la porta (per evitare problemi successivi con spessore porta).
|
||||
-- 2025.10.22 V2.7k1 DS Correzione del punto precedente per porte con serratura a destra o a sinistra.
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local Groove = {}
|
||||
|
||||
@@ -1509,77 +1500,6 @@ function Groove.Draw( tOHead, bPreview, bRunByCompo, nDrawMach, dThickDoor)
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
if H > thb + 10*GEO.EPS_SMALL then
|
||||
|
||||
if DGD.TYPE == 'side' then
|
||||
pEnd = EgtIf( f1b, Point3d((L/2), nEndPosY,-T), Point3d(2, nEndPosY,-T))
|
||||
else
|
||||
pEnd = EgtIf( f1b, Point3d(((L/2)-dExLenBl), nEndPosY,-T), Point3d(2, nEndPosY,-T))
|
||||
end
|
||||
|
||||
nSideStep = 0
|
||||
|
||||
-- creo n percorsi di side step
|
||||
repeat
|
||||
|
||||
nSideStep = nSideStep + 1
|
||||
dSideDepth = EgtIf( (StpBd * nSideStep) > T, T, (StpBd * nSideStep))
|
||||
|
||||
-- percorso up già affondato allo spessore cava e calcolato per il centro spessore lama
|
||||
hint3 = DrawAddLineDrawCircle( Point3d(-((L/2)-dExLenBl), nEndPosY,-dSideDepth), Point3d( pEnd:getX(), pEnd:getY(),-dSideDepth),
|
||||
Lg, nil, bPreview, Dm, (d3/2), false, false, ORANGE(), ORANGE())
|
||||
nPkToJoin3 = EgtCurveCompo( Lg, {hint3}, true)
|
||||
EgtModifyCurveThickness( nPkToJoin3, 0)
|
||||
EgtModifyCurveExtrusion( nPkToJoin3, Y_AX(), GDB_RT.GLOB)
|
||||
|
||||
if DGD.TYPE == 'side' then
|
||||
if not nNewLeadInOutMode then
|
||||
EgtSetName( nPkToJoin3, LBMU .. '_NLI')
|
||||
else
|
||||
EgtSetName( nPkToJoin3, LBM)
|
||||
EgtSetInfo( nPkToJoin3, 'PathType', 'NR')
|
||||
EgtSetInfo( nPkToJoin3, 'LeadType', '_NLI')
|
||||
if not f1b then
|
||||
EgtSetInfo( nPkToJoin3, 'ToolsUse', 'TW')
|
||||
end
|
||||
end
|
||||
elseif DGD.TYPE == 'center' then
|
||||
if not nNewLeadInOutMode then
|
||||
EgtSetName( nPkToJoin3, LBMU .. '_NLILO')
|
||||
else
|
||||
EgtSetName( nPkToJoin3, LBM)
|
||||
EgtSetInfo( nPkToJoin3, 'PathType', 'NR')
|
||||
EgtSetInfo( nPkToJoin3, 'LeadType', '_NLILO')
|
||||
if not f1b then
|
||||
EgtSetInfo( nPkToJoin3, 'ToolsUse', 'TW')
|
||||
end
|
||||
end
|
||||
else
|
||||
if not nNewLeadInOutMode then
|
||||
EgtSetName( nPkToJoin3, LBMU)
|
||||
else
|
||||
EgtSetName( nPkToJoin3, LBM)
|
||||
EgtSetInfo( nPkToJoin3, 'PathType', 'NR')
|
||||
if not f1b then
|
||||
EgtSetInfo( nPkToJoin3, 'ToolsUse', 'TW')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if red and red ~= 0 and DGD.TYPE == 'side' and nPkToJoin3 then
|
||||
EgtMove( nPkToJoin3, Point3d((red/2),0,0) - ORIG())
|
||||
end
|
||||
-- se mantiene backset su mortise
|
||||
if kbs and kbs > 1 and nPkToJoin3 then
|
||||
EgtSetInfo( nPkToJoin3, 'KeepBackSet', 'c') -- setto 'c' perché viene mantenuto il centro spessore
|
||||
end
|
||||
if pbs and pbs > 1 and nPkToJoin3 and DGC.Pms and DGC.Pms > 2 then
|
||||
EgtSetInfo( nPkToJoin3, 'ProbeSide', '1')
|
||||
end
|
||||
until dSideDepth >= T
|
||||
end
|
||||
]]--
|
||||
-- se non ho la forzatura a utilizzare solo una lama
|
||||
if not f1b then
|
||||
|
||||
@@ -1721,69 +1641,6 @@ function Groove.Draw( tOHead, bPreview, bRunByCompo, nDrawMach, dThickDoor)
|
||||
dMiddlePosY = dMiddlePosY + dStepY
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
if H > thb then
|
||||
|
||||
if DGD.TYPE == 'side' then
|
||||
pIni = Point3d((L/2), nEndPosY,-T)
|
||||
else
|
||||
pIni = Point3d(((L/2)-dExLenBl), nEndPosY,-T)
|
||||
end
|
||||
|
||||
nSideStep = 0
|
||||
|
||||
-- creo n percorsi di side step
|
||||
repeat
|
||||
|
||||
nSideStep = nSideStep + 1
|
||||
dSideDepth = EgtIf( (StpBd * nSideStep) > T, T, (StpBd * nSideStep))
|
||||
|
||||
-- percorso inverso ( antischeggia) up già affondato allo spessore cava e calcolato per il centro spessore lama
|
||||
hint4 = DrawAddLineDrawCircle( Point3d( pIni:getX(), pIni:getY(),-dSideDepth), Point3d(-2, nEndPosY,-dSideDepth),
|
||||
Lg, nil, bPreview, Dm, (d3/2), false, false, ORANGE(), ORANGE())
|
||||
nPkToJoin4 = EgtCurveCompo( Lg, {hint4}, true)
|
||||
EgtModifyCurveThickness( nPkToJoin4, 0)
|
||||
EgtModifyCurveExtrusion( nPkToJoin4, Y_AX(), GDB_RT.GLOB)
|
||||
|
||||
if DGD.TYPE == 'side' then
|
||||
if not nNewLeadInOutMode then
|
||||
EgtSetName( nPkToJoin4, LAMU .. '_NLO')
|
||||
else
|
||||
EgtSetName( nPkToJoin4, LAM)
|
||||
EgtSetInfo( nPkToJoin4, 'LeadType', '_NLO')
|
||||
EgtSetInfo( nPkToJoin4, 'PathType', 'AS')
|
||||
end
|
||||
elseif DGD.TYPE == 'center' then
|
||||
if not nNewLeadInOutMode then
|
||||
EgtSetName( nPkToJoin4, LAMU .. '_NLILO')
|
||||
else
|
||||
EgtSetName( nPkToJoin4, LAM)
|
||||
EgtSetInfo( nPkToJoin4, 'LeadType', '_NLILO')
|
||||
EgtSetInfo( nPkToJoin4, 'PathType', 'AS')
|
||||
end
|
||||
else
|
||||
if not nNewLeadInOutMode then
|
||||
EgtSetName( nPkToJoin4, LAMU)
|
||||
else
|
||||
EgtSetName( nPkToJoin4, LAM)
|
||||
EgtSetInfo( nPkToJoin4, 'PathType', 'AS')
|
||||
end
|
||||
end
|
||||
|
||||
if red and red ~= 0 and DGD.TYPE == 'side' and nPkToJoin4 then
|
||||
EgtMove( nPkToJoin4, Point3d((red/2),0,0) - ORIG())
|
||||
end
|
||||
-- se mantiene backset su mortise
|
||||
if kbs and kbs > 1 and nPkToJoin4 then
|
||||
EgtSetInfo( nPkToJoin4, 'KeepBackSet', 'c') -- setto 'c' perché viene mantenuto il centro spessore
|
||||
end
|
||||
if pbs and pbs > 1 and nPkToJoin4 and DGC.Pms and DGC.Pms > 2 then
|
||||
EgtSetInfo( nPkToJoin4, 'ProbeSide', '1')
|
||||
end
|
||||
until dSideDepth >= T
|
||||
end
|
||||
--]]
|
||||
end
|
||||
|
||||
-- creo percorso/i pulitura spigoli
|
||||
@@ -1832,6 +1689,27 @@ function Groove.Draw( tOHead, bPreview, bRunByCompo, nDrawMach, dThickDoor)
|
||||
EgtSetInfo( hint5, 'ProbeSide', '1')
|
||||
end
|
||||
end
|
||||
-- se groove sul top della porta, creo la geometria che ne rappresenta l'ingombro (per poi verificare eventuale collisione con ventose)
|
||||
if EC == 0 and DGD.SIDE == 'top' and nDrawMach > 0 then
|
||||
-- determino se interessa la porta
|
||||
local dOffset = DGD.GROOVE_OFFSET or DGD.dT / 2
|
||||
local dMaxZ = min( dOffset + H / 2, DGD.dT)
|
||||
local dMinZ = max( dOffset - H / 2, 0)
|
||||
if dMaxZ > dMinZ + 0.1 then
|
||||
-- setto la griglia back o front a seconda del lato serratura
|
||||
EgtSetGridFrame( Frame3d( 0, 0, 0, EgtIf( DGD.Lock == 'R', GDB_FR.BACK, GDB_FR.FRONT)))
|
||||
local dPosZ = dMaxZ - dOffset
|
||||
local dHeight = dMaxZ - dMinZ
|
||||
GId = EgtRectangle2P( Lg, Point3d( -((dWidthShape-d)/2), 0, dPosZ), Point3d( ((dWidthShape-d)/2), -T, dPosZ), GDB_RT.GRID)
|
||||
if GId then
|
||||
EgtInvertCurve(GId)
|
||||
EgtModifyCurveThickness( GId, -dHeight)
|
||||
EgtSetName( GId, 'BOXGROOVE')
|
||||
end
|
||||
-- risetto la griglia top
|
||||
EgtSetGridFrame( Frame3d( 0, 0, 0, GDB_FR.TOP))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+23
-14
@@ -90,23 +90,33 @@ 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
|
||||
-- recupero eventuale flag di rotazione (positivo verso le cerniere)
|
||||
local sRot = EgtGetInfo( nNewLayer, 'Rotate')
|
||||
if sRot then
|
||||
EgtSetInfo( Lg, 'Rotate', sRot)
|
||||
end
|
||||
-- recupero eventuali parametri di trim sui lati (lock, top, hinge, bottom)
|
||||
local sTrim = EgtGetInfo( nNewLayer, 'TrimLTHB')
|
||||
if sTrim then
|
||||
EgtSetInfo( Lg, 'TrimLTHB', sTrim)
|
||||
end
|
||||
|
||||
-- riloco tutti i nuovi layer dal nuovo pezzo al pezzo corrente
|
||||
while nNewLayer do
|
||||
@@ -186,7 +196,6 @@ function ImportNgeFile.Draw( CustGeomPath, CustGeomFile )
|
||||
|
||||
-- se non ho caricato il file geom esco
|
||||
if not MakeFaceGeom then
|
||||
|
||||
-- (NOTA : se ci sono errori il componente non viene eseguito dal programma di gestione dei componenti)
|
||||
-- scrivo note nel layer
|
||||
EgtSetInfo( Lg, 'Type' , 'ImportNgeFile')
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
--
|
||||
-- EEEEEEEEEE GGGGGG wwww wwww
|
||||
-- EEEEEEEEEE GGGGGGGGGG wwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwww wwww
|
||||
-- EEEE GGGG wwww wwww wwww
|
||||
-- EEEEEEE GGGG GGGGGGG wwww wwwwww wwww
|
||||
-- EEEEEEE GGGG GGGGGGG wwww wwwwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwwwwwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwww wwww wwww
|
||||
-- EEEEEEEEEE GGGGGGGGGG wwwwwwww wwwwwwww
|
||||
-- EEEEEEEEEE GGGGGG wwwwwww wwwwwww
|
||||
--
|
||||
-- LouverCutOut.lua by EgalWare s.r.l. 2016.06.30
|
||||
-- LouverCutOut.lua by EgalWare s.r.l. 2025.05.14
|
||||
-- Autore: Filippo Monchi
|
||||
-- LouverCutOut dati i valori 'L' e 'H' e con nome attributo
|
||||
|
||||
@@ -33,6 +21,8 @@
|
||||
-- 2024.09.12 V3.006 FM Fix error on print error/warning message with wrongg variables
|
||||
-- 2024.10.19 V3.007 FM Manage drop path with back and forth
|
||||
-- 2024.11.14 V3.011 FM Manage new ConeCleanCorner path by CurrDoorCustomData DGC.Ccm parameter
|
||||
-- 2025.05.05 v2.7e1 DS DGC.Ccm con valori tra -1 e 0 per ConeCleanCorner che fa metà da sopra e metà da sotto senza baffi.
|
||||
-- 2025.05.14 v2.7e3 DS DGC.Ccm con valore -2 per ConeCleanCorner da sotto a sopra.
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local LouverCutOut = {}
|
||||
@@ -183,8 +173,8 @@ function LouverCutOut.AdjustParams( tMhPar)
|
||||
if not DGC.Ccm then
|
||||
tMhPar.Ccm = 0
|
||||
else
|
||||
tMhPar.Ccm = abs( DGC.Ccm)
|
||||
if tMhPar.Ccm > 1 then
|
||||
tMhPar.Ccm = DGC.Ccm
|
||||
if abs( tMhPar.Ccm) > 1 and tMhPar.Ccm ~= -2 then
|
||||
tMhPar.Ccm = 0
|
||||
end
|
||||
-- verifico se spessore porta ammette la seconda modalità, nel caso torno alla prima modalità
|
||||
|
||||
+49
-27
@@ -1,17 +1,4 @@
|
||||
--
|
||||
-- EEEEEEEEEE GGGGGG wwww wwww
|
||||
-- EEEEEEEEEE GGGGGGGGGG wwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwww wwww
|
||||
-- EEEE GGGG wwww wwww wwww
|
||||
-- EEEEEEE GGGG GGGGGGG wwww wwwwww wwww
|
||||
-- EEEEEEE GGGG GGGGGGG wwww wwwwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwwwwwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwww wwww wwww
|
||||
-- EEEEEEEEEE GGGGGGGGGG wwwwwwww wwwwwwww
|
||||
-- EEEEEEEEEE GGGGGG wwwwwww wwwwwww
|
||||
--
|
||||
-- VisionCutOut.lua by EgalWare s.r.l. 2016.06.24
|
||||
-- Autore: Dario Sassi
|
||||
-- VisionCutOut.lua by EgalWare s.r.l. 2025.05.14
|
||||
-- VisionCutOut dati i valori 'L' e 'H' e con nome attributo
|
||||
|
||||
-- 2017.10.18 V1.0a1 FM Start point path near lock side
|
||||
@@ -39,6 +26,10 @@
|
||||
-- 2023.02.03 V3.009 FM Fix error on disabled clean cone parameter ccn
|
||||
-- 2024.10.19 V3.010 FM Manage drop path with back and forth
|
||||
-- 2024.11.14 V3.011 FM Manage new ConeCleanCorner path by CurrDoorCustomData DGC.Ccm parameter
|
||||
-- 2025.04.07 v2.7d2 DS Split trasversale divide in due la porta (Dutch Door).
|
||||
-- 2025.05.05 v2.7e1 DS DGC.Ccm con valori tra -1 e 0 per ConeCleanCorner che fa metà da sopra e metà da sotto senza baffi.
|
||||
-- 2025.05.06 v2.7e2 DS Aggiunti antischeggia per Split.
|
||||
-- 2025.05.14 v2.7e3 DS DGC.Ccm con valore -2 per ConeCleanCorner da sotto a sopra.
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local VisionCutOut = {}
|
||||
@@ -54,6 +45,7 @@ EgtAddToPackagePath( DGD.BASEDIR .. '?.lua')
|
||||
-- Valori limite
|
||||
local DimMin = 2. -- valore minimo lato
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function GetMachToolErrorMessage( nErrorId, sGeomName, dIdMach, dOriDiamTool, nIdLogErr, sMchngName)
|
||||
|
||||
local EgtDoorsMsg = require( 'EgtDoorsMsg')
|
||||
@@ -98,6 +90,7 @@ local function GetMachToolErrorMessage( nErrorId, sGeomName, dIdMach, dOriDiamTo
|
||||
return sMessage
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function CalcIntersect( DRP1, hint_ofs, pIni, pEnd, dExtraLen)
|
||||
|
||||
if DRP1 and hint_ofs then
|
||||
@@ -127,6 +120,7 @@ local function CalcIntersect( DRP1, hint_ofs, pIni, pEnd, dExtraLen)
|
||||
return DRP1
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function DrawAddLineDrawCircle( pInitial, pFinal, nGroup, idTable, bPrev, nGroupCirc, nRad, bDrawFirst, bDrawLast, cColor1, cColor2)
|
||||
|
||||
local nLine = EgtLine(nGroup, pInitial, pFinal, GDB_RT.LOC)
|
||||
@@ -150,6 +144,7 @@ local function DrawAddLineDrawCircle( pInitial, pFinal, nGroup, idTable, bPrev,
|
||||
return nLine
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function DrawAddCircleDrawCircle( pCenter, dRadius, dAngIni, dAngCen, nGroup, idTable, bPrev, nGroupCirc,
|
||||
nRad, bDrawFirst, bDrawLast, cColor1, cColor2, sMVar)
|
||||
|
||||
@@ -179,7 +174,7 @@ local function DrawAddCircleDrawCircle( pCenter, dRadius, dAngIni, dAngCen, nGro
|
||||
return nCircle, nNumCircle, sMVar
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function DrawRectangleWithFillet ( Lg, L, H, dThickD, rf)
|
||||
|
||||
local tHint = {}
|
||||
@@ -236,7 +231,7 @@ local function DrawRectangleWithFillet ( Lg, L, H, dThickD, rf)
|
||||
return hint
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function DrawDiamondWithFillet ( Lg, L, H, dThickD, rf, dRad, sLockSide)
|
||||
|
||||
local tHint = {}
|
||||
@@ -336,7 +331,7 @@ local function DrawDiamondWithFillet ( Lg, L, H, dThickD, rf, dRad, sLockSide)
|
||||
return hint, nLocKindGeom
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function DrawRectangleAndMakeItsRegion( Lg, bPreview, Dm, nIdPath, dTh)
|
||||
|
||||
local nId, nId1, nId2, nId3, nId4
|
||||
@@ -366,7 +361,7 @@ local function DrawRectangleAndMakeItsRegion( Lg, bPreview, Dm, nIdPath, dTh)
|
||||
end
|
||||
end
|
||||
|
||||
-- Funzione di sistemazione parametri
|
||||
-------------------------------------- Sistemazione parametri -----------------------------------------------
|
||||
function VisionCutOut.AdjustParams( tMhPar)
|
||||
|
||||
local EgtDoorsMsg = require( 'EgtDoorsMsg')
|
||||
@@ -404,8 +399,7 @@ function VisionCutOut.AdjustParams( tMhPar)
|
||||
tMhPar.W = DGD.WIDTH
|
||||
elseif tMhPar.dir == '1' then
|
||||
tMhPar.L = DGD.WIDTH
|
||||
-- riduco la larghezza della cava per non creare regioni interrotte
|
||||
tMhPar.W = DGD.dW - ( 3 * DGD.dT * TAN3)
|
||||
tMhPar.W = DGD.dW
|
||||
end
|
||||
elseif tMhPar.split == nil then
|
||||
if DGD.LENGTH then
|
||||
@@ -430,8 +424,8 @@ function VisionCutOut.AdjustParams( tMhPar)
|
||||
if not DGC.Ccm then
|
||||
tMhPar.Ccm = 0
|
||||
else
|
||||
tMhPar.Ccm = abs( DGC.Ccm)
|
||||
if tMhPar.Ccm > 1 then
|
||||
tMhPar.Ccm = DGC.Ccm
|
||||
if abs( tMhPar.Ccm) > 1 and tMhPar.Ccm ~= -2 then
|
||||
tMhPar.Ccm = 0
|
||||
end
|
||||
-- verifico se spessore porta ammette la seconda modalità, nel caso torno alla prima modalità
|
||||
@@ -687,7 +681,7 @@ function VisionCutOut.AdjustParams( tMhPar)
|
||||
return tMhPar, 0, ''
|
||||
end
|
||||
|
||||
-- Funzione di disegno
|
||||
------------------------------ Disegno ----------------------------------------------------------------------
|
||||
function VisionCutOut.Draw( tVisPar, bPreview, bRunByCompo, nDrawMach)
|
||||
|
||||
-- Assegno le dimensioni
|
||||
@@ -712,6 +706,7 @@ function VisionCutOut.Draw( tVisPar, bPreview, bRunByCompo, nDrawMach)
|
||||
local dir = tVisPar.dir
|
||||
local split = tVisPar.split
|
||||
local spo = tVisPar.spo
|
||||
local T2 = tVisPar.T2
|
||||
-- tabelle gola laterale clip (clip side groove)
|
||||
local tClipSideGroove = {}
|
||||
-- inserimento dati nella tabella fori
|
||||
@@ -723,6 +718,7 @@ function VisionCutOut.Draw( tVisPar, bPreview, bRunByCompo, nDrawMach)
|
||||
local CLCN = tVisPar.CLCN
|
||||
local DM = tVisPar.DM -- nome lavorazione hatchind
|
||||
local LBM = tVisPar.LBM -- nome lavorazione con lama
|
||||
local LA = tVisPar.LA -- nome lavorazione AS
|
||||
-- variabili per messaggi e settaggi vari
|
||||
local sCompoName = tVisPar.Nome
|
||||
local nCompoNpar = tVisPar.Npar
|
||||
@@ -764,9 +760,6 @@ function VisionCutOut.Draw( tVisPar, bPreview, bRunByCompo, nDrawMach)
|
||||
|
||||
-- variabile spostamento rettangolo con cava split trasversale
|
||||
local dPosX = 0
|
||||
if split and dir == '1' then
|
||||
dPosX = T * TAN3 * 1.5
|
||||
end
|
||||
|
||||
-- variabili calcolo diamond shape
|
||||
local nIpo1, nIpo2, nIpo3, dTan, dAng, dRad
|
||||
@@ -1131,7 +1124,7 @@ function VisionCutOut.Draw( tVisPar, bPreview, bRunByCompo, nDrawMach)
|
||||
if ds then
|
||||
MId, nKindGeom = DrawDiamondWithFillet( Lg, W, L, T, R, dRad, DGD.Lock)
|
||||
else
|
||||
MId = DrawRectangleWithFillet ( Lg, W, L, T, R)
|
||||
MId = DrawRectangleWithFillet( Lg, W, L, T, R)
|
||||
end
|
||||
if MId then
|
||||
EgtMove( MId, Point3d(W/2,-(L/2),0) - ORIG())
|
||||
@@ -1432,6 +1425,35 @@ function VisionCutOut.Draw( tVisPar, bPreview, bRunByCompo, nDrawMach)
|
||||
EgtSetName( MId, LM)
|
||||
end
|
||||
end
|
||||
|
||||
-- eventuale antischeggia per split (validi se rotazione utensile di split oraria)
|
||||
if split and T2 and LA then
|
||||
local bHoriz = ( dir ~= '0')
|
||||
local bBvDw = ( DGD.sSecSide == 'UP')
|
||||
local ptP1, ptP2, vtDir, vtExtr
|
||||
if bHoriz then
|
||||
ptP1 = EgtIf( bBvDw, Point3d( 0, 0, 0), Point3d( W, 0, DGD.dT))
|
||||
ptP2 = EgtIf( bBvDw, Point3d( W, -L, 0), Point3d( 0, -L, DGD.dT))
|
||||
vtDir = EgtIf( bBvDw, Z_AX(), -Z_AX())
|
||||
vtExtr = EgtIf( bBvDw, -X_AX(), X_AX())
|
||||
else
|
||||
ptP1 = EgtIf( bBvDw, Point3d( W, 0, 0), Point3d( 0, 0, DGD.dT))
|
||||
ptP2 = EgtIf( bBvDw, Point3d( 0, -L, 0), Point3d( W, -L, DGD.dT))
|
||||
vtDir = EgtIf( bBvDw, Z_AX(), -Z_AX())
|
||||
vtExtr = Y_AX()
|
||||
end
|
||||
-- prima linea
|
||||
local As1Id = EgtLinePVL( Lg, ptP1, vtDir, DGD.dT, GDB_RT.LOC)
|
||||
EgtModifyCurveExtrusion( As1Id, vtExtr)
|
||||
EgtModifyCurveThickness( As1Id, -T2)
|
||||
EgtSetName( As1Id, LA)
|
||||
-- seconda linea
|
||||
local As2Id = EgtLinePVL( Lg, ptP2, vtDir, DGD.dT, GDB_RT.LOC)
|
||||
EgtModifyCurveExtrusion( As2Id, -vtExtr)
|
||||
EgtModifyCurveThickness( As2Id, -T2)
|
||||
EgtSetName( As2Id, LA)
|
||||
end
|
||||
|
||||
elseif split == nil then
|
||||
EC = (ErrorBase+5)
|
||||
EM = EgtDoorsMsg[408] -- mancano i parametri delle dimensioni
|
||||
|
||||
+43
-13
@@ -10,22 +10,23 @@
|
||||
-- EEEEEEEEEE GGGGGGGGGG wwwwwwww wwwwwwww
|
||||
-- EEEEEEEEEE GGGGGG wwwwwww wwwwwww
|
||||
--
|
||||
-- _PivotL.lua by EgalWare s.r.l. 2016.07.11
|
||||
-- _PivotL.lua by EgalWare s.r.l. 2026.03.03
|
||||
-- Autore: Filippo Monchi
|
||||
-- PivotL, componente di secondo livello, non può essere chiamato direttamente da un lua dei
|
||||
-- componenti di interfaccia
|
||||
|
||||
-- 2017.09.05 V1.0a2 FM Manage lead-in on opposite side and anti-splint path V lead-in
|
||||
-- 2018.01.08 V1.0a3 FM Manage new R1 parameter to add a fillet on single corner
|
||||
-- 2018.01.12 V1.0a4 FM Manage new anti splint position path when side pivot correspond to side door ( on offset and offsetintermediate type)
|
||||
-- 2018.05.15 V1.0a5 FM Add manage new mode to count entity also on curvecompo path to allow assign note on connection entity
|
||||
-- 2019.07.29 V1.0a6 FM Manage new differents pivot models and submodels: Centerhung pivot with submodel (1), Offset pivot with submodel (1),
|
||||
-- OffsetInpermediate pivot with submodel (1) 4
|
||||
-- the defalult and old one is submodel (1) for all model
|
||||
-- 2019.10.18 V2.000 FM Manage use Materials
|
||||
-- 2019.10.21 V2.001 FM Modify the closed path start point for steel material
|
||||
-- 2020.10.20 V2.002 FM Fix error on insert fillet when L = L3
|
||||
-- 2024.07.19 V2.003 FM Set note 'NotCheckDir' to pocketing and antisplint paths
|
||||
-- 2017.09.05 V1.0a2 FM Manage lead-in on opposite side and anti-splint path V lead-in
|
||||
-- 2018.01.08 V1.0a3 FM Manage new R1 parameter to add a fillet on single corner
|
||||
-- 2018.01.12 V1.0a4 FM Manage new anti splint position path when side pivot correspond to side door ( on offset and offsetintermediate type)
|
||||
-- 2018.05.15 V1.0a5 FM Add manage new mode to count entity also on curvecompo path to allow assign note on connection entity
|
||||
-- 2019.07.29 V1.0a6 FM Manage new differents pivot models and submodels: Centerhung pivot with submodel (1), Offset pivot with submodel (1),
|
||||
-- OffsetInpermediate pivot with submodel (1) 4
|
||||
-- the defalult and old one is submodel (1) for all model
|
||||
-- 2019.10.18 V2.000 FM Manage use Materials
|
||||
-- 2019.10.21 V2.001 FM Modify the closed path start point for steel material
|
||||
-- 2020.10.20 V2.002 FM Fix error on insert fillet when L = L3
|
||||
-- 2024.07.19 V2.003 FM Set note 'NotCheckDir' to pocketing and antisplint paths
|
||||
-- 2026.03.03 v3.1c1 DS Added fillet/chamfer management on opposite corner to single L for Offset type.
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local PivotL = {}
|
||||
@@ -511,6 +512,35 @@ function PivotL.Draw( EC, EM, tPivotParam, bPreview, bRunByCompo, nDrawMach, Pz,
|
||||
DrawAddLineDrawCircle( pIni, pEnd, Lg, tPocket, bPreview, Dm, 0, false, false, RED(), RED())
|
||||
pIni = pEnd
|
||||
|
||||
-- Eventuale raccordo/smusso su unico angolo interno di L
|
||||
local dRd1 = tPivotParam.Dr2R or 0
|
||||
local dRd2 = tPivotParam.Dr2D or 0
|
||||
if dRd1 > 100 * GEO.EPS_SMALL then
|
||||
local nCLpId = tPocket[#tPocket-1]
|
||||
local nCLcId = tPocket[#tPocket]
|
||||
local dCLp = EgtCurveLength( nCLpId)
|
||||
local dCLc = EgtCurveLength( nCLcId)
|
||||
if dRd2 < 100 * GEO.EPS_SMALL then
|
||||
local dRad = min( dRd1, dCLp - 100 * GEO.EPS_SMALL, dCLc - 100 * GEO.EPS_SMALL)
|
||||
local nFltId = EgtCurveFillet( Lg, nCLpId, EgtMP( nCLpId), nCLcId, EgtMP( nCLcId), dRad, true, GDB_RT.LOC)
|
||||
if nFltId then table.insert( tPocket, #tPocket, nFltId) end
|
||||
else
|
||||
local dCoeff1 = min( ( dCLp - 100 * GEO.EPS_SMALL) / dRd1, 1)
|
||||
local dCoeff2 = min( ( dCLc - 100 * GEO.EPS_SMALL) / dRd2, 1)
|
||||
local dCoeff = min( dCoeff1, dCoeff2)
|
||||
local dDist1 = dCoeff * dRd1
|
||||
local dDist2 = dCoeff * dRd2
|
||||
if dDist1 > 100 * GEO.EPS_SMALL and dDist2 > 100 * GEO.EPS_SMALL then
|
||||
EgtInvertCurve( nCLpId)
|
||||
EgtTrimCurveStartAtLen( nCLpId, dDist1)
|
||||
EgtInvertCurve( nCLpId)
|
||||
EgtTrimCurveStartAtLen( nCLcId, dDist2)
|
||||
local nChmId = EgtLine( Lg, EgtEP( nCLpId), EgtSP( nCLcId), GDB_RT.LOC)
|
||||
if nChmId then table.insert( tPocket, #tPocket, nChmId) end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- se abilitato material steel chiudo il percorso
|
||||
if est then
|
||||
pEnd = Point3d(-((L3/2)-(d/2)-dExtraH),(H3-(H/2)+(d/2)+dExtraH),0)
|
||||
@@ -518,7 +548,7 @@ function PivotL.Draw( EC, EM, tPivotParam, bPreview, bRunByCompo, nDrawMach, Pz,
|
||||
pIni = pEnd
|
||||
end
|
||||
|
||||
hint = EgtCurveCompo( Lg, tPocket, true)
|
||||
hint = EgtCurveCompo( Lg, tPocket, true)
|
||||
if hint then
|
||||
EgtModifyCurveThickness( hint, -T)
|
||||
EgtSetName( hint, LG or '')
|
||||
|
||||
+1
-1
@@ -6481,7 +6481,7 @@ function MachiningLoc.Calc( tPz, tsAssemb, nNumMachFromTable, nNumMachFromCam, n
|
||||
bGetSplitCuts = true
|
||||
end
|
||||
elseif tLocMach[i].Oper == 'AdjustConeCleanPaths' and nProbeMode ~= 1 then
|
||||
bOk, nNewIdEnt = MB.AdjustConeCleanPaths( EntList[j], bMakeGhost)
|
||||
bOk, nNewIdEnt = MB.AdjustConeCleanPaths( EntList[j], bMakeGhost, nil, Ls)
|
||||
elseif tLocMach[i].Oper == 'AdjustVertAsOnHeads' and nProbeMode ~= 1 then
|
||||
bLocMach, nNewIdEnt = MB.AdjustVertAsOnHeads( EntList[j], bMakeGhost)
|
||||
if not bLocMach then
|
||||
|
||||
+12
-7
@@ -1566,7 +1566,7 @@ function MachiningLoc.Calc( tPz, tsAssemb, nNumMachFromTable, nNumMachFromCam, n
|
||||
-----------------------
|
||||
|
||||
-- controllo se ho profili bullnose sul lato hinge (INDIPENDENTEMENTE CHE SIANO O MENO DA LAVORARE)
|
||||
if ( sHingeTrim == '1B' or sHingeTrim == '2B') then -- se profilo cerniere è bullnose
|
||||
if nNumMachFromCam ~= 2 and ( sHingeTrim == '1B' or sHingeTrim == '2B') then -- se profilo cerniere è bullnose
|
||||
bShiftedDoor = true
|
||||
end
|
||||
|
||||
@@ -4178,26 +4178,31 @@ function MachiningLoc.Calc( tPz, tsAssemb, nNumMachFromTable, nNumMachFromCam, n
|
||||
-- riassegno la quantità di file che effettivamente potrebbero essere alzate
|
||||
nInd = nInd - 1
|
||||
|
||||
-- casi di scarse ventose
|
||||
if nInd > 0 and ( nMaxIniFailed == nInd or nMaxMiddleFailed == nInd or nMaxEndFailed == nInd) then -- tutte le ventose basse
|
||||
-- casi di scarse ventose :
|
||||
-- tutte le ventose basse
|
||||
if nInd > 0 and ( nMaxIniFailed == nInd or nMaxMiddleFailed == nInd or nMaxEndFailed == nInd) then
|
||||
DGD.EMC = ' ' .. EgtDoorsMsg[531]
|
||||
bOk = false
|
||||
break
|
||||
elseif nInd > 0 and nMaxIniFailed / nInd > 0.35 then -- ventose iniziali ( parte destra)
|
||||
-- ventose iniziali ( parte destra)
|
||||
elseif nInd > 0 and nMaxIniFailed / nInd > 0.35 then
|
||||
local nNumMsg = EgtIf( nDispMode > 0, 532, 534)
|
||||
DGD.EMC = ' ' .. EgtDoorsMsg[nNumMsg]
|
||||
bOk = false
|
||||
break
|
||||
elseif nInd > 0 and nMaxMiddleFailed / nInd > 0.45 then -- ventose intermedie
|
||||
-- ventose intermedie
|
||||
elseif nInd > 0 and nMaxMiddleFailed / nInd > 0.45 then
|
||||
DGD.EMC = ' ' .. EgtDoorsMsg[533]
|
||||
bOk = false
|
||||
break
|
||||
elseif nInd > 0 and nMaxEndFailed / nInd > 0.35 then -- ventose finale ( parte sinistra)
|
||||
-- ventose finali ( parte sinistra)
|
||||
elseif nInd > 0 and nMaxEndFailed / nInd > 0.35 then
|
||||
local nNumMsg = EgtIf( nDispMode > 0, 534, 532)
|
||||
DGD.EMC = ' ' .. EgtDoorsMsg[nNumMsg]
|
||||
bOk = false
|
||||
break
|
||||
elseif ( nMaxIniFailed + nMaxMiddleFailed + nMaxEndFailed) >= nInd/2 then -- somma di vari intervalli
|
||||
-- somma di vari intervalli
|
||||
elseif ( nMaxIniFailed + nMaxMiddleFailed + nMaxEndFailed) >= nInd/2 then
|
||||
DGD.EMC = ' ' .. EgtDoorsMsg[531]
|
||||
bOk = false
|
||||
break
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
--
|
||||
-- EEEEEEEEEE GGGGGG wwww wwww
|
||||
-- EEEEEEEEEE GGGGGGGGGG wwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwww wwww
|
||||
-- EEEE GGGG wwww wwww wwww
|
||||
-- EEEEEEE GGGG GGGGGGG wwww wwwwww wwww
|
||||
-- EEEEEEE GGGG GGGGGGG wwww wwwwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwwwwwww wwww
|
||||
-- EEEE GGGG GGGG wwww wwww wwww wwww
|
||||
-- EEEEEEEEEE GGGGGGGGGG wwwwwwww wwwwwwww
|
||||
-- EEEEEEEEEE GGGGGG wwwwwww wwwwwww
|
||||
--
|
||||
-- Main.lua by EgalWare s.r.l. 2016.05.28
|
||||
-- Main.lua by EgalWare s.r.l. 2026.01.07
|
||||
-- Main creazione porte da descrizione DDF
|
||||
-- 2016.09.07 V1.001 FM Modificata gestione flush bolt
|
||||
-- 2016.09.14 V1.002 FM Aggiunta gestione log file
|
||||
@@ -113,6 +101,7 @@
|
||||
-- 2022.08.31 V3.00d FM Manage groove applied on top angle
|
||||
-- 2022.11.15 V3.00e FM Manage side grove region as throu region and not as blind region
|
||||
-- 2023.04.26 V3.00f FM Manage new DDF format by new ddf version number parameter
|
||||
-- 2023.04.27 Max num error message DGD.ERR = 28
|
||||
-- 2023.05.11 V3.010 FM Read new ddf group 'options:' (actually not used) at the end of ddf file
|
||||
-- 2023.09.07 V3.011 FM try to delete the .tok file (it's a copy of .txt file) that dProd uses
|
||||
-- 2023.12.01 V3.012 FM Manage new CurrDoorCustomData parameter DGC.CVP to define a small line on both corner of Convex profile
|
||||
@@ -122,8 +111,10 @@
|
||||
-- 2024.10.15 V3.016 FM Manage new DGC.NPM parameter to indicate new DGD.PROBE meaning
|
||||
-- 2024.10.31 V3.017 FM Manage probe id number and note 'ProbeId' on geometries that have hinge or lock probe geometry
|
||||
-- 202x.xx.xx V3.xxx FM Manage new CurrCamInfo parameter 'WideDoorWidth' to manage large wide doors stored into new DGD.Part parameter
|
||||
|
||||
-- 2023.04.27 Max num error message DGD.ERR = 28
|
||||
-- 2025.05.06 v2.7e1 DS Correzione funzione SubAndDeleteTempSurf.
|
||||
-- 2025.10.29 v2.7j3 DS Correzione a SubAndDeleteTempSurf (aggiunto controllo esistenza regioni).
|
||||
-- 2025.12.16 v2.7l1 DS Aggiunta gestione TrimLTHB per distanze dai bordi del trim decorazioni.
|
||||
-- 2026.01.07 v3.1a1 DS Gestione indice probe anche per Pivot su Hinge (intermediatepivot).
|
||||
|
||||
-- Intestazioni
|
||||
require( 'EgtBase')
|
||||
@@ -134,7 +125,6 @@ if not _G.DGD then
|
||||
_G.DGD = {}
|
||||
end
|
||||
|
||||
--local sBaseDir = EgtGetSourceDir()
|
||||
local sBaseDir = DGD.BASEDIR
|
||||
EgtAddToPackagePath( sBaseDir .. 'LuaLibs\\?.lua')
|
||||
EgtAddToPackagePath( sBaseDir .. 'MTables\\?.mtl')
|
||||
@@ -236,17 +226,20 @@ end
|
||||
-----------------------------------------------------------------
|
||||
-- *** Geometry Calc ***
|
||||
-----------------------------------------------------------------
|
||||
local function CalcSideRectTringle( nCat1, nCat2, nIpo)
|
||||
local function CalcSideRectTringle( dCat1, dCat2, dIpo)
|
||||
|
||||
local nSide = 0
|
||||
if not nIpo then -- se non ho l'ipotenusa
|
||||
nSide = sqrt((nCat1*nCat1)+(nCat2*nCat2))
|
||||
elseif not nCat1 then -- se manca cateto 1
|
||||
nSide = sqrt(abs((nIpo*nIpo)-(nCat2*nCat2))) -- use abs in case the sub results is near 0 but negative value
|
||||
elseif not nCat2 then -- se manca cateto 2
|
||||
nSide = sqrt(abs((nIpo*nIpo)-(nCat1*nCat1))) -- use abs in case the sub results is near 0 but negative value
|
||||
local dSide = 0
|
||||
-- se manca ipotenusa
|
||||
if not dIpo then
|
||||
dSide = sqrt( ( dCat1 * dCat1) + ( dCat2 * dCat2))
|
||||
-- se manca cateto 1
|
||||
elseif not dCat1 then
|
||||
dSide = sqrt( max( ( dIpo * dIpo) - ( dCat2 * dCat2), 0))
|
||||
-- se manca cateto 2
|
||||
elseif not dCat2 then
|
||||
dSide = sqrt( max( ( dIpo * dIpo) - ( dCat1 * dCat1), 0))
|
||||
end
|
||||
return nSide
|
||||
return dSide
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------
|
||||
@@ -1611,7 +1604,8 @@ local function InsertProbeGeom( nIdGeom, ptPosGeom, ptFromExt, nTypeHw, nNumSide
|
||||
local nIdEnt = EgtGetFirstInGroup( nIdGeom) -- ottengo prima entità
|
||||
while nIdEnt do
|
||||
local sNameEnt = EgtGetName( nIdEnt) or ''
|
||||
if sNameEnt and string.find( sNameEnt, 'Hinge_Probe') or string.find( sNameEnt, 'Shuttle_Probe') then
|
||||
if sNameEnt and string.find( sNameEnt, 'Hinge_Probe') or string.find( sNameEnt, 'Shuttle_Probe') or
|
||||
( string.find( sNameEnt, 'Pivot_Probe') and nNumSide == 1) then
|
||||
bFoundShuttleProbe = true
|
||||
break
|
||||
end
|
||||
@@ -1844,8 +1838,17 @@ local function MoveCutOuts( tCutOut, sSideLk, bPushDr, bImport, nTypeCout)
|
||||
end
|
||||
end
|
||||
|
||||
if bImport then
|
||||
EgtModifyCurveThickness(tCutOut.geom, -DGD.dT)
|
||||
if bImport then
|
||||
-- modifica dello spessore di tutte le curve del gruppo
|
||||
local EntId = EgtGetFirstInGroup( tCutOut.geom)
|
||||
while EntId do
|
||||
if EgtGetInfo( EntId, 'ConeCleanCorner', 'b') then
|
||||
EgtMove( EntId, Vector3d( 0, 0, -DGD.dT))
|
||||
else
|
||||
EgtModifyCurveThickness( EntId, -DGD.dT)
|
||||
end
|
||||
EntId = EgtGetNext( EntId)
|
||||
end
|
||||
-- se non ci sono tagli di hatching
|
||||
if DGD.NotExistHatch then
|
||||
-- creo estrusi e superfici piane delle geometrie passanti
|
||||
@@ -6289,16 +6292,49 @@ local function MoveGeomDecoration( nGeomId, sFace, sSideLk)
|
||||
local ptPos
|
||||
local ptRef
|
||||
local dZedPos = 0
|
||||
local nNewEnt
|
||||
|
||||
if string.lower(sFace) == 'keyway' then -- se specificato face su lato keyway (davanti)
|
||||
dZedPos = DGD.dT
|
||||
elseif string.lower(sFace) == 'secure' then -- se specificato face su lato secure (dietro)
|
||||
-- faccio il mirror di tutte le geometrie su asse Z
|
||||
nNewEnt = EgtGetFirstInGroup( nGeomId) -- ottengo nuova entità
|
||||
local bMirror = ( EgtGetInfo( nGeomId, 'Mirror', 'i') ~= 0)
|
||||
local dRotToHinges = EgtGetInfo( nGeomId, 'Rotate', 'd') or 0
|
||||
|
||||
local b3Box = EgtGetBBox( nGeomId, GDB_BB.STANDARD)
|
||||
-- sistemo per eventuale rotazione
|
||||
if not bMirror and abs( dRotToHinges) > GEO.EPS_ANG_SMALL then
|
||||
-- eseguo rotazione
|
||||
local dAngRot = EgtIf( sSideLk == 'L', -dRotToHinges, dRotToHinges)
|
||||
if string.lower( sFace) == 'secure' then dAngRot = -dAngRot end
|
||||
local nNewEnt = EgtGetFirstInGroup( nGeomId)
|
||||
while nNewEnt do
|
||||
EgtMirror( nNewEnt, ORIG(), Z_AX()) -- faccio il mirror su asse Z
|
||||
nNewEnt = EgtGetNext(nNewEnt)
|
||||
EgtRotate( nNewEnt, b3Box:getCenter(), Z_AX(), dAngRot)
|
||||
nNewEnt = EgtGetNext( nNewEnt)
|
||||
end
|
||||
local b3NewBox = EgtGetBBox( nGeomId, GDB_BB.STANDARD)
|
||||
-- riporto in posizione
|
||||
local vtMove = b3Box:getMin() - b3NewBox:getMin()
|
||||
nNewEnt = EgtGetFirstInGroup( nGeomId)
|
||||
while nNewEnt do
|
||||
EgtMove( nNewEnt, vtMove)
|
||||
nNewEnt = EgtGetNext( nNewEnt)
|
||||
end
|
||||
-- aggiorno box
|
||||
b3Box = EgtGetBBox( nGeomId, GDB_BB.STANDARD)
|
||||
end
|
||||
|
||||
if string.lower( sFace) == 'keyway' then -- se specificato face su lato keyway (davanti)
|
||||
dZedPos = DGD.dT
|
||||
elseif string.lower( sFace) == 'secure' then -- se specificato face su lato secure (dietro)
|
||||
-- faccio il mirror di tutte le geometrie rispetto al piano XY
|
||||
local nNewEnt = EgtGetFirstInGroup( nGeomId)
|
||||
while nNewEnt do
|
||||
EgtMirror( nNewEnt, ORIG(), Z_AX())
|
||||
nNewEnt = EgtGetNext( nNewEnt)
|
||||
end
|
||||
-- se non richiesto mirror, per annullarne l'effetto
|
||||
if not bMirror then
|
||||
local nNewEnt = EgtGetFirstInGroup( nGeomId)
|
||||
while nNewEnt do
|
||||
EgtMirror( nNewEnt, Point3d( b3Box:getCenter():getX(), 0, 0), X_AX())
|
||||
nNewEnt = EgtGetNext( nNewEnt)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6316,11 +6352,20 @@ local function MoveGeomDecoration( nGeomId, sFace, sSideLk)
|
||||
else
|
||||
ptPos = Point3d( DGD.dW, 0, dZedPos)
|
||||
end
|
||||
-- faccio il mirror di tutte le geometrie in X
|
||||
nNewEnt = EgtGetFirstInGroup( nGeomId) -- ottengo nuova entità
|
||||
while nNewEnt do
|
||||
EgtMirror( nNewEnt, ORIG(), X_AX()) -- faccio il mirror in X
|
||||
nNewEnt = EgtGetNext(nNewEnt)
|
||||
-- se ammesso, faccio il mirror di tutte le geometrie sul piano YZ
|
||||
if bMirror then
|
||||
local nNewEnt = EgtGetFirstInGroup( nGeomId)
|
||||
while nNewEnt do
|
||||
EgtMirror( nNewEnt, ORIG(), X_AX())
|
||||
nNewEnt = EgtGetNext( nNewEnt)
|
||||
end
|
||||
else
|
||||
local vtMove = Vector3d( - 2 * b3Box:getCenter():getX(), 0, 0)
|
||||
local nNewEnt = EgtGetFirstInGroup( nGeomId)
|
||||
while nNewEnt do
|
||||
EgtMove( nNewEnt, vtMove)
|
||||
nNewEnt = EgtGetNext( nNewEnt)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6351,7 +6396,7 @@ local function MoveCopyDecoration( tDecoration, sSideLk, bPushDr, bImport)
|
||||
end
|
||||
if DGD.DFT then
|
||||
dY = DGD.dH - DGD.DFT
|
||||
else
|
||||
elseif DGD.DFB then
|
||||
dY = 0 + DGD.LENGTH + DGD.DFB
|
||||
end
|
||||
local ptRef = Point3d( b3Box:getMin():getX(), b3Box:getMax():getY(), 0)
|
||||
@@ -6372,10 +6417,17 @@ local function MoveCopyDecoration( tDecoration, sSideLk, bPushDr, bImport)
|
||||
end
|
||||
nNewEnt = EgtGetNext( nNewEnt)
|
||||
end
|
||||
-- eseguo trim con rettangolo porta aumentato di un poco
|
||||
local dOffs = 20
|
||||
local frRef = Frame3d( -dOffs, -dOffs, -dOffs)
|
||||
local vtDiag = Vector3d( DGD.dW + 2 * dOffs, DGD.dH + 2 * dOffs, 2 * dOffs)
|
||||
-- eseguo trim con rettangolo porta aumentato di un poco (o con valori da disegno)
|
||||
local dOffs, dOffL, dOffT, dOffH, dOffB = 20, 20, 20, 20, 20
|
||||
local vOffs = EgtGetInfo( tDecoration.geom, 'TrimLTHB', 'vd')
|
||||
if vOffs and #vOffs >= 4 then
|
||||
dOffL = vOffs[1]
|
||||
dOffT = vOffs[2]
|
||||
dOffH = vOffs[3]
|
||||
dOffB = vOffs[4]
|
||||
end
|
||||
local frRef = Frame3d( -dOffL, -dOffB, -dOffs)
|
||||
local vtDiag = Vector3d( DGD.dW + dOffL + dOffH, DGD.dH + dOffB + dOffT, 2 * dOffs)
|
||||
nNewEnt = EgtGetFirstInGroup( tDecoration.geom)
|
||||
while nNewEnt do
|
||||
local nNextEnt = EgtGetNext( nNewEnt)
|
||||
@@ -7475,65 +7527,92 @@ end
|
||||
-----------------------------------------------------------------
|
||||
local function SubAndDeleteTempSurf( nIdLs)
|
||||
|
||||
local nIdSurf
|
||||
local sSurfName
|
||||
-- ricerca delle superfici princiapli
|
||||
local nIdSurfUp
|
||||
local nIdSurfDw
|
||||
local nIdSurfTmpUp
|
||||
local nIdSurfTmpDw
|
||||
local bFisrtUp = true
|
||||
local bFisrtDw = true
|
||||
|
||||
nIdSurf = EgtGetFirstInGroup( nIdLs) -- ottengo la prima superfice
|
||||
local nIdSurf = EgtGetFirstInGroup( nIdLs)
|
||||
while nIdSurf and ( not nIdSurfUp or not nIdSurfDw) do
|
||||
-- nome della superficie
|
||||
local sSurfName = EgtGetName( nIdSurf)
|
||||
-- se trovata superfice up principale
|
||||
if not nIdSurfUp and sSurfName and string.lower( sSurfName) == 'flat_up' then
|
||||
nIdSurfUp = nIdSurf
|
||||
end
|
||||
-- se trovata superfice dw principale
|
||||
if not nIdSurfDw and sSurfName and string.lower( sSurfName) == 'flat_dw' then
|
||||
nIdSurfDw = nIdSurf
|
||||
end
|
||||
-- passo alla successiva
|
||||
nIdSurf = EgtGetNext( nIdSurf)
|
||||
end
|
||||
|
||||
-- creo superfici temporanee di inviluppo rettangolare delle principali
|
||||
local nIdRectHullUp
|
||||
if nIdSurfUp then
|
||||
local b3SurfUp = EgtGetBBox( nIdSurfUp, GDB_BB.STANDARD)
|
||||
nIdRectHullUp = EgtSurfFrRectangle( nIdLs, b3SurfUp:getMin(), b3SurfUp:getMax())
|
||||
if nIdRectHullUp and EgtSurfFrNormVersor( nIdSurfUp) * EgtSurfFrNormVersor( nIdRectHullUp) < 0 then
|
||||
EgtInvertSurf( nIdRectHullUp)
|
||||
end
|
||||
end
|
||||
local nIdRectHullDw
|
||||
if nIdSurfDw then
|
||||
local b3SurfDw = EgtGetBBox( nIdSurfDw, GDB_BB.STANDARD)
|
||||
nIdRectHullDw = EgtSurfFrRectangle( nIdLs, b3SurfDw:getMin(), b3SurfDw:getMax())
|
||||
if nIdRectHullDw and EgtSurfFrNormVersor( nIdSurfDw) * EgtSurfFrNormVersor( nIdRectHullDw) < 0 then
|
||||
EgtInvertSurf( nIdRectHullDw)
|
||||
end
|
||||
end
|
||||
|
||||
-- ciclo sulle superfici del gruppo
|
||||
nIdSurf = EgtGetFirstInGroup( nIdLs)
|
||||
while nIdSurf do
|
||||
|
||||
sSurfName = EgtGetName( nIdSurf)
|
||||
local nNextId = EgtGetNext(nIdSurf)
|
||||
|
||||
-- se trovata superfice up principale
|
||||
if sSurfName and bFisrtUp and string.lower(sSurfName) == 'flat_up' then
|
||||
nIdSurfUp = nIdSurf
|
||||
bFisrtUp = false
|
||||
end
|
||||
|
||||
-- se trovata superfice dw principale
|
||||
if sSurfName and bFisrtDw and string.lower(sSurfName) == 'flat_dw' then
|
||||
nIdSurfDw = nIdSurf
|
||||
bFisrtDw = false
|
||||
end
|
||||
local sSurfName = EgtGetName( nIdSurf)
|
||||
local nNextId = EgtGetNext( nIdSurf)
|
||||
|
||||
-- se superfice up temporanea la sottraggo alla principale e poi la elimino
|
||||
if sSurfName and string.lower(sSurfName) == 'flat_up_tmp' then
|
||||
nIdSurfTmpUp = nIdSurf
|
||||
if nIdSurfUp and sSurfName and string.lower( sSurfName) == 'flat_up_tmp' then
|
||||
local nIdSurfTmpUp = nIdSurf
|
||||
EgtSurfFrSubtract( nIdSurfUp, nIdSurfTmpUp)
|
||||
EgtErase(nIdSurfTmpUp)
|
||||
EgtErase( nIdSurfTmpUp)
|
||||
end
|
||||
|
||||
-- se superfice dw temporanea la sottraggo alla principale e poi la elimino
|
||||
if sSurfName and string.lower(sSurfName) == 'flat_dw_tmp' then
|
||||
nIdSurfTmpDw = nIdSurf
|
||||
if nIdSurfDw and sSurfName and string.lower( sSurfName) == 'flat_dw_tmp' then
|
||||
local nIdSurfTmpDw = nIdSurf
|
||||
EgtSurfFrSubtract( nIdSurfDw, nIdSurfTmpDw)
|
||||
EgtErase(nIdSurfTmpDw)
|
||||
EgtErase( nIdSurfTmpDw)
|
||||
end
|
||||
|
||||
-- se superfice up temporanea speciale (da percorsi di hatching) la sommo alla principale e poi la elimino
|
||||
if sSurfName and string.lower(sSurfName) == 'flat_up_tmp_sp' then
|
||||
nIdSurfTmpUp = nIdSurf
|
||||
EgtSurfFrAdd( nIdSurfUp, nIdSurfTmpUp)
|
||||
EgtErase(nIdSurfTmpUp)
|
||||
if nIdSurfUp and nIdRectHullUp and sSurfName and string.lower( sSurfName) == 'flat_up_tmp_sp' then
|
||||
local nIdSurfTmpUp = nIdSurf
|
||||
EgtSurfFrIntersect( nIdSurfTmpUp, nIdRectHullUp)
|
||||
if EgtExistsObj( nIdSurfTmpUp) then
|
||||
EgtSurfFrAdd( nIdSurfUp, nIdSurfTmpUp)
|
||||
EgtErase( nIdSurfTmpUp)
|
||||
end
|
||||
end
|
||||
|
||||
-- se superfice dw temporanea speciale (da percorsi di hatching) la sommo alla principale e poi la elimino
|
||||
if sSurfName and string.lower(sSurfName) == 'flat_dw_tmp_sp' then
|
||||
nIdSurfTmpDw = nIdSurf
|
||||
EgtSurfFrAdd( nIdSurfDw, nIdSurfTmpDw)
|
||||
EgtErase(nIdSurfTmpDw)
|
||||
if nIdSurfUp and nIdRectHullDw and sSurfName and string.lower( sSurfName) == 'flat_dw_tmp_sp' then
|
||||
local nIdSurfTmpDw = nIdSurf
|
||||
EgtSurfFrIntersect( nIdSurfTmpDw, nIdRectHullDw)
|
||||
if EgtExistsObj( nIdSurfTmpDw) then
|
||||
EgtSurfFrAdd( nIdSurfDw, nIdSurfTmpDw)
|
||||
EgtErase( nIdSurfTmpDw)
|
||||
end
|
||||
end
|
||||
|
||||
-- passo alla successiva
|
||||
nIdSurf = nNextId
|
||||
end
|
||||
|
||||
-- cancello le superfici di inviluppo temporanee
|
||||
EgtErase( nIdRectHullUp)
|
||||
EgtErase( nIdRectHullDw)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
+4
-2
@@ -1,4 +1,6 @@
|
||||
-- Version.lua by EgalWare s.r.l. 2025/03/19
|
||||
-- Version.lua by EgalWare s.r.l. 2026/03/03
|
||||
-- Gestione della versione di Doors
|
||||
|
||||
VERSION = '2.7c2'
|
||||
NAME = 'Doors'
|
||||
VERSION = '3.1c1'
|
||||
MIN_EXE = '2.6k4'
|
||||
|
||||
Reference in New Issue
Block a user