- in FeatureTopology modifiche alla definizione di parallelo per tunnel e groove

- in SawPlusChain piccole correzioni
This commit is contained in:
luca.mazzoleni
2024-04-09 16:17:57 +02:00
parent c05e58a61e
commit 969f4cb6a0
2 changed files with 12 additions and 10 deletions
+3 -3
View File
@@ -113,11 +113,11 @@ end
---------------------------------------------------------------------
-- restituisce un vettore contenente gli indici delle facce di Proc parallele ad una delle direzioni principali; il check varia in base alla famiglia topologica
local function GetFacesParallelToPart( Proc, sFamily, bIsThrough)
local function GetFacesParallelToPart( Proc, sFamily)
local vFacesParallelToPart = {}
for i = 0, Proc.Fct - 1 do
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, i, GDB_ID.ROOT)
if sFamily == 'Rabbet' or sFamily == 'Bevel' or sFamily == 'DoubleBevel' or sFamily == 'Strip' or sFamily == 'Tunnel' or ( sFamily == 'Groove' and bIsThrough) then
if sFamily == 'Rabbet' or sFamily == 'Bevel' or sFamily == 'DoubleBevel' or sFamily == 'Strip' then
local vTriangularFaces = GetTriangularFaces( Proc)
local bIsTriangularFace = false
-- verifico se la faccia è triangolare
@@ -244,7 +244,7 @@ function FeatureTopology.Classify( Proc, b3Raw)
end
-- verifico se facce parallele a quelle della trave
local vFacesParallelToPart = GetFacesParallelToPart( Proc, sFamily, bIsThrough)
local vFacesParallelToPart = GetFacesParallelToPart( Proc, sFamily)
local bIsParallel = ( #vFacesParallelToPart == Proc.Fct)
-- assegnazioni
+9 -7
View File
@@ -4595,6 +4595,8 @@ end
-- TODO gestione messaggi in funzione apposita (almeno per append)
-- TODO gestire topologia tunnel (anche da due lati)
local SawPlusChain = {}
SawPlusChain.Saw = {}
SawPlusChain.Chainsaw = {}
@@ -4985,7 +4987,7 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc)
EgtOutLog( Cutting.Message)
return Cutting
end
if Proc.Pocket.SideOpeningsCount == 0 then
if #( Proc.Pocket.SideFaces) > 0 then
-- se tasca più stretta della lama la strategia non è applicabile
if Cutting.Tool.Diameter > Proc.Pocket.Width - 10 * GEO.EPS_SMALL then
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. Proc.Pocket.Strategy .. ' not applicable - pocket too narrow for saw blade diameter'
@@ -5102,7 +5104,7 @@ function SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc)
EgtOutLog( Chainsawing.Message)
return Chainsawing
end
if Proc.Pocket.SideOpeningsCount == 0 then
if #( Proc.Pocket.SideFaces) == 0 then
-- se tasca più stretta della sega a catena la strategia non è applicabile
if Chainsawing.Tool.Width > Proc.Pocket.Width - 10 * GEO.EPS_SMALL then
Chainsawing.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. Proc.Pocket.Strategy .. ' not applicable - pocket too narrow for chainsaw width'
@@ -5177,15 +5179,15 @@ function SawPlusChain.Make( Proc, nRawId, nPhase, bOnlySaw)
Proc.Pocket.Strategy = 'SawPlusChain'
local b3Raw = EgtGetRawPartBBox( nRawId)
if not SawPlusChain.IsTopologyOk( Proc) then
local sErr = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. Proc.Pocket.Strategy .. ' not implemented for topology ' .. Proc.TopologyLongName
-- TODO per implementare la strategia con lapjoint lunghe bisogna prima riconoscere le topologie che arrivano
if Proc.IsSplittedLapJoint then
local sErr = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. Proc.Pocket.Strategy .. ' not implemented for long lapjoint '
EgtOutLog( sErr)
return false, sErr
end
-- TODO per implementare la strategia con lapjoint lunghe bisogna prima riconoscere le topologie che arrivano
if Proc.IsSplittedLapJoint then
local sErr = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. Proc.Pocket.Strategy .. ' not implemented for long lapjoint '
if not SawPlusChain.IsTopologyOk( Proc) then
local sErr = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. Proc.Pocket.Strategy .. ' not implemented for topology ' .. Proc.TopologyLongName
EgtOutLog( sErr)
return false, sErr
end