diff --git a/.vscode/settings.json b/.vscode/settings.json index c453f18..a4b88aa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -104,7 +104,11 @@ "EgtPause", "EgtRelocate", "WDG", - "EgtSplitString" + "EgtSplitString", + "EgtFrame", + "EgtReplaceString", + "EgtCircle", + "EgtArc2PV" ], "Lua.diagnostics.disable": [ "empty-block" diff --git a/Profiles/Main.lua b/Profiles/Main.lua index 49af335..545bfba 100644 --- a/Profiles/Main.lua +++ b/Profiles/Main.lua @@ -649,7 +649,7 @@ local nFillId = WinCreate.AddFill( nSashId, WIN_FILLTYPES.GLASS) -- WinLib.CreatePartFromOutline( nFrameLayerId, nCurrOutlineId) -- aggiungo ferramenta -WinCreate.AddHardware( nFrameId, '000544') +WinCreate.AddHardware( nFrameId, '000545') -- imposto se calcolare i solidi o meno WinCalculate.SetCalcSolid( true) diff --git a/Profiles/Profilo78 - Offset.nge b/Profiles/Profilo78 - Offset.nge index 3f71d8f..46c2b8d 100644 Binary files a/Profiles/Profilo78 - Offset.nge and b/Profiles/Profilo78 - Offset.nge differ diff --git a/Profiles/WinConst.lua b/Profiles/WinConst.lua index 10d32fb..6a76ddd 100644 --- a/Profiles/WinConst.lua +++ b/Profiles/WinConst.lua @@ -195,6 +195,10 @@ WIN_OVERLAP = 'Overlap' WIN_DELTA = 'Delta' WIN_FILLOVERLAP = 'FillOverlap' WIN_FILLDELTA = 'FillDelta' +WIN_GAPDELTA = 'GapDelta' +WIN_GAPDELTAZ = 'GapDeltaZ' +WIN_GAPDELTAIN = 'GapDeltaIn' +WIN_GAPDELTAOUT = 'GapDeltaOut' WIN_MAINGUIDE = 'MainGuide' WIN_STARTGUIDE = 'StartGuide' @@ -234,6 +238,8 @@ WIN_DWL_BOTTOMHORIZONTALSPLITPARAEND = 'BottomHorizontalSplitParaEnd' WIN_DWL_HORIZONTALSPLITPERPSTART = 'HorizontalSplitPerpStart' WIN_DWL_HORIZONTALSPLITPERPEND = 'HorizontalSplitPerpEnd' +WIN_HARDWARE = 'Hardware' WIN_HDW_FAVOURITE = 'HdwFavourite' +WIN_HDW_FRAME = 'HdwFrame' --------------------------------------------------------------------- return WinConst diff --git a/Profiles/WinLib/WinCalculate.lua b/Profiles/WinLib/WinCalculate.lua index a3470bf..0196c9d 100644 --- a/Profiles/WinLib/WinCalculate.lua +++ b/Profiles/WinLib/WinCalculate.lua @@ -2025,11 +2025,130 @@ end local function SearchSash( nAreaId, SashList) -- verifico il tipo local nAreaType = EgtGetInfo( nAreaId, WIN_AREATYPE, 'i') + --if nAreaType == WIN_AREATYPES.FRAME then if nAreaType == WIN_AREATYPES.SASH then -- calcolo il Box local nOutlineLayerId = EgtGetFirstNameInGroup( nAreaId, WIN_OUTLINE) local b3Outline = EgtGetBBox( nOutlineLayerId, GDB_BB.STANDARD) - table.insert( SashList, { nAreaId = nAreaId, ptCener = b3Outline:getCenter()}) + -- recupero punti di origine + local nSashFrameLayerId = EgtGroup( nAreaId) + EgtSetName( nSashFrameLayerId, WIN_HDW_FRAME) + local vOutlineCopy = {} + local nOutlineOffsetLayerId = EgtGroup( nAreaId) + local nOutlineId = EgtGetFirstInGroup( nOutlineLayerId) + while nOutlineId do + local sProfileType = EgtGetInfo( nOutlineId, WIN_PROFILETYPE) + local nProfileId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_PROFILE, 'i') + local nSashProfileId = EgtGetFirstNameInGroup( nProfileId, WIN_SASH, 'i') + local nSashProfileTypeId = EgtGetFirstNameInGroup( nSashProfileId, sProfileType, 'i') + local dGapDelta = EgtGetInfo( nSashProfileTypeId, WIN_GAPDELTA, 'd') + local dGapDeltaZ = EgtGetInfo( nSashProfileTypeId, WIN_GAPDELTAZ, 'd') + local nOutlineCopyId = EgtCopy( nOutlineId, nOutlineOffsetLayerId) + EgtSetInfo( nOutlineCopyId, 'ORIG', nOutlineId) + EgtSetInfo( nOutlineCopyId, WIN_GAPDELTAZ, dGapDeltaZ) + local nSectionFrameId = EgtGetFirstNameInGroup( nSashProfileTypeId, WIN_SECTIONFRAME) + local frSectionFrame = EgtFR( nSectionFrameId) + local nSashProfileRefId = EgtGetFirstNameInGroup( nSashProfileTypeId, WIN_REF) + local b3SashProfileType = EgtGetBBoxRef( nSashProfileRefId, GDB_BB.STANDARD, frSectionFrame) + EgtSetInfo( nOutlineCopyId, WIN_GAPDELTAZ .. 2, b3SashProfileType:getDimY()) + EgtOffsetCurve( nOutlineCopyId, - dGapDelta) + table.insert( vOutlineCopy, nOutlineCopyId) + nOutlineId = EgtGetNext( nOutlineId) + end + local tSash = { nAreaId = nAreaId, ptCenter = b3Outline:getCenter()} + local tFrame = {} + local nA_FA1Id = GDB_ID.NULL + local nB_FA1Id = GDB_ID.NULL + local nC_FA1Id = GDB_ID.NULL + local nD_FA1Id = GDB_ID.NULL + for nIndex = 1, #vOutlineCopy do + local nNext = EgtIf( nIndex < #vOutlineCopy, nIndex + 1, 1) + local ptOrig = EgtIP( vOutlineCopy[nIndex], vOutlineCopy[nNext], ORIG()) + local dParam = EgtCurveParamAtPoint( vOutlineCopy[nIndex], ptOrig) + EgtTrimCurveEndAtParam( vOutlineCopy[nIndex], dParam) + dParam = EgtCurveParamAtPoint( vOutlineCopy[nNext], ptOrig) + EgtTrimCurveStartAtParam( vOutlineCopy[nNext], dParam) + local sOrigName = string.char(string.byte('A') + #vOutlineCopy - nIndex) + tSash[sOrigName] = ptOrig + local vtDir = EgtEV( vOutlineCopy[nIndex]) + local nFA1Id = EgtFrame( nSashFrameLayerId, Frame3d( ptOrig, - vtDir, vtDir ^ Z_AX() , Z_AX())) + EgtSetName( nFA1Id, sOrigName .. '.FA1') + local vtIn = Vector3d( vtDir) + vtIn:rotate( Z_AX(), -90) + local dGapDeltaZ = EgtGetInfo( vOutlineCopy[nIndex], WIN_GAPDELTAZ, 'd') + local nFA2Id = EgtFrame( nSashFrameLayerId, Frame3d( ptOrig - dGapDeltaZ * Z_AX(), - vtDir, vtDir ^ vtIn , vtIn)) + EgtSetName( nFA2Id, sOrigName .. '.FA2') + local dGapDeltaZ2 = EgtGetInfo( vOutlineCopy[nIndex], WIN_GAPDELTAZ .. 2, 'd') + local nFA3Id = EgtFrame( nSashFrameLayerId, Frame3d( ptOrig - dGapDeltaZ2 * Z_AX(), - vtDir, vtDir ^ -Z_AX() , -Z_AX())) + EgtSetName( nFA3Id, sOrigName .. '.FA3') + if sOrigName == 'A' then + nA_FA1Id = nFA1Id + elseif sOrigName == 'B' then + nB_FA1Id = nFA1Id + elseif sOrigName == 'C' then + nC_FA1Id = nFA1Id + elseif sOrigName == 'D' then + nD_FA1Id = nFA1Id + end + -- ricavo posizione sul telaio + local nOrigOutlineId = EgtGetInfo( vOutlineCopy[nIndex], 'ORIG', 'i') + local nBaseOutlineId = EgtGetInfo( nOrigOutlineId, WIN_COPY, 'i') + local nSouId = EgtGetInfo( nBaseOutlineId, WIN_SOU, 'i') + local nSouAreaId = EgtGetParent( EgtGetParent( nSouId)) + local nSouAreaType = EgtGetInfo( nSouAreaId, WIN_AREATYPE, 'i') + while nSouAreaType ~= WIN_AREATYPES.FRAME do + nSouId = EgtGetInfo( nSouId, WIN_SOU, 'i') + nSouAreaId = EgtGetParent( EgtGetParent( nSouId)) + nSouAreaType = EgtGetInfo( nSouAreaId, WIN_AREATYPE, 'i') + end + if EgtGetName( nSouId) ~= WIN_SPLIT then + local nFrameFrameLayerId = EgtGetFirstNameInGroup( nSouAreaId, WIN_HDW_FRAME) + if not nFrameFrameLayerId then + nFrameFrameLayerId = EgtGroup( nSouAreaId) + EgtSetName( nFrameFrameLayerId, WIN_HDW_FRAME) + end + -- ricavo aria lato telaio + local sProfileType = EgtGetInfo( nSouId, WIN_PROFILETYPE) + local nProfileId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_PROFILE, 'i') + local nFrameProfileId = EgtGetFirstNameInGroup( nProfileId, WIN_FRAME, 'i') + local nFrameProfileTypeId = EgtGetFirstNameInGroup( nFrameProfileId, sProfileType, 'i') + local dGapDeltaOut = EgtGetInfo( nFrameProfileTypeId, WIN_GAPDELTAOUT, 'd') + local dFrameGapDeltaZ = EgtGetInfo( nFrameProfileTypeId, WIN_GAPDELTAZ, 'd') + local nOutlineOutId = EgtCopy( nSouId, nOutlineOffsetLayerId) + EgtSetName( nOutlineOutId, 'Frame') + EgtOffsetCurve( nOutlineOutId, - dGapDeltaOut) + -- prendo la proiezione + _, ptOrig = EgtPointCurveDist( ptOrig, nOutlineOutId) + -- recupero DeltaZ2 + local nSectionFrameId = EgtGetFirstNameInGroup( nFrameProfileTypeId, WIN_SECTIONFRAME) + local frSectionFrame = EgtFR( nSectionFrameId) + local nFrameProfileRefId = EgtGetFirstNameInGroup( nFrameProfileTypeId, WIN_REF) + local b3SashProfileType = EgtGetBBoxRef( nFrameProfileRefId, GDB_BB.STANDARD, frSectionFrame) + local nFT1Id = EgtFrame( nFrameFrameLayerId, Frame3d( ptOrig - dFrameGapDeltaZ * Z_AX(), - vtDir, vtDir ^ Z_AX() , Z_AX())) + EgtSetName( nFT1Id, sOrigName .. '.FT1') + table.insert( tFrame, nFT1Id) + local vtFrameIn = Vector3d( vtDir) + vtFrameIn:rotate( Z_AX(), 90) + local nFT2Id = EgtFrame( nFrameFrameLayerId, Frame3d( ptOrig - dFrameGapDeltaZ * Z_AX(), - vtDir, vtDir ^ vtFrameIn , vtFrameIn)) + EgtSetName( nFT2Id, sOrigName .. '.FT2') + table.insert( tFrame, nFT2Id) + local dGapDeltaZ2 = b3SashProfileType:getDimY() + local nFT3Id = EgtFrame( nFrameFrameLayerId, Frame3d( ptOrig - dGapDeltaZ2 * Z_AX(), - vtDir, vtDir ^ -Z_AX() , -Z_AX())) + EgtSetName( nFT3Id, sOrigName .. '.FT3') + table.insert( tFrame, nFT3Id) + end + end + tSash.Frame = tFrame + tSash.LHeight = ( EgtSP( nB_FA1Id) - EgtSP( nA_FA1Id)):getY() + tSash.RHeight = ( EgtSP( nC_FA1Id) - EgtSP( nD_FA1Id)):getY() + tSash.TWidth = ( EgtSP( nC_FA1Id) - EgtSP( nB_FA1Id)):getX() + tSash.BWidth = ( EgtSP( nD_FA1Id) - EgtSP( nA_FA1Id)):getX() + if EgtGetType( vOutlineCopy[3]) == GDB_TY.CRV_ARC then + tSash.BCLength = EgtCurveLength( vOutlineCopy[3]) + tSash.BCArrow = EgtMP( vOutlineCopy[3]) - (( EgtEP( vOutlineCopy[3]) - EgtSP( vOutlineCopy[3])) / 2) + end + EgtErase( nOutlineOffsetLayerId) + table.insert( SashList, tSash) end -- verifico se ci sono sotto-aree local nChildAreaId = EgtGetFirstNameInGroup( nAreaId, WIN_AREA .. '*') @@ -2042,12 +2161,37 @@ end -- funzione che aggiunge l'hardware function WinCalculate.AddHardware( nFrameId) + -- cerco ed indicizzo ante del serramento + local SashList = {} + SearchSash( nFrameId, SashList) + -- ordino per X e Y + local function compareXY(a,b) + if abs( a.ptCenter:getX() - b.ptCenter:getX()) < GEO.EPS_SMALL then + return a.ptCenter:getY() < b.ptCenter:getY() + else + return a.ptCenter:getX() < b.ptCenter:getX() + end + end + table.sort(SashList, compareXY) + + -- correggo nomi Frame del telaio + for nIndex = 1, #SashList do + for nFrameIndex = 1, #SashList[nIndex].Frame do + local nFrameId = SashList[nIndex].Frame[nFrameIndex] + local sName = EgtGetName( nFrameId) + EgtSetName( nFrameId, nIndex .. '.' .. sName) + end + end + + -- recupero preferito della ferramenta local nFavourite = EgtGetInfo( nFrameId, WIN_HDW_FAVOURITE) - local sInputFile = 'a:\\InputBatch\\Input.txt' - local sAGBOutputFile = 'C:\\AGB3000NG\\OutputBatch\\Output.txt' - local sAGBOutputLavFile = 'C:\\AGB3000NG\\OutputBatch\\OutputLav.txt' - local sOutputFile = 'a:\\OutputBatch\\Output.txt' - local sOutputLavFile = 'a:\\OutputBatch\\OutputLav.txt' + -- creo file di richiesta ferramenta + local sNow = os.date( '_%Y_%m_%d_%H_%M_%S', os.time()) + local sInputFile = 'a:\\InputBatch\\Input' .. sNow .. '.txt' + local sAGBOutputFile = 'C:\\AGB3000NG\\OutputBatch\\Output' .. sNow .. '.txt' + local sAGBOutputLavFile = 'C:\\AGB3000NG\\OutputBatch\\OutputLav' .. sNow .. '.txt' + local sOutputFile = 'a:\\OutputBatch\\Output' .. sNow .. '.txt' + local sOutputLavFile = 'a:\\OutputBatch\\OutputLav' .. sNow .. '.txt' -- Apro file Input in scrittura local fhInput = io.open( sInputFile, 'w') if not fhInput then @@ -2057,10 +2201,41 @@ function WinCalculate.AddHardware( nFrameId) local sText = 'OUTPUTKIT=' .. sAGBOutputFile .. '\n' .. 'S_NAME=' .. nFavourite .. '\n' .. - 'RECORDID=15A' .. '\n' .. - 'HBB=' .. tostring( 1500) .. '\n' .. - 'LBB=' .. tostring( 900) .. '\n' .. - 'FINESTRAPORTAFINESTRA=Finestra' .. '\n' .. + 'RECORDID=15A' .. '\n' + + if #SashList >= 1 and SashList[1].LHeight == SashList[1].RHeight then + sText = sText .. 'HBB=' .. tostring( SashList[1].LHeight) .. '\n' + else + for nSashIndex = 1, #SashList do + if nSashIndex == 1 then + sText = sText .. 'HBB_sx=' .. tostring( SashList[nSashIndex].LHeight) .. '\n' + else + sText = sText .. 'HBB_' .. tostring(nSashIndex - 1) .. 'B=' .. tostring( SashList[nSashIndex].LHeight) .. '\n' + end + if nSashIndex == #SashList then + sText = sText .. 'HBB_dx=' .. tostring( SashList[nSashIndex].RHeight) .. '\n' + else + sText = sText .. 'HBB_' .. tostring(nSashIndex) .. '=' .. tostring( SashList[nSashIndex].RHeight) .. '\n' + end + end + end + + if #SashList == 1 then + sText = sText .. 'LBB=' .. tostring( SashList[1].BWidth) .. '\n' + else + for nSashIndex = 1, #SashList do + sText = sText .. 'LBB' .. nSashIndex .. '=' .. tostring( SashList[nSashIndex].BWidth) .. '\n' + if SashList[nSashIndex].BCLength then + sText = sText .. 'LBBA' .. nSashIndex .. '=' .. tostring( SashList[nSashIndex].BCLength) .. '\n' + end + if SashList[nSashIndex].BCArrow then + sText = sText .. 'FRECCIA_' .. nSashIndex .. '=' .. tostring( SashList[nSashIndex].BCArrow) .. '\n' + end + end + + end + + sText = sText .. 'FINESTRAPORTAFINESTRA=Finestra' .. '\n' .. 'Q=1' .. '\n' .. 'MANOSERRAMENTO=Dx' .. '\n' .. 'CNCOUTPUT=' .. sAGBOutputLavFile .. '\n' .. @@ -2081,20 +2256,7 @@ function WinCalculate.AddHardware( nFrameId) EgtPause( 500) - -- cerco ed indicizzo ante del serramento - local SashList = {} - SearchSash( nFrameId, SashList) - -- ordino per X e Y - local function compareXY(a,b) - if abs( a.X - b.X) < GEO.EPS_SMALL then - return a.Y < b.Y - else - return a.X < b.X - end - end - table.sort(SashList, compareXY) - - -- Apro file Output in scrittura + -- Apro file Output in lettura local fhOutput = io.open( sOutputLavFile, 'r') if not fhOutput then EgtOutLog( 'Error opening file ' .. sOutputLavFile) @@ -2118,8 +2280,10 @@ function WinCalculate.AddHardware( nFrameId) local vOutlineIds = EgtGetAllInGroup( nOutlineLayerId) local nA = string.byte('A') local nSashPart = string.byte(sSashPart) - local nOutlineId = vOutlineIds[#vOutlineIds - (nSashPart - nA)] + local nOutlineIndex = #vOutlineIds - (nSashPart - nA) + local nOutlineId = vOutlineIds[nOutlineIndex] local nPartId = GDB_ID.NULL + local frHdwFrame if sPart == 'TELAIO' then local nSashBaseOutlineId = EgtGetInfo( nOutlineId, WIN_COPY, 'i') local nSouId = EgtGetInfo( nSashBaseOutlineId, WIN_SOU, 'i') @@ -2132,13 +2296,98 @@ function WinCalculate.AddHardware( nFrameId) end local nFrameOutlineId = EgtGetInfo( nSouId, WIN_COPY, 'i') nPartId = EgtGetInfo( nFrameOutlineId, WIN_REF_PART, 'i') + local nHdwFrameLayerId = EgtGetFirstNameInGroup( nSouAreaId, WIN_HDW_FRAME) + local nHdwFrameId = EgtGetFirstNameInGroup( nHdwFrameLayerId, nSashIndex .. '.' .. sSashPart .. '.' .. sSide) + frHdwFrame = EgtFR( nHdwFrameId) elseif sPart == 'ANTA' then nPartId = EgtGetInfo( nOutlineId, WIN_REF_PART, 'i') + local nHdwFrameLayerId = EgtGetFirstNameInGroup( nSashId, WIN_HDW_FRAME) + local nHdwFrameId = EgtGetFirstNameInGroup( nHdwFrameLayerId, sSashPart .. '.' .. sSide) + frHdwFrame = EgtFR( nHdwFrameId) end - - - + local vMacro = EgtSplitString( sMacro, '_') + local nPartHdwLayerId = EgtGetFirstNameInGroup( nPartId, WIN_HARDWARE) + if not nPartHdwLayerId then + nPartHdwLayerId = EgtGroup( nPartId) + EgtSetName( nPartHdwLayerId, WIN_HARDWARE) + end + local nSolidLayerId = EgtGetFirstNameInGroup( nPartId, WIN_SOLID) + local nMainExtrusionId = EgtGetFirstNameInGroup( nSolidLayerId, WIN_SRF_MAIN) + local nExtrCopyId = EgtCopy( nMainExtrusionId, nSolidLayerId) + if vMacro[1] == 'FRESATA' then + elseif vMacro[1] == 'ASOLA' then + local ptCenter = Point3d( dPosX, dPosY, dPosZ) + local dLength = tonumber(vMacro[2]) + local dWidth = tonumber(vMacro[3]) + local dHeight = tonumber(vMacro[4]) + local nRSideId = EgtLine( nPartHdwLayerId, ptCenter - dLength / 2 * X_AX() - 0.1 * Y_AX(), ptCenter + dLength / 2 * X_AX() - 0.1 * Y_AX()) + local nTSideId = EgtLine( nPartHdwLayerId, EgtEP( nRSideId), EgtEP( nRSideId) + 0.1 * Y_AX()) + local vtEnd = EgtEV( nRSideId) + vtEnd:rotate( Z_AX(), 90) + local nTChamferId = EgtArc2PV( nPartHdwLayerId, EgtEP( nTSideId), EgtEP( nTSideId) - dWidth * X_AX() + dWidth * Y_AX() , vtEnd) + local nLSideId = EgtLine( nPartHdwLayerId, EgtEP( nTChamferId), EgtEP( nTChamferId) - ( dLength - 2 * dWidth) * X_AX()) + vtEnd = EgtEV( nLSideId) + local nBChamferId = EgtArc2PV( nPartHdwLayerId, EgtEP( nLSideId), EgtEP( nLSideId) - dWidth * X_AX() - dWidth * Y_AX(), vtEnd) + local nBSideId = EgtLine( nPartHdwLayerId, EgtEP( nBChamferId), EgtSP( nRSideId)) + -- per lavorazione + local nMachPocketId = EgtCurveCompo( nPartHdwLayerId, { nTChamferId, nLSideId, nBChamferId}, false) + EgtModifyCurveExtrusion( nMachPocketId, Z_AX()) + EgtModifyCurveThickness( nMachPocketId, -dHeight) + EgtTransform( nMachPocketId, frHdwFrame) + -- per solido + local nSolidPocketOutlineId = EgtCurveCompo( nPartHdwLayerId, { nRSideId, nTSideId, nTChamferId, nLSideId, nBChamferId, nBSideId}) + EgtMove( nSolidPocketOutlineId, 0.01 * Z_AX()) + local nSolidPocketId = EgtSurfTmByRegionExtrusion( nPartHdwLayerId, nSolidPocketOutlineId, -( dHeight + 0.01) * Z_AX()) + EgtErase( nSolidPocketOutlineId) + EgtInvertSurf( nSolidPocketId) + EgtTransform( nSolidPocketId, frHdwFrame) + EgtSurfTmCut( nMainExtrusionId, nSolidPocketId, true, false) + EgtSurfTmCut( nSolidPocketId, nExtrCopyId, true, false) + elseif vMacro[1] == 'TASCA' then + elseif vMacro[1] == 'VITE' then + local dRadius = 1.5 + local dDepth = 2 + if vMacro[2] == 'CANALINO' then + dRadius = 2 + dDepth = 3 + elseif vMacro[2] == 'ANTA' then + dRadius = 2.5 + dDepth = 4 + end + local ptCenter = Point3d( dPosX, dPosY, dPosZ) + --ptCenter:toGlob(frHdwFrame) + local nHoleId = EgtCircle( nPartHdwLayerId, ptCenter, dRadius) + EgtModifyCurveExtrusion( nHoleId, Z_AX()) + EgtModifyCurveThickness( nHoleId, -dDepth) + EgtTransform( nHoleId, frHdwFrame) + elseif vMacro[1] == 'FORO' then + local ptCenter = Point3d( dPosX, dPosY, dPosZ) + local sDiameter = EgtReplaceString( vMacro[2], 'D', '') + local dRadius = tonumber(sDiameter) / 2 + local nHoleId = EgtCircle( nPartHdwLayerId, ptCenter, dRadius) + -- per lavorazione + EgtModifyCurveExtrusion( nHoleId, Z_AX()) + local dDepth = 25.0 + if #vMacro == 3 then + dDepth = tonumber( vMacro[3]) + end + EgtModifyCurveThickness( nHoleId, -dDepth) + EgtTransform( nHoleId, frHdwFrame) + -- per solido + local nSolidHoleOutlineId = EgtCircle( nPartHdwLayerId, ptCenter + 0.01 * Z_AX(), dRadius) + local nSolidHoleId = EgtSurfTmByRegionExtrusion( nPartHdwLayerId, nSolidHoleOutlineId, -( dDepth + 0.01) * Z_AX()) + EgtErase( nSolidHoleOutlineId) + EgtInvertSurf( nSolidHoleId) + EgtTransform( nSolidHoleId, frHdwFrame) + --EgtSurfTmCut( nMainExtrusionId, nSolidHoleId, true, false) + --EgtSurfTmCut( nSolidHoleId, nExtrCopyId, true, false) + end + EgtErase( nExtrCopyId) end + + -- Chiudo file Output in scrittura + fhOutput:close() + end ---------------------------------------------------------------------