DataWall :

- migliorie per nesting
- correzione scelta testa per fori orizzontali ciechi
- posizionamento pezzi in Vista secondo angolo preferenziale di nesting.
This commit is contained in:
DarioS
2022-01-05 20:47:31 +01:00
parent a471125fda
commit f5fdb7d89e
4 changed files with 356 additions and 288 deletions
+12 -3
View File
@@ -48,7 +48,7 @@ local Variant = require( 'WProcessVariant')
-------------------------------------------------------------------------------------------------------------
-- *** Inserimento delle pareti nel pannello ***
-------------------------------------------------------------------------------------------------------------
function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bPartOriBL)
function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewProcess)
-- Creazione nuovo gruppo di lavoro
if not bMachGroupOk then
@@ -117,8 +117,17 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bPartO
-- inserisco il pezzo nel grezzo
EgtDeselectPartObjs( Pz)
local ptPos
if bPartOriBL then
ptPos = Point3d( vWall[i].PosX, vWall[i].PosZ, ( dRawH - PartHeight) / 2) + vtOffs
if bNewProcess then
local sNestingRef = ( WALL.NESTING_REF or WD.NESTING_CORNER)
if sNestingRef == 'TL' then
ptPos = Point3d( vWall[i].PosX, dRawW - PartWidth - vWall[i].PosZ, ( dRawH - PartHeight) / 2) + vtOffs
elseif sNestingRef == 'TR' then
ptPos = Point3d( dRawL - PartLen - vWall[i].PosX, dRawW - PartWidth - vWall[i].PosZ, ( dRawH - PartHeight) / 2) + vtOffs
elseif sNestingRef == 'BR' then
ptPos = Point3d( dRawL - PartLen - vWall[i].PosX, vWall[i].PosZ, ( dRawH - PartHeight) / 2) + vtOffs
else -- 'BL'
ptPos = Point3d( vWall[i].PosX, vWall[i].PosZ, ( dRawH - PartHeight) / 2) + vtOffs
end
else
local dPosH = EgtIf( vWall[i].PosY < 0.1, ( dRawH - PartHeight) / 2, vWall[i].PosY)
ptPos = Point3d( dRawL - vWall[i].PosX - PartLen, vWall[i].PosZ, dPosH) + vtOffs