Compare commits

..

3 Commits

Author SHA1 Message Date
andrea.villa 83f5841ece - In BLADEKEEPWASTE testimoni perpendicolari anche con lama che lavora i due edges. In caso MaxMat maggiore di 3 volte elevazione faccia, si fa comunque solo da un lato (anche in caso trovi la lavorazione del lato2).
- se taglio troncante e rivolto verso la coda, lo si considera come un taglio di coda da fare dopo quello di separazione
- pulizia spigoli con fresa in STR0010 da fare in un'unica lavorazione, non spezzata
2026-08-27 15:50:35 +02:00
andrea.villa c1eee0201c In FeatureLib, quando si costruisce la Proc su una Trimesh, si ricava anche la Topologia 2026-08-21 14:38:01 +02:00
luca.mazzoleni 05fc22b1d4 Merge branch 'main' into develop 2026-07-30 17:28:02 +02:00
3 changed files with 63 additions and 46 deletions
+7
View File
@@ -36,6 +36,9 @@ function FeatureLib.GetProcFromTrimesh( idTrimesh, Part, ProcToCopyFrom)
if ProcToCopyFrom and Proc.dVolume < 10 * GEO.EPS_SMALL then
Proc.dVolume = ProcToCopyFrom.dVolume
end
Proc.nParts = EgtSurfTmPartCount( Proc.id) or 1
Proc.Topology = FeatureLib.ClassifyTopology( Proc, Part)
-- TODO servono anche altri dati raccolti nel collect??
return Proc
@@ -220,6 +223,10 @@ function FeatureLib.ClassifyTopology( Proc, Part)
elseif Proc.nFct == 1 and ( bIsFeatureCuttingEntireSection or bIsFeatureCuttingEntireLength) then
sFamily = 'Cut'
bIsThrough = true
-- se taglia intera sezione ed è rivolto verso la coda, bisogna considerare come se tocchi la faccia di coda
if Proc.Faces[1].vtN:getX() < 0 then
Proc.AffectedFaces.bLeft = true
end
elseif Proc.nFct == 1 then
sFamily = 'Bevel'
bIsThrough = true
+6 -4
View File
@@ -316,10 +316,11 @@ function STR0010.Make( bAddMachining, Proc, Part, CustomParameters)
local dDepthToMachine = EdgesClosedNotMachined[i].dElevation - dMillingOffsetFromSide
local dToolMarkLength = Milling1.dToolMarkLength or 0
local OptionalParameters = {
bIsSplitFeature = bIsSplitFeature,
bIsSplitFeature = false, -- anche se feature splittata, le facce di chiusura si lavorano intere
dExtendAfterTail = dExtendAfterTail,
dRadialStepSpan = dToolMarkLength,
dDepthToMachine = dDepthToMachine
dDepthToMachine = dDepthToMachine,
nStepType = MCH_MILL_ST.ONEWAY
}
local Milling = FaceByMill.Make( Proc, Part, BottomFace1, EdgesClosedNotMachined[i], OptionalParameters)
Milling.nInternalSortingPriority = 3
@@ -342,10 +343,11 @@ function STR0010.Make( bAddMachining, Proc, Part, CustomParameters)
local dDepthToMachine = EdgesClosedNotMachined[i].dElevation - dMillingOffsetFromSide
local dToolMarkLength = Milling2.dToolMarkLength or 0
local OptionalParameters = {
bIsSplitFeature = bIsSplitFeature,
bIsSplitFeature = false, -- anche se feature splittata, le facce di chiusura si lavorano intere
dExtendAfterTail = dExtendAfterTail,
dRadialStepSpan = dToolMarkLength,
dDepthToMachine = dDepthToMachine
dDepthToMachine = dDepthToMachine,
nStepType = MCH_MILL_ST.ONEWAY
}
local Milling = FaceByMill.Make( Proc, Part, BottomFace2, EdgesClosedNotMachined[i], OptionalParameters)
Milling.nInternalSortingPriority = 3
+50 -42
View File
@@ -171,50 +171,58 @@ local function MakeBottomFace( Proc, Part, BottomFace, EdgeToMachine, Parameters
Cutting2.nInternalSortingPriority = 2
Cutting2.dResultWeight = 0.3
-- se uno dei due lati non è riuscito, si estende il più possibile il lato rimasto
if not Cutting1.bIsApplicable and Cutting2.bIsApplicable then
-- se si lavora il lato in comune con l'altra BottomFace significa ci si deve fermare piú indietro
if OtherBottomFace and ( EdgeToMachine.idAdjacentFace == OtherBottomFace.id) then
dStripWidth = TOOLS[Cutting2.nToolIndex].dThickness + 2 * dStripWidth
end
-- se richiesto, si calcola il codolo verticale
if bAllowPerpendicularStrip and FeatureLib.IsMachiningLong( Cutting1.dEdgeLength, Part) then
dDepthToMachine = TOOLS[Cutting2.nToolIndex].dMaxMaterial - 10
else
dDepthToMachine = min( TOOLS[Cutting2.nToolIndex].dMaxMaterial, EdgeToMachine.dElevation - dStripWidth)
end
OptionalParametersFaceByBlade2.dDepthToMachine = dDepthToMachine
Cutting2 = FaceByBlade.Make( Proc, Part, BottomFace, EdgeToMachine, OptionalParametersFaceByBlade2)
Cutting2.nInternalSortingPriority = 2
Cutting2.dResultWeight = 0.3
table.insert( Cuttings, Cutting2)
elseif not Cutting2.bIsApplicable and Cutting1.bIsApplicable then
-- se si lavora il lato in comune con l'altra BottomFace significa ci si deve fermare piú indietro
if OtherBottomFace and ( EdgeToMachine.idAdjacentFace == OtherBottomFace.id) then
dStripWidth = TOOLS[Cutting1.nToolIndex].dThickness + 2 * dStripWidth
end
-- se richiesto, si calcola il codolo verticale
if bAllowPerpendicularStrip and FeatureLib.IsMachiningLong( Cutting2.dEdgeLength, Part) then
dDepthToMachine = TOOLS[Cutting1.nToolIndex].dMaxMaterial - 10
else
dDepthToMachine = min( TOOLS[Cutting1.nToolIndex].dMaxMaterial, EdgeToMachine.dElevation - dStripWidth)
end
OptionalParametersFaceByBlade1.dDepthToMachine = dDepthToMachine
Cutting1 = FaceByBlade.Make( Proc, Part, BottomFace, EdgeToMachine, OptionalParametersFaceByBlade1)
Cutting1.nInternalSortingPriority = 2
Cutting1.dResultWeight = 0.3
-- se entrambi i lati lavorati e codolo centrale, si aggiungono in lista senza fare altro
if Cutting1.bIsApplicable and Cutting2.bIsApplicable and not bAllowPerpendicularStrip then
table.insert( Cuttings, Cutting1)
table.insert( Cuttings, Cutting2)
else
table.insert( Cuttings, Cutting1)
table.insert( Cuttings, Cutting2)
-- si estende il lato il più possibile
if Cutting1.bIsApplicable then
-- se si lavora il lato in comune con l'altra BottomFace significa ci si deve fermare piú indietro
if OtherBottomFace and ( EdgeToMachine.idAdjacentFace == OtherBottomFace.id) then
dStripWidth = TOOLS[Cutting1.nToolIndex].dThickness + 2 * dStripWidth
end
-- se richiesto, si calcola il codolo verticale
if bAllowPerpendicularStrip and FeatureLib.IsMachiningLong( Cutting1.dEdgeLength, Part) then
dDepthToMachine = TOOLS[Cutting1.nToolIndex].dMaxMaterial - 10
-- CASO SPECIALE : se il massimo materiale è più di 3 volte la faccia, si fa lavorazione solo da un lato, l'altro viene annullato
if TOOLS[Cutting1.nToolIndex].dMaxMaterial / 3 > EdgeToMachine.dElevation then
Cutting2.bIsApplicable = false
end
else
dDepthToMachine = min( TOOLS[Cutting1.nToolIndex].dMaxMaterial, EdgeToMachine.dElevation - dStripWidth)
end
OptionalParametersFaceByBlade1.dDepthToMachine = dDepthToMachine
Cutting1 = FaceByBlade.Make( Proc, Part, BottomFace, EdgeToMachine, OptionalParametersFaceByBlade1)
Cutting1.nInternalSortingPriority = 2
Cutting1.dResultWeight = 0.3
table.insert( Cuttings, Cutting1)
end
-- si estende il lato il più possibile
if Cutting2.bIsApplicable then
-- se si lavora il lato in comune con l'altra BottomFace significa ci si deve fermare piú indietro
if OtherBottomFace and ( EdgeToMachine.idAdjacentFace == OtherBottomFace.id) then
dStripWidth = TOOLS[Cutting2.nToolIndex].dThickness + 2 * dStripWidth
end
-- se richiesto, si calcola il codolo verticale
if bAllowPerpendicularStrip and FeatureLib.IsMachiningLong( Cutting1.dEdgeLength, Part) then
dDepthToMachine = TOOLS[Cutting2.nToolIndex].dMaxMaterial - 10
else
dDepthToMachine = min( TOOLS[Cutting2.nToolIndex].dMaxMaterial, EdgeToMachine.dElevation - dStripWidth)
end
OptionalParametersFaceByBlade2.dDepthToMachine = dDepthToMachine
Cutting2 = FaceByBlade.Make( Proc, Part, BottomFace, EdgeToMachine, OptionalParametersFaceByBlade2)
Cutting2.nInternalSortingPriority = 2
Cutting2.dResultWeight = 0.3
table.insert( Cuttings, Cutting2)
end
end
return Cuttings