- aggiunto spessore alle curve geo
- spostati solidi di ferramenta e accessori in layer ausiliario.
This commit is contained in:
@@ -173,6 +173,7 @@ WIN_REF_BOTTOMRAIL_PART = 'BottomRailPartRef'
|
||||
WIN_AREA_NAME = 'AreaName'
|
||||
WIN_SASH_OPENING = 'Opening'
|
||||
WIN_OPENING_TYPE = 'OpeningType'
|
||||
WIN_AUX = 'Aux'
|
||||
|
||||
WIN_SASH_TOP = 'Sash_Top'
|
||||
WIN_SASH_BOTTOM = 'Sash_Bottom'
|
||||
|
||||
@@ -1332,13 +1332,19 @@ local function CreateFrameGeo( nOutlineId, vPrevOutlineId, vNextOutlineId, nStar
|
||||
EgtRelocateGlob( nNextCurveId, nCurrOffsetId, GDB_IN.BEFORE)
|
||||
end
|
||||
|
||||
local vIds = EgtGetAllInGroup( nGeoLayerId)
|
||||
|
||||
-- trim delle curve
|
||||
TrimAndOrientOrderedCurves( EgtGetAllInGroup( nGeoLayerId), false)
|
||||
TrimAndOrientOrderedCurves( vIds, false)
|
||||
|
||||
-- assegno spessore
|
||||
local dGeoH = b3CurrProfileFrame:getDimY()
|
||||
EgtModifyCurveThickness( vIds, - dGeoH)
|
||||
|
||||
-- salvo spessore serramento nel gruppo
|
||||
local dGeoWidth = b3CurrProfileFrame:getDimX()
|
||||
EgtSetInfo( nGeoLayerId, WIN_GEOWIDTH, dGeoWidth)
|
||||
EgtSetInfo( nGeoLayerId, WIN_GEOHEIGHT, b3CurrProfileFrame:getDimY())
|
||||
EgtSetInfo( nGeoLayerId, WIN_GEOHEIGHT, dGeoH)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -1749,6 +1755,7 @@ local function CalcMixedFrameProfilingProcessings( nPartId, nProcLayerId, nGeoLa
|
||||
for i = 1, #vGeoCrvs do
|
||||
-- copio curva
|
||||
local nCrv = EgtCopyGlob( vGeoCrvs[i], nProcLayerId)
|
||||
EgtModifyCurveThickness( nCrv, 0)
|
||||
-- recupero il semiprofilo associato
|
||||
local nSemiProfile = EgtGetInfo( nCrv, WIN_SEMI_PROFILE, 'i')
|
||||
GetProcessingInfoFromSemiProfile( nCrv, nSemiProfile)
|
||||
@@ -1806,6 +1813,7 @@ local function CalcMixedSplitProfilingProcessings( nSplitId, nProcLayerId, nGeoL
|
||||
for i = 1, #vGeoCrvs do
|
||||
-- copio la curva
|
||||
local nCrvId = EgtCopyGlob( vGeoCrvs[i], nProcLayerId)
|
||||
EgtModifyCurveThickness( nCrvId, 0)
|
||||
-- recupero il semiprofilo associato ( per left e right è stato salvato il profilo di tipo sash)
|
||||
local nSemiProfileId = EgtGetInfo( nCrvId, WIN_SEMI_PROFILE, 'i')
|
||||
-- setto le info dal semiprofilo
|
||||
@@ -1884,6 +1892,7 @@ local function CalcProfilingProcessings( nPartId, nOutlineId)
|
||||
for i = 1, #vGeoCrvs do
|
||||
-- copio curva
|
||||
local nCrvId = EgtCopyGlob( vGeoCrvs[i], nProcLayerId)
|
||||
EgtModifyCurveThickness( nCrvId, 0)
|
||||
-- recupero il semiprofilo associato
|
||||
local nSemiProfileId = EgtGetInfo( nCrvId, WIN_SEMI_PROFILE, 'i')
|
||||
-- setto le info dal semiprofilo
|
||||
@@ -4010,7 +4019,7 @@ end
|
||||
---------------------------------- FERRAMENTA ----------------------------------
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che disegna le cerniere
|
||||
local function DrawHinges( nOutlineId)
|
||||
local function DrawHinges( nOutlineId, nSolidLayerId)
|
||||
|
||||
-- dimensioni cerniere
|
||||
local dDimH = 16
|
||||
@@ -4027,7 +4036,6 @@ local function DrawHinges( nOutlineId)
|
||||
end
|
||||
local nSouOutlineId = EgtGetInfo( nSouId, WIN_COPY, 'i')
|
||||
local nPartId = EgtGetInfo( nSouOutlineId, WIN_REF_PART, 'i')
|
||||
local nSolidLayerId = EgtGetFirstNameInGroup( nPartId, WIN_SOLID)
|
||||
|
||||
local nBaseOutlineId = EgtGetInfo( nOutlineId, WIN_COPY, 'i')
|
||||
local dDelta = ( EgtSP( nOutlineId) - EgtSP( nBaseOutlineId)) * Z_AX()
|
||||
@@ -4059,7 +4067,7 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- funzione che disegna la maniglia
|
||||
local function DrawHandle( nPartId, nOutlineId, sHandleSide, dHandleH)
|
||||
local function DrawHandle( nPartId, nOutlineId, sHandleSide, dHandleH, nSolidLayerId)
|
||||
|
||||
-- dati della maniglia
|
||||
local dRad1 = 40
|
||||
@@ -4087,8 +4095,7 @@ local function DrawHandle( nPartId, nOutlineId, sHandleSide, dHandleH)
|
||||
|
||||
-- punto su cui centrare la maniglia
|
||||
local ptC = ptRef + ( dHandleH + dGapHardware) * vtRef + dDeltaIn * vtDirIn
|
||||
|
||||
local nSolidLayerId = EgtGetFirstNameInGroup( nPartId, WIN_SOLID)
|
||||
|
||||
local nCrv1 = EgtRectangle2P( nSolidLayerId, ptC - dRad1 * Y_AX() - dRad2 * X_AX(), ptC + dRad1 * Y_AX() + dRad2 * X_AX())
|
||||
local nStm1 = EgtSurfTmByRegionExtrusion( nSolidLayerId, {nCrv1}, dH * Z_AX())
|
||||
|
||||
@@ -4109,7 +4116,7 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- funzione che disegna la ferramenta
|
||||
local function DrawSashHardware( nAreaId, nRefAreaId)
|
||||
local function DrawSashHardware( nAreaId, nRefAreaId, nSolidLayerId)
|
||||
|
||||
-- recupero pezzi interessati dalla ferramenta
|
||||
local nOutlineLayId = EgtGetFirstNameInGroup( nAreaId, WIN_OUTLINE)
|
||||
@@ -4125,9 +4132,9 @@ local function DrawSashHardware( nAreaId, nRefAreaId)
|
||||
local nBaseOutlineId = EgtGetInfo( nLeftId, WIN_COPY, 'i')
|
||||
local bLeftInactive = EgtGetInfo( nBaseOutlineId, WIN_CRV_ON_FRENCH_SPLIT, 'b') or false
|
||||
if bLeftInactive then
|
||||
DrawHinges( nRightId)
|
||||
DrawHinges( nRightId, nSolidLayerId)
|
||||
else
|
||||
DrawHinges( nLeftId)
|
||||
DrawHinges( nLeftId, nSolidLayerId)
|
||||
end
|
||||
|
||||
-- se anta battente o singola ha maniglia e cerniere
|
||||
@@ -4146,12 +4153,12 @@ local function DrawSashHardware( nAreaId, nRefAreaId)
|
||||
|
||||
if sHandleSide == 'Sx' then
|
||||
-- maniglia su right e cerniere su left
|
||||
DrawHandle( nRightPartId, nRightId, sHandleSide, dHandleH)
|
||||
DrawHinges( nLeftId)
|
||||
DrawHandle( nRightPartId, nRightId, sHandleSide, dHandleH, nSolidLayerId)
|
||||
DrawHinges( nLeftId, nSolidLayerId)
|
||||
else
|
||||
-- maniglia su left e cerniere su right
|
||||
DrawHandle( nLeftPartId, nLeftId, sHandleSide, dHandleH)
|
||||
DrawHinges( nRightId)
|
||||
DrawHandle( nLeftPartId, nLeftId, sHandleSide, dHandleH, nSolidLayerId)
|
||||
DrawHinges( nRightId, nSolidLayerId)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -4570,8 +4577,14 @@ function WinCalculate.AddHardwareForSash( nFrameId, bOnlyRequest)
|
||||
|
||||
-- disegno la ferramenta
|
||||
if s_bCalcSolid then
|
||||
-- recupero o creo il gruppo per disegno ferramenta
|
||||
local nAuxLayerId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AUX)
|
||||
if not nAuxLayerId then
|
||||
nAuxLayerId = EgtGroup( GDB_ID.ROOT)
|
||||
EgtSetName( nAuxLayerId, WIN_AUX)
|
||||
end
|
||||
for i = 1, #SashList do
|
||||
DrawSashHardware( SashList[i].nAreaId, nFrameId)
|
||||
DrawSashHardware( SashList[i].nAreaId, nFrameId, nAuxLayerId)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -4617,7 +4630,6 @@ local function CalcWaterdrip( nPartId, nOutlineId, nAreaId, bDraw)
|
||||
|
||||
-- gruppi per i conti
|
||||
local nGrp = EgtGroup( nPartId)
|
||||
local nSolidLayId = EgtGetFirstNameInGroup( nPartId, WIN_SOLID)
|
||||
|
||||
-- recupero punto di incontro con pezzo precedente
|
||||
local nPrevId = EgtGetInfo( nOutlineId, WIN_PREV_OUTLINES, 'i')
|
||||
@@ -4686,6 +4698,16 @@ local function CalcWaterdrip( nPartId, nOutlineId, nAreaId, bDraw)
|
||||
-- riordino i parametri ( non dovrebbero mai capitare parametri coincidenti)
|
||||
table.sort( vParams)
|
||||
|
||||
-- recupero il gruppo per il disegno dei solidi
|
||||
local nSolidLayId
|
||||
if bDraw and s_bCalcSolid then
|
||||
nSolidLayId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AUX)
|
||||
if not nSolidLayId then
|
||||
nSolidLayId = EgtGroup( GDB_ID.ROOT)
|
||||
EgtSetName( nSolidLayId, WIN_AUX)
|
||||
end
|
||||
end
|
||||
|
||||
local dLenTot = 0
|
||||
for i = 1, #vParams, 2 do
|
||||
-- creo la guida di estrusione per il gocciolatoio
|
||||
@@ -4796,10 +4818,16 @@ local function CalcGaskets( nAreaId, bDraw)
|
||||
|
||||
-- disegno
|
||||
if bDraw and s_bCalcSolid then
|
||||
-- recupero il gruppo per il disegno dei solidi
|
||||
local nSolidLayerId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AUX)
|
||||
if not nSolidLayerId then
|
||||
nSolidLayerId = EgtGroup( GDB_ID.ROOT)
|
||||
EgtSetName( nSolidLayerId, WIN_AUX)
|
||||
end
|
||||
|
||||
for i = 1, #vCrvs do
|
||||
if tParts[i].sGasket then
|
||||
-- estrusione principale della giunzione
|
||||
local nSolidLayerId = EgtGetFirstNameInGroup( tParts[i].nId, WIN_SOLID)
|
||||
local nGasketStm = CreateProfileSurf( vOutlines[i], tParts[i].nProfileId, tParts[i].sGasket, 100, nSolidLayerId)
|
||||
EgtSetColor( nGasketStm, Color3d( 128, 128, 128))
|
||||
EgtSetName( nGasketStm, sGasket)
|
||||
|
||||
Reference in New Issue
Block a user