DataBeam :

- correzioni varie
- gestione scassi a C passanti e grandi con fresature sui due lati
- miglioria a contorni liberi chiusi per posizione di attacco
- correzioni a feature 3/4-020-X caso particolare Olaf.
This commit is contained in:
Dario Sassi
2020-03-18 08:19:44 +00:00
parent b7d8db32b0
commit b6cbab67ec
6 changed files with 1530 additions and 498 deletions
+34 -1
View File
@@ -122,6 +122,30 @@ function BeamLib.PutStartOnTop( nCrvId)
return true
end
-------------------------------------------------------------------------------------------------------------
function BeamLib.PutStartOnLonger( nCrvId)
-- verifico che la curva sia chiusa
if not EgtCurveIsClosed( nCrvId) then return false end
-- cerco l'entità più lunga e la imposto come inizio
local dUmax = 0
local dLmax = - GEO.INFINITO
local dUi, dUf = EgtCurveDomain( nCrvId)
for dU = dUi, dUf - 1 do
local ptP1 = EgtUP( nCrvId, dU, GDB_ID.ROOT)
local ptP2 = EgtUP( nCrvId, dU + 0.5, GDB_ID.ROOT)
local ptP3 = EgtUP( nCrvId, dU + 1.0, GDB_ID.ROOT)
local dL = dist( ptP1, ptP2) + dist( ptP2, ptP3)
if dL > dLmax + GEO.EPS_SMALL then
dLmax = dL
dUmax = dU
end
end
if abs( dUmax - dUi) > GEO.EPS_ZERO then
EgtChangeClosedCurveStart( nCrvId, dUmax)
end
return true
end
-------------------------------------------------------------------------------------------------------------
function BeamLib.PutStartNearestToEdge( nCrvId, b3Raw)
-- verifico che la curva sia chiusa
@@ -319,7 +343,7 @@ function BeamLib.GetBoxFaceNorm( b3Box, ptP, vtV)
end
---------------------------------------------------------------------
function BeamLib.GetFaceWithMostAdj( nSurfId, nPartId)
function BeamLib.GetFaceWithMostAdj( nSurfId, nPartId, bCompare3Fc)
-- recupero il numero di facce
local nFacCnt = EgtSurfTmFacetCount( nSurfId)
-- recupero le normali delle facce
@@ -371,6 +395,15 @@ function BeamLib.GetFaceWithMostAdj( nSurfId, nPartId)
end
end
end
if bCompare3Fc and nFacCnt == 3 then
if vAdj[1] == 2 and vAdj[2] == 1 and vAdj[3] == 1 then
if vOrtho[1] == true and vOrtho[2] == true and vOrtho[3] == true then
return -1, GEO.INFINITO, true
else
return -1, GEO.INFINITO
end
end
end
-- recupero le facce non in sottosquadra e con il maggior numero di adiacenze
local nFacInd = {}
local nMaxAdj = -1