DataBeam :
- correzioni varie.
This commit is contained in:
+10
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user