- Prima versione file INI interfaccia selezione strategie Beam&Wall

- BeamLib : nuova funzione 'LoadCustomParametersInStrategy'
- Piccoli aggiustamenti vari
This commit is contained in:
andrea.villa
2024-05-08 15:32:51 +02:00
parent ecf89edf59
commit d45fc8e89b
9 changed files with 148 additions and 20 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ local function GetStrategies_Egalware( Proc)
if true or ID.IsHeadCut( Proc) then -- TODO TOGLIERE IL true PER FORZARE IF!!! PROVVISORIO PER PROVARE STRATEGIE
if Proc.Topology.Name == 'FEATURE' then
Strategy_Egalware = {
StrategyId = 'STR0010',
StrategyId = 'STR0001',
Parameters = {
{ Value = '15', Name = 'Step', Type = 'd'},
{ Value = 'false', Name = 'AntiSplint', Type = 'b'}
@@ -206,7 +206,7 @@ local function GetStrategies_Essetre( Proc)
if true or ID.IsHeadCut( Proc) then -- TODO TOGLIERE IL true PER FORZARE IF!!! PROVVISORIO PER PROVARE STRATEGIE
if Proc.Topology.Name == 'FEATURE' then
Strategy_Essetre = {
StrategyId = 'STR0010',
StrategyId = 'STR0001',
Parameters = {
{ Value = '15', Name = 'Step', Type = 'd'},
{ Value = 'false', Name = 'AntiSplint', Type = 'b'}
+1 -1
View File
@@ -496,7 +496,7 @@ local function CollectFeatures( PartId, Part)
Proc.Topology = {}
if FeatureData.NeedTopologyFeature( Proc) then
Proc.AdjacencyMatrix = FaceData.GetAdjacencyMatrix( Proc)
Proc.Faces = FaceData.GetFacesInfo( Proc)
Proc.Faces = FaceData.GetFacesInfo( Proc, Part)
Proc.Topology = FeatureData.ClassifyTopology( Proc, Part)
else
Proc.Topology.Family = 'FEATURE'
+18
View File
@@ -259,5 +259,23 @@ function BeamLib.GetUpdateCustomParameters( CustomStrategyParamList, DefaultStra
return DefaultStrategyParamList
end
-------------------------------------------------------------------------------------------------------------
-- si traduce la tabella dei parametri con tutte le informazioni in una lista contenente i parametri utilizzabili con accesso diretto
function BeamLib.LoadCustomParametersInStrategy( CustomParameters)
local Parameters = {}
if CustomParameters and #CustomParameters > 0 then
for i=1, #CustomParameters do
if CustomParameters[i].Type == 'b' then
Parameters[CustomParameters[i].Name] = CustomParameters[i].Value == 'true'
elseif CustomParameters[i].Type == 'd' then
Parameters[CustomParameters[i].Name] = tonumber( CustomParameters[i].Value)
else -- CustomParameters.Type == 's'
Parameters[CustomParameters[i].Name] = CustomParameters[i].Value
end
end
end
return Parameters
end
-------------------------------------------------------------------------------------------------------------
return BeamLib
+13 -12
View File
@@ -111,7 +111,7 @@ function FaceData.GetFacesByAdjacencyNumber( Proc)
end
-------------------------------------------------------------------------------------------------------------
function FaceData.GetFacesInfo( Proc)
function FaceData.GetFacesInfo( Proc, Part)
EgtOutLog( '---Faces START---')
local Faces = {}
@@ -131,7 +131,7 @@ function FaceData.GetFacesInfo( Proc)
Faces[i].Id = i - 1
Faces[i].PtCenter, Faces[i].VtN = EgtSurfTmFacetCenter( Proc.Id, i - 1, GDB_ID.ROOT)
if Proc.Fct < 6 then
local frHV, dFaceWidth, dFaceHeight = BeamLib.GetFaceHvRefDim( Proc.Id, i - 1)
local frHV, dFaceWidth, dFaceHeight = BeamLib.GetFaceHvRefDim( Proc.Id, i - 1, Part)
-- frame OCS faccia
Faces[i].FrameHV = frHV
-- larghezza OCS faccia
@@ -216,19 +216,20 @@ local function GetBottomFace( Proc)
-- la faccia di fondo ha sempre Fct - 1 adiacenze. Se si trovano più facce di fondo si sceglie quella con minor elevazione
local FacesByAdjacencyNumber = FaceData.GetFacesByAdjacencyNumber( Proc)
local BottomFaces = FacesByAdjacencyNumber[ Proc.Fct - 1]
if #BottomFaces > 1 then
local dMinElevation = GEO.INFINITO
for i = 1, #BottomFaces do
if Proc.Faces[BottomFaces[i].Id + 1].Elevation < dMinElevation then
dMinElevation = Proc.Faces[BottomFaces[i].Id + 1].Elevation
BottomFace = Proc.Faces[BottomFaces[i].Id + 1]
if FacesByAdjacencyNumber then
local BottomFaces = FacesByAdjacencyNumber[ Proc.Fct - 1]
if #BottomFaces > 1 then
local dMinElevation = GEO.INFINITO
for i = 1, #BottomFaces do
if Proc.Faces[BottomFaces[i].Id + 1].Elevation < dMinElevation then
dMinElevation = Proc.Faces[BottomFaces[i].Id + 1].Elevation
BottomFace = Proc.Faces[BottomFaces[i].Id + 1]
end
end
else
BottomFace = BottomFaces[1]
end
else
BottomFace = BottomFaces[1]
end
return BottomFace
end
+1
View File
@@ -12,6 +12,7 @@ function STR0001.Make( AddMachining, Proc, Part, CustomParameters)
local StrategyLib = {}
StrategyLib.Config = require( 'STR0001\\STR0001Config')
CustomParameters = BeamLib.GetUpdateCustomParameters( CustomParameters, StrategyLib.Config.Parameters)
StrategyParameters = BeamLib.LoadCustomParametersInStrategy( CustomParameters)
end
+4 -3
View File
@@ -3,9 +3,10 @@
local STR0001Data = {
StrategyId = 'STR0001',
Parameters = {
{ Value = '15', Name = 'Step', Description = 'Questo è lo step di lavorazione', Type = 'd'},
{ Value = '2', Name = 'Depth', Description = 'Affondamento lavorazione', Type = 'd'},
{ Value = 'false', Name = 'AntiSplint', Description = 'Antischeggia', Type = 'b'}
{ Name = 'OverMatOnLenght', Value = '0', Description = 'Sovramateriale lunghezza tenone', Type = 'd'},
{ Name = 'OverMatOnRadius', Value = '0', Description = 'Sovramateriale larghezza tenone', Type = 'd'},
{ Name = 'MaxMillingPaths', Value = '3', Description = 'Numero massimo di passaggi di fresatura. Se richiesti più passaggi, si fa svuotatura', Type = 'd'},
{ Name = 'UseDTToolOnPocketing', Value = 'true', Description = 'Utilizza utensile a coda di rondimne per fare svuotatura', Type = 'b'}
}
}
+1
View File
@@ -12,6 +12,7 @@ function STR0002.Make( AddMachining, Proc, Part, CustomParameters)
local StrategyLib = {}
StrategyLib.Config = require( 'STR0002\\STR0002Config')
CustomParameters = BeamLib.GetUpdateCustomParameters( CustomParameters, StrategyLib.Config.Parameters)
StrategyParameters = BeamLib.LoadCustomParametersInStrategy( CustomParameters)
end
+2 -2
View File
@@ -3,8 +3,8 @@
local STR0002Data = {
StrategyId = 'STR0002',
Parameters = {
{ Value = '10', Name = 'Step', Description = 'Questo è lo step di lavorazione', Type = 'd'},
{ Value = '5', Name = 'Depth', Description = 'Affondamento lavorazione', Type = 'd'},
{ Name = 'Step', Value = '10', Description = 'Questo è lo step di lavorazione', Type = 'd'},
{ Name = 'Depth', Value = '5', Description = 'Affondamento lavorazione', Type = 'd'},
}
}
+106
View File
@@ -0,0 +1,106 @@
; Commento per evitare BOM con UTF-8
[Comments]
STR0001 = Tenone a coda di rondine. Lama + fresa a coda di rondine
[Strategies]
; Processing , Gruppo , Topologia , Strategie
;Feature : Cut
10,1,Feature,
;Feature : Longitudinal Cut
10,0,Feature,
;Feature : Double Cut
11,1,Feature,
; Feature : Ridge or Valley Cut
12,0,Feature,
; Feature : Saw Cut
13,0,Feature,
; Feature : Slot
16.0,Feature,
; Feature : Front Slot
17,0,Feature,
; Feature : Birds Mouth
20,0,Feature,
; Feature : Hip or Valley Rafter Notch
25,0,Feature,
; Feature : Ridge Lap
30,1,Feature,
; Feature : Lap Joint
30,0,Feature,
; Feature : Notch/Rabbet
32,0,Feature,
; Feature : Block Haus
33,0,Feature,
; Feature : Notch
34,0,Feature,
; Feature : French Ridge Lap
35,1,Feature,
; Feature : Chamfer
36,0,Feature,
; Feature : Block Haus Half Lap
37,0,Feature,
; Feature : Block Haus Front
38,0,Feature,
; Feature : Pocket
39,0,Feature,
; Feature : Drilling
40,0,Feature,
; Feature : Tenon
50,1,Feature,
; Feature : Mortise
50,0,Feature,
; Feature : Front Mortise
51,0,Feature,
; Feature : House
52,1,Feature,
; Feature : House Mortise
53,0,Feature,
; Feature : Dovetail Tenon
55,1,Feature,STR0001
; Feature : Dovetail Mortise
55,0,Feature,
; Feature : Dovetail Mortise Front
56,0,Feature,
; Feature : Marking
60,0,Feature,
; Feature : Text
61,0,Feature,
; Feature : Scarf Simple
70,1,Feature,
; Feature : Scarf Joint
71,1,Feature,
; Feature : Step Joint
80,1,Feature,
; Feature : Step Joint Notch
80,0,Feature,
; Feature : Planing
90,0,Feature,
; Feature : Front Profile
100,0,Feature,
; Feature : Head Concave Profile
101,0,Feature,
; Feature : Head Convex Profile
102,0,Feature,
; Feature : Head Cambered Profile
103,0,Feature,
; Feature : Round Arch
104,0,Feature,
; Feature : Head Profile
106,0,Feature,
; Feature : Sphere
107,0,Feature,
; Feature : Triangle Cut
120,0,Feature,
; Feature : TyroleanDovetail
136,0,Feature,
; Feature : Dovetail
138,0,Feature,
; Feature : Free Contour
250,0,Feature,
; Feature : Outline
251,0,Feature,
; Feature : Aperture
252,0,Feature,
; Feature : Variant
900,0,Feature,
; Feature Decor
959,0,Feature,