DataWall :
- migliorie a nesting in presenza di tagli inclinati.
This commit is contained in:
+36
-1
@@ -54,6 +54,8 @@ _G.package.loaded.WProcessDrill = nil
|
||||
local Drill = require( 'WProcessDrill')
|
||||
_G.package.loaded.WProcessDoubleCut = nil
|
||||
local DoubleCut = require( 'WProcessDoubleCut')
|
||||
_G.package.loaded.WProcessFreeContour = nil
|
||||
local FreeContour = require( 'WProcessFreeContour')
|
||||
|
||||
-- Carico i dati globali
|
||||
local WD = require( 'WallData')
|
||||
@@ -369,6 +371,39 @@ local function ComputeToolOutlines( nPartId)
|
||||
if nId ~= GDB_ID.NULL then table.insert(ToolOutlineId, nId) end
|
||||
end
|
||||
end
|
||||
|
||||
-- lati inclinati free contour
|
||||
if FreeContour.Identify( Proc) then
|
||||
for nInd = 0, Proc.Fct - 1 do
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nInd, GDB_ID.ROOT)
|
||||
-- se inclinato verso il basso
|
||||
if vtN:getZ() < - GEO.EPS_SMALL then
|
||||
local bLeftOrRightFace = abs( vtN:getX()) > GEO.EPS_SMALL
|
||||
local bFrontOrBackFace = abs( vtN:getY()) > GEO.EPS_SMALL
|
||||
if ( bLeftOrRightFace ~= bFrontOrBackFace) then
|
||||
local vtMainDir = EgtIf( bLeftOrRightFace, X_AX(), Y_AX())
|
||||
local vtOtherDir = EgtIf( bLeftOrRightFace, Y_AX(), X_AX())
|
||||
local dCosAlpha = vtN * vtMainDir
|
||||
local dVal = ( NEST.OFFSET + 0.1) / dCosAlpha
|
||||
local b3Face = EgtSurfTmGetFacetBBoxGlob( Proc.Id, nInd, GDB_BB.STANDARD)
|
||||
local dDim = EgtIf( bLeftOrRightFace, b3Face:getDimY(), b3Face:getDimX())
|
||||
local ptP1
|
||||
if ( dCosAlpha < 0) then
|
||||
ptP1 = b3Face:getMin()
|
||||
else
|
||||
ptP1 = b3Face:getMax()
|
||||
dDim = -1 * dDim
|
||||
end
|
||||
|
||||
local ptP2 = ptP1 + dVal * vtMainDir + dDim * vtOtherDir
|
||||
local nRectId = EgtRectangle2P( nOutlineGrp, Point3d(ptP1:getX(), ptP1:getY(), 0), Point3d( ptP2:getX(), ptP2:getY(), 0))
|
||||
EgtSetColor( nRectId, EgtStdColor("AQUA"))
|
||||
if nRectId ~= GDB_ID.NULL then table.insert( ToolOutlineId, nRectId) end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return ToolOutlineId
|
||||
@@ -1961,7 +1996,7 @@ if bNestingOk then
|
||||
if RawParts[nIndex].PartId[nInd2] == vDoneManually[nInd].SheetId then
|
||||
EgtSetInfo(nMachGroup, "PANELLEN", RawParts[nIndex].Len)
|
||||
EgtSetInfo(nMachGroup, "PANELWIDTH", RawParts[nIndex].Width)
|
||||
EgtSetInfo(nMachGroup, "MATERIAL", RawParts[nIndex].Material)
|
||||
EgtSetInfo(nMachGroup, "MATERIAL", NEST.MATERIAL)
|
||||
EgtSetInfo(nMachGroup, "AUTONEST", 1)
|
||||
-- scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
|
||||
EgtSetInfo( nMachGroup, "PRODID", NEST.PRODID)
|
||||
|
||||
Reference in New Issue
Block a user