DataDoors :
- aggiunta gestione antischeggia su Split.
This commit is contained in:
+41
-19
@@ -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. 2025.05.05
|
||||
-- Autore: Dario Sassi
|
||||
-- VisionCutOut dati i valori 'L' e 'H' e con nome attributo
|
||||
|
||||
-- 2017.10.18 V1.0a1 FM Start point path near lock side
|
||||
@@ -41,6 +28,7 @@
|
||||
-- 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 DS Aggiunti antischeggia per Split.
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local VisionCutOut = {}
|
||||
@@ -56,6 +44,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')
|
||||
@@ -100,6 +89,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
|
||||
@@ -129,6 +119,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)
|
||||
@@ -152,6 +143,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)
|
||||
|
||||
@@ -181,7 +173,7 @@ local function DrawAddCircleDrawCircle( pCenter, dRadius, dAngIni, dAngCen, nGro
|
||||
return nCircle, nNumCircle, sMVar
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function DrawRectangleWithFillet ( Lg, L, H, dThickD, rf)
|
||||
|
||||
local tHint = {}
|
||||
@@ -238,7 +230,7 @@ local function DrawRectangleWithFillet ( Lg, L, H, dThickD, rf)
|
||||
return hint
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function DrawDiamondWithFillet ( Lg, L, H, dThickD, rf, dRad, sLockSide)
|
||||
|
||||
local tHint = {}
|
||||
@@ -338,7 +330,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
|
||||
@@ -368,7 +360,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')
|
||||
@@ -688,7 +680,7 @@ function VisionCutOut.AdjustParams( tMhPar)
|
||||
return tMhPar, 0, ''
|
||||
end
|
||||
|
||||
-- Funzione di disegno
|
||||
------------------------------ Disegno ----------------------------------------------------------------------
|
||||
function VisionCutOut.Draw( tVisPar, bPreview, bRunByCompo, nDrawMach)
|
||||
|
||||
-- Assegno le dimensioni
|
||||
@@ -713,6 +705,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
|
||||
@@ -724,6 +717,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
|
||||
@@ -1129,7 +1123,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())
|
||||
@@ -1418,6 +1412,34 @@ function VisionCutOut.Draw( tVisPar, bPreview, bRunByCompo, nDrawMach)
|
||||
EgtErase( hint_ofs)
|
||||
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
|
||||
|
||||
if MId then
|
||||
EgtModifyCurveThickness( MId, -T)
|
||||
|
||||
Reference in New Issue
Block a user