DataWindow :
- correzione errore giunzione a 45°.
This commit is contained in:
@@ -31,6 +31,8 @@ local s_nRedisConnectionId = 0 -- 0 connessione non definita, > 0 connessione d
|
||||
local s_dDowelTol = 1
|
||||
local s_dSimplSolidApprox = 0.2 -- approssimazione lineare nel caso di solidi semplificati
|
||||
local s_nSashNbr = 0 -- contatore delle ante per assegnare nomi
|
||||
local s_dAngledCos = 0.995 -- coseno limite oltre il quale viene forzata giunzione angled
|
||||
|
||||
|
||||
local s_bCalcSolid = false
|
||||
function WinCalculate.GetCalcSolid()
|
||||
@@ -2229,7 +2231,7 @@ local function CreateGeoCurves( nOutlineId, vPrevOutlineId, vNextOutlineId, nSta
|
||||
EgtSetInfo( nInId, WIN_REF_OUTLINE, - nOutlineId)
|
||||
EgtSetInfo( nInId, WIN_GEO_OFFS, - dCurrOffset + b3CurrProfileFrame:getDimX())
|
||||
|
||||
|
||||
|
||||
-- curve left
|
||||
local vPrevProfileId = EgtGetNameInGroup( nProfileLayerId, WIN_PRF_START)
|
||||
for i = 1, #vPrevOutlineId do
|
||||
@@ -2244,7 +2246,7 @@ local function CreateGeoCurves( nOutlineId, vPrevOutlineId, vNextOutlineId, nSta
|
||||
-- a) calcolo bisettore: se pezzi lineari o in tangenza è segmento, altrimenti è tratto di parabola
|
||||
local nBisector
|
||||
if ( EgtGetType( nOutlineId) == GDB_TY.CRV_LINE and EgtGetType( vPrevOutlineId[i]) == GDB_TY.CRV_LINE) or
|
||||
EgtEV( vPrevOutlineId[i]) * EgtSV( nOutlineId) > 0.95 or
|
||||
EgtEV( vPrevOutlineId[i]) * EgtSV( nOutlineId) > s_dAngledCos or
|
||||
EgtGetName( nOutlineId) == EgtGetName( vPrevOutlineId[i]) then
|
||||
|
||||
local nOtherIn = EgtCopyGlob( vPrevOutlineId[i], nGeoLayerId)
|
||||
@@ -2315,7 +2317,7 @@ local function CreateGeoCurves( nOutlineId, vPrevOutlineId, vNextOutlineId, nSta
|
||||
-- calcolo bisettore
|
||||
local nBisector
|
||||
if ( EgtGetType( nOutlineId) == GDB_TY.CRV_LINE and EgtGetType( vNextOutlineId[i]) == GDB_TY.CRV_LINE) or
|
||||
EgtEV( nOutlineId) * EgtSV( vNextOutlineId[i]) > 0.95 or
|
||||
EgtEV( nOutlineId) * EgtSV( vNextOutlineId[i]) > s_dAngledCos or
|
||||
EgtGetName( nOutlineId) == EgtGetName( vNextOutlineId[i]) then
|
||||
|
||||
local nOtherIn = EgtCopyGlob( vNextOutlineId[i], nGeoLayerId)
|
||||
@@ -2457,11 +2459,11 @@ local function CalcGeo( nPartId, nOutlineId, nOutlineCrvNbr, nOutlineLayerId, nP
|
||||
nEndJointType = vJoints[1]
|
||||
end
|
||||
|
||||
-- se giunzione diversa da bisettrice ed elementi in tangenza ( entro 9°) o dello stesso tipo, forzo il tipo a bisettrice
|
||||
if nStartJointType ~= WIN_JNT.ANGLED and ( EgtEV( abs( vPrevOutlineId[1])) * EgtSV( nOutlineId) > 0.987 or EgtGetName( nOutlineId) == EgtGetName( abs( vPrevOutlineId[1]))) then
|
||||
-- se giunzione diversa da bisettrice ed elementi in tangenza ( entro 6°) o dello stesso tipo, forzo il tipo a bisettrice
|
||||
if nStartJointType ~= WIN_JNT.ANGLED and ( EgtEV( abs( vPrevOutlineId[1])) * EgtSV( nOutlineId) > s_dAngledCos or EgtGetName( nOutlineId) == EgtGetName( abs( vPrevOutlineId[1]))) then
|
||||
nStartJointType = WIN_JNT.ANGLED
|
||||
end
|
||||
if nEndJointType ~= WIN_JNT.ANGLED and ( EgtEV( nOutlineId) * EgtSV( abs( vNextOutlineId[1])) > 0.987 or EgtGetName( nOutlineId) == EgtGetName( abs( vNextOutlineId[1]))) then
|
||||
if nEndJointType ~= WIN_JNT.ANGLED and ( EgtEV( nOutlineId) * EgtSV( abs( vNextOutlineId[1])) > s_dAngledCos or EgtGetName( nOutlineId) == EgtGetName( abs( vNextOutlineId[1]))) then
|
||||
nEndJointType = WIN_JNT.ANGLED
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user