DataWindow :
- modifiche alla soglia per gestire meglio la preview degli split che terminano sulla soglia.
This commit is contained in:
@@ -650,7 +650,7 @@ local function GetProfileLocalBox( nProfileId)
|
||||
local frFrame = EgtFR( nFrameId, GDB_ID.ROOT)
|
||||
-- recupero il Ref del profilo e ne calcolo il box
|
||||
local nRefId = EgtGetFirstNameInGroup( nProfileId, WIN_REF)
|
||||
local b3Box = EgtGetBBoxRef( nRefId, GDB_BB.STANDARD, frFrame, GDB_RT.GLOB)
|
||||
local b3Box = EgtGetBBoxRef( nRefId, GDB_BB.STANDARD, frFrame)
|
||||
return b3Box
|
||||
end
|
||||
|
||||
@@ -2160,7 +2160,7 @@ local function CheckSemiprofileIntersection( nGeoId, nPrevGeoId, nNextGeoId)
|
||||
local nProfileId = EgtGetParent( nSemiProfileId)
|
||||
local nFrameId = EgtGetFirstNameInGroup( nProfileId, WIN_SECTIONFRAME)
|
||||
local frFrame = EgtFR( nFrameId, GDB_ID.ROOT)
|
||||
local b3Box = EgtGetBBoxRef( nSemiProfileId, GDB_BB.STANDARD, frFrame, GDB_RT.GLOB)
|
||||
local b3Box = EgtGetBBoxRef( nSemiProfileId, GDB_BB.STANDARD, frFrame)
|
||||
local nInnerCrv = EgtCopyGlob( nOutlineId, EgtGetParent( nGeoId))
|
||||
EgtOffsetCurve( nInnerCrv, b3Box:getMin():getX())
|
||||
|
||||
@@ -2485,26 +2485,26 @@ local function CalcGeo( nPartId, nOutlineId)
|
||||
end
|
||||
|
||||
-- se giunzione diversa da bisettrice ed elementi in tangenza ( entro 6°) o dello stesso tipo o entrambi con cambio profilo, forzo il tipo a bisettrice
|
||||
if nStartJoint ~= WIN_JNT.ANGLED then
|
||||
if nStartJoint ~= WIN_PART_JNT.ANGLED then
|
||||
local bMixedPrev = EgtGetInfo( vPrevOutlineId[1], WIN_PRF_CHANGE, 'b') or false
|
||||
if EgtEV( abs( vPrevOutlineId[1])) * EgtSV( nOutlineId) > s_dAngledCos or EgtGetName( nOutlineId) == EgtGetName( abs( vPrevOutlineId[1])) or ( bMixed and bMixedPrev) then
|
||||
nStartJoint = WIN_JNT.ANGLED
|
||||
nStartJoint = WIN_PART_JNT.ANGLED
|
||||
end
|
||||
end
|
||||
if nEndJoint ~= WIN_JNT.ANGLED then
|
||||
if nEndJoint ~= WIN_PART_JNT.ANGLED then
|
||||
local bMixedNext = EgtGetInfo( vNextOutlineId[1], WIN_PRF_CHANGE, 'b') or false
|
||||
if EgtEV( nOutlineId) * EgtSV( abs( vNextOutlineId[1])) > s_dAngledCos or EgtGetName( nOutlineId) == EgtGetName( abs( vNextOutlineId[1])) or ( bMixed and bMixedNext) then
|
||||
nEndJoint = WIN_JNT.ANGLED
|
||||
nEndJoint = WIN_PART_JNT.ANGLED
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- nel caso di incontro con soglia la giunzione deve essere full
|
||||
-- nel caso di incontro con soglia la giunzione deve essere short
|
||||
if EgtGetInfo( abs( vPrevOutlineId[1]), WIN_THRESHOLD, 'b') then
|
||||
nStartJoint = WIN_JNT.FULL
|
||||
nStartJoint = WIN_PART_JNT.SHORT
|
||||
end
|
||||
if EgtGetInfo( abs( vNextOutlineId[1]), WIN_THRESHOLD, 'b') then
|
||||
nEndJoint = WIN_JNT.FULL
|
||||
nEndJoint = WIN_PART_JNT.SHORT
|
||||
end
|
||||
|
||||
-- salvo il valore dei joints su outline
|
||||
@@ -2824,7 +2824,7 @@ local function CreateProfilingProcessingCurve( vCrvs, nPrevCrv, nSurfGeo, nProcL
|
||||
local nProfileId = EgtGetParent( nSemiProfileId)
|
||||
local nFrameId = EgtGetFirstNameInGroup( nProfileId, WIN_SECTIONFRAME)
|
||||
local frFrame = EgtFR( nFrameId, GDB_ID.ROOT)
|
||||
local b3SemiProfile = EgtGetBBoxRef( nSemiProfileId, GDB_BB.STANDARD, frFrame, GDB_RT.GLOB)
|
||||
local b3SemiProfile = EgtGetBBoxRef( nSemiProfileId, GDB_BB.STANDARD, frFrame)
|
||||
local dOffs = b3SemiProfile:getDimX()
|
||||
|
||||
local vProcCrvs = {}
|
||||
@@ -4253,7 +4253,7 @@ local function CreateStripGuideLines( nOutlineId, nRefOutlineId, nStripId, nProf
|
||||
-- recupero il box dello strip nel frame del profilo
|
||||
local nProfileFrameId = EgtGetFirstNameInGroup( nProfileId, WIN_SECTIONFRAME)
|
||||
local frProfile = EgtFR( nProfileFrameId, GDB_ID.ROOT)
|
||||
local b3MainStrip = EgtGetBBoxRef( nStripId, GDB_BB.STANDARD, frProfile, GDB_RT.GLOB)
|
||||
local b3MainStrip = EgtGetBBoxRef( nStripId, GDB_BB.STANDARD, frProfile)
|
||||
|
||||
-- calcolo offset per strip
|
||||
local dDelta = EgtGetInfo( nProfileId, WIN_RAILDELTA, 'd') or 0
|
||||
@@ -6997,6 +6997,12 @@ local function CalcPartPreview( nPartId, nPreviewGrp)
|
||||
|
||||
else
|
||||
for i = 1, #vPrevOutlineId do
|
||||
|
||||
-- se è pezzo del telaio contro soglia lo tratto come se fosse full
|
||||
if EgtGetName( nOutlineId) ~= WIN_SPLIT and EgtGetInfo( abs( vPrevOutlineId[i]), WIN_THRESHOLD, 'b') then
|
||||
nStartJoint = WIN_PART_JNT.FULL
|
||||
end
|
||||
|
||||
if nStartJoint == WIN_PART_JNT.SHORT then
|
||||
local b3Profile = GetProfileLocalBox( vPrevProfileId[i])
|
||||
local nCrvId = EgtCopy( abs( vPrevOutlineId[i]), nGrpTmp)
|
||||
@@ -7058,6 +7064,12 @@ local function CalcPartPreview( nPartId, nPreviewGrp)
|
||||
else
|
||||
for i = 1, #vNextOutlineId do
|
||||
local nCrvId
|
||||
|
||||
-- se è pezzo del telaio contro soglia lo tratto come se fosse full
|
||||
if EgtGetName( nOutlineId) ~= WIN_SPLIT and EgtGetInfo( abs( vNextOutlineId[i]), WIN_THRESHOLD, 'b') then
|
||||
nEndJoint = WIN_PART_JNT.FULL
|
||||
end
|
||||
|
||||
if nEndJoint == WIN_PART_JNT.SHORT then
|
||||
nCrvId = EgtCopyGlob( abs( vNextOutlineId[i]), nGrpTmp)
|
||||
local b3Profile = GetProfileLocalBox( vNextProfileId[i])
|
||||
|
||||
Reference in New Issue
Block a user