DataWall :
- modifiche per poter forzare nesting con riferimento standard ('BL')
- correzione calcoli per nesting.
This commit is contained in:
+15
-13
@@ -1079,7 +1079,8 @@ local function ClassifyAngles( nPartId, RawPart, sRefOrig, bLockedRot, dMinSheet
|
||||
if not bOptimal then bManual = true end
|
||||
|
||||
elseif ResLapJoints.Nbr == 4 then
|
||||
nAngle = 100
|
||||
nAngle, nRotate2 = RotateOptimalCase( nPartId, 0, 90, RawPart, 100, 100)
|
||||
nRotate = nRotate + nRotate2
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1104,14 +1105,15 @@ local function ClassifyAngles( nPartId, RawPart, sRefOrig, bLockedRot, dMinSheet
|
||||
local PartAngleClassification = { PartId = tostring( nPartId), Angle = nAngle, nRotate = nRotate, bDrill = bDrill, bLongDrill = bLongDrill, bManual = bManual}
|
||||
|
||||
local bCanBeOnOtherEdge = not bDrill or ( bDrill and RawPart.Width >= WD.MINRAWY_HOR_DRILL)
|
||||
if bCanBeOnOtherEdge or bOnly180Rot then
|
||||
EgtSetInfo( nPartId, "NestAllowRot", 1)
|
||||
EgtSetInfo( nPartId, "NestStepRot", 180)
|
||||
else
|
||||
EgtSetInfo( nPartId, "NestAllowRot", 0)
|
||||
EgtSetInfo( nPartId, "NestStepRot", 0)
|
||||
end
|
||||
|
||||
if bOnly180Rot then
|
||||
if bCanBeOnOtherEdge then
|
||||
EgtSetInfo( nPartId, "NestAllowRot", 1)
|
||||
EgtSetInfo( nPartId, "NestStepRot", 180)
|
||||
else
|
||||
EgtSetInfo( nPartId, "NestAllowRot", 0)
|
||||
EgtSetInfo( nPartId, "NestStepRot", 0)
|
||||
end
|
||||
end
|
||||
|
||||
-- verifico se il pezzo cade (caso di foro)
|
||||
b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD)
|
||||
@@ -1356,7 +1358,7 @@ end
|
||||
|
||||
-- Funzione che sposta e aggiunge pezzi per nesting
|
||||
local function AddRawParts(RawParts, vDoneManually)
|
||||
|
||||
|
||||
local OUTLINE = "Outline"
|
||||
for nIndex = 1, #RawParts do
|
||||
RawParts[nIndex].PartId = {}
|
||||
@@ -1441,8 +1443,8 @@ local function AddParts(RawParts, vPartsDoneManually)
|
||||
else
|
||||
-- posiziono con il nesting solo quelli mancanti
|
||||
nCount = nCount - nManuallyDone
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
nPartIndex = nPartIndex + 1
|
||||
|
||||
-- calcolo bbox pezzo per rotazioni
|
||||
@@ -1774,7 +1776,7 @@ local function AddParts(RawParts, vPartsDoneManually)
|
||||
|
||||
-- punto di riferimento sul pezzo
|
||||
local ptRef
|
||||
local dval = 10
|
||||
local dval = 10
|
||||
if ( WD.ORIG_CORNER == 'TL' or WD.ORIG_CORNER == 'TR') then
|
||||
ptRef = Point3d( b3Part:getMax():getX() - b3Part:getDimX() / 2, b3Part:getMax():getY() - dval, 0)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user