DataBeam :

- correzioni varie.
This commit is contained in:
Dario Sassi
2021-01-25 08:18:54 +00:00
parent ffc30b27dc
commit 786b1224a2
7 changed files with 80 additions and 54 deletions
+10 -5
View File
@@ -1,4 +1,4 @@
-- DiceCut.lua by Egaltech s.r.l. 2021/01/06
-- DiceCut.lua by Egaltech s.r.l. 2021/01/21
-- Gestione dei piano paralleli nei tagli lunghi: equidistanziamento dei piani paralleli
-- Tabella per definizione modulo
@@ -37,7 +37,7 @@ local function GetParallelPlanes( nParent, BBoxRawPart, ptC, vtN, nCopyPlane, dO
if dTolerance then
ptMyCCut = Point3d( ptCCut + dTolerance * vtNCut)
end
ptMyCCut = Point3d( ptCCut + dTolerance * vtNCut)
ptMyCCut = Point3d( ptCCut)
end
local ptMyCCut1
if ptCCut1 and vtNCut1 then
@@ -48,13 +48,19 @@ local function GetParallelPlanes( nParent, BBoxRawPart, ptC, vtN, nCopyPlane, dO
while i < nStep do
local SurfId = EgtSurfTmPlaneInBBox( nParent, ptC + ( i * dOffset) * vtN, vtN, BBoxRawPart, GDB_RT.GLOB)
local nFacet = EgtSurfTmFacetCount( SurfId or GDB_ID.NULL)
if nFacet == 0 then
-- se sono al primo taglio do una possibilità in più di girare
if i > nCopyPlane then
break
end
end
if nFacet > 0 and vtNCut and ptMyCCut and EgtSurfArea(SurfId) > AreaMin then
if i == nCopyPlane and bNoTolOnFirstCut then
EgtCutSurfTmPlane( SurfId, ptCCut, -vtNCut, false, GDB_RT.GLOB)
else
EgtCutSurfTmPlane( SurfId, ptMyCCut, -vtNCut, false, GDB_RT.GLOB)
end
nFacet = EgtSurfTmFacetCount( SurfId)
nFacet = EgtSurfTmFacetCount( SurfId)
end
if nFacet > 0 and vtNCut1 and ptMyCCut1 and EgtSurfArea(SurfId) > AreaMin then
if i == nCopyPlane and bNoTolOnFirstCut then
@@ -62,14 +68,13 @@ local function GetParallelPlanes( nParent, BBoxRawPart, ptC, vtN, nCopyPlane, dO
else
EgtCutSurfTmPlane( SurfId, ptMyCCut1, -vtNCut1, false, GDB_RT.GLOB)
end
nFacet = EgtSurfTmFacetCount( SurfId)
nFacet = EgtSurfTmFacetCount( SurfId)
end
if nFacet > 0 and EgtSurfArea(SurfId) > AreaMin then
table.insert( TabellaTmSurfParallel, SurfId)
EgtSetColor( SurfId, Color)
else
EgtErase( SurfId)
break
end
if dOffset == 0 then
break