DataBeam :

- correzione a LongCut con limitazione
- modifica riconoscimento Tail di LapJoint.
This commit is contained in:
Dario Sassi
2019-09-30 09:28:09 +00:00
parent 79b7d2337f
commit c77d77ad92
2 changed files with 65 additions and 25 deletions
+6 -13
View File
@@ -73,8 +73,8 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
if Proc.Box:getMin():getX() > b3Raw:getMin():getX() + BD.MAX_DIST_HTFEA then
return false
end
-- la sua lunghezza non deve superare la metà della lunghezza della trave
if Proc.Box:getDimX() > 0.5 * b3Raw:getDimX() then
-- la sua lunghezza non deve superare 1/4 della lunghezza della trave
if Proc.Box:getDimX() > 0.25 * b3Raw:getDimX() then
return false
end
-- se una o due facce ora è sicuramente di coda
@@ -660,24 +660,17 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- due facce
elseif Proc.Fct == 2 then
-- determino se due facce lunghe oppure una lunga e l'altra terminale
local CopyId = EgtCopyGlob( Proc.Id, Proc.Id, GDB_IN.AFTER)
local NewId, nCount = EgtExplodeSurf( CopyId)
local b3Fac1 = EgtGetBBoxGlob( NewId, GDB_BB.STANDARD)
local b3Fac2 = EgtGetBBoxGlob( NewId + 1, GDB_BB.STANDARD)
if abs( b3Fac1:getDimX() - b3Fac2:getDimX()) < 10 then
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, 0, GDB_BB.STANDARD)
local b3Fac2 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, 1, GDB_BB.STANDARD)
if abs( b3Fac1:getDimX() - b3Fac2:getDimX()) < 50 then
return Long2Cut.Make( Proc, nPhase, nRawId, nPartId)
elseif b3Fac1:getDimX() < 1 then
-- la faccia 0 deve essere quella lunga
local nNew2Id = EgtSurfTmBySewing( EgtGetParent( Proc.Id), { NewId+1, NewId})
EgtCopyAttributes( Proc.Id, nNew2Id)
EgtErase( Proc.Id)
EgtChangeId( nNew2Id, Proc.Id)
EgtSurfTmSwapFacets( Proc.Id, 0, 1)
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
elseif b3Fac2:getDimX() < 1 then
EgtErase( {NewId, NewId+1})
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
else
EgtErase( {NewId, NewId+1})
return MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId)
end
-- tre o più facce