Compare commits
5 Commits
main
...
feature/BigParts
| Author | SHA1 | Date | |
|---|---|---|---|
| 07ea8c7ef3 | |||
| f4baf8a43b | |||
| c8d4a28d22 | |||
| 173465984a | |||
| 04c7b07d0e |
+334
@@ -0,0 +1,334 @@
|
||||
# ---> VisualStudio
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
build/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
32/
|
||||
64/
|
||||
OrigClientServer/
|
||||
UpdateClientServer/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
*.bat
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
orleans.codegen.cs
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# ---> C Sharp
|
||||
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# mstest test results
|
||||
TestResults
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*
|
||||
|
||||
# NCrunch
|
||||
*.ncrunch*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
|
||||
# NuGet Packages Directory
|
||||
packages
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
[Bb]in
|
||||
[Oo]bj
|
||||
sql
|
||||
TestResults
|
||||
[Tt]est[Rr]esult*
|
||||
*.Cache
|
||||
ClientBin
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*.dbmdl
|
||||
Generated_Code #added for RIA/Silverlight projects
|
||||
|
||||
# Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
|
||||
Vendored
+159
@@ -0,0 +1,159 @@
|
||||
{
|
||||
"Lua.diagnostics.globals": [
|
||||
"EgtProtectGlobal",
|
||||
"EgtOutLog",
|
||||
"GDB_ID",
|
||||
"EgtGetFirstNameInGroup",
|
||||
"EgtImportDxf",
|
||||
"EgtGetLastInGroup",
|
||||
"EgtGetNextPart",
|
||||
"EgtGetLastPart",
|
||||
"EgtSetInfo",
|
||||
"EgtSetName",
|
||||
"EgtGetFirstLayer",
|
||||
"EgtGetName",
|
||||
"EgtGetFirstInGroup",
|
||||
"EgtGetType",
|
||||
"GDB_TY",
|
||||
"EgtCurveThickness",
|
||||
"EgtModifyCurveThickness",
|
||||
"EgtCurveIsClosed",
|
||||
"EgtTrimCurveStartAtLen",
|
||||
"EgtSP",
|
||||
"EgtEP",
|
||||
"EgtTrimCurveEndAtLen",
|
||||
"EgtCloseCurveCompo",
|
||||
"EgtCurveAreaXY",
|
||||
"abs",
|
||||
"EgtGetNext",
|
||||
"EgtInvertCurve",
|
||||
"EgtGetBBox",
|
||||
"GDB_BB",
|
||||
"EgtGroup",
|
||||
"EgtTextAdv",
|
||||
"Point3d",
|
||||
"GDB_TI",
|
||||
"EgtSetColor",
|
||||
"BBox3d",
|
||||
"EgtRotate",
|
||||
"ORIG",
|
||||
"Z_AX",
|
||||
"EgtCopy",
|
||||
"EgtSurfFlatRegion",
|
||||
"Color3d",
|
||||
"EgtSetStatus",
|
||||
"GDB_ST",
|
||||
"EgtMdbSetCurrMachining",
|
||||
"EgtMdbGetCurrMachiningParam",
|
||||
"EgtTdbSetCurrTool",
|
||||
"EgtTdbGetCurrToolParam",
|
||||
"MCH_MP",
|
||||
"EgtOffsetCurveAdv",
|
||||
"EgtRelocateGlob",
|
||||
"MCH_TP",
|
||||
"EgtCurveWithRegionClassify",
|
||||
"GDB_CRC",
|
||||
"EgtErase",
|
||||
"EgtGetBBoxGlob",
|
||||
"EgtInvertSurf",
|
||||
"EgtGetInfo",
|
||||
"EgtAutoNestAddPart",
|
||||
"EgtAutoNestAddHoleToPart",
|
||||
"EgtAutoNestAddToolOutlineToPart",
|
||||
"EgtSetCurrMachine",
|
||||
"V_NULL",
|
||||
"EgtAutoNestGetOneResult",
|
||||
"EgtSetCurrMachGroup",
|
||||
"EgtGetFirstRawPart",
|
||||
"EgtGetParent",
|
||||
"EgtGetMachGroupNewName",
|
||||
"EgtAddMachGroup",
|
||||
"EgtGetCurrMachGroup",
|
||||
"EgtGetMachGroupId",
|
||||
"EgtMirror",
|
||||
"Y_AX",
|
||||
"GDB_RT",
|
||||
"EgtMove",
|
||||
"Vector3d",
|
||||
"EgtAddPartToRawPart",
|
||||
"EgtZoom",
|
||||
"SCE_ZM",
|
||||
"EgtAutoNestStart",
|
||||
"EgtResetCurrMachGroup",
|
||||
"EgtRectangle2P",
|
||||
"EgtGetFirstPartInRawPart",
|
||||
"EgtGetNextPartInRawPart",
|
||||
"EgtAutoNestAddSheet",
|
||||
"EgtAutoNestAddDefectToSheet",
|
||||
"EgtAutoNestSetInterpartGap",
|
||||
"EgtAutoNestCompute",
|
||||
"EgtAutoNestGetComputationStatus",
|
||||
"EgtAutoNestGetResults",
|
||||
"EgtProcessEvents",
|
||||
"EgtAutoNestCancelComputation",
|
||||
"EgtGetCurrMachineName",
|
||||
"EgtGetMachiningGeometry",
|
||||
"EgtExistsObj",
|
||||
"EgtGetMachiningParam",
|
||||
"EgtSetCurrMachining",
|
||||
"EgtGetMachiningEndPoint",
|
||||
"EgtSpInit",
|
||||
"EgtSpAddPoint",
|
||||
"SHP_OB",
|
||||
"EgtSpSetOpenBound",
|
||||
"EgtSpCalculate",
|
||||
"SHP_TY",
|
||||
"EgtSpTerminate",
|
||||
"GDB_IN",
|
||||
"EgtGetRawPartCenter",
|
||||
"sqrt",
|
||||
"EgtSpSetZzOwStep",
|
||||
"EgtGetCurrPhase",
|
||||
"EgtGetPhaseDisposition",
|
||||
"EgtCreateDirectory",
|
||||
"EgtGetFirstMachGroup",
|
||||
"EgtGetNextMachGroup",
|
||||
"EgtImportSetup",
|
||||
"EgtGetRawPartBBox",
|
||||
"EgtLine",
|
||||
"tointeger",
|
||||
"floor",
|
||||
"EgtAddMachining",
|
||||
"EgtSetMachiningGeometry",
|
||||
"EgtApplyMachining",
|
||||
"EgtSurfFrAdd",
|
||||
"EgtSurfFrSubtract",
|
||||
"EgtExplodeSurf",
|
||||
"EgtTrimCurveWithRegion",
|
||||
"MCH_MILL_WS",
|
||||
"EgtSetMachiningParam",
|
||||
"MCH_MILL_LI",
|
||||
"EgtApplyAllMachinings",
|
||||
"EgtEstimate",
|
||||
"EgtCopyFile",
|
||||
"EgtEraseFile",
|
||||
"EgtSetMachineLook",
|
||||
"MCH_LOOK",
|
||||
"EgtExportSvg",
|
||||
"EgtGetFirstGroupInGroup",
|
||||
"EgtGetNextGroup",
|
||||
"EgtCopyGlob",
|
||||
"EgtGetNextName",
|
||||
"EnclosesXY",
|
||||
"EgtGenerate",
|
||||
"EgtCurveLength",
|
||||
"EgtGetCalcColor",
|
||||
"EgtRemoveOperation",
|
||||
"EgtArcRadius",
|
||||
"GEO",
|
||||
"min",
|
||||
"EgtExplodeCurveCompo",
|
||||
"EgtCurveCompo",
|
||||
"EgtAddCurveCompoCurve",
|
||||
"AreSameColor",
|
||||
"EgtPointCurveDistSide",
|
||||
"X_AX",
|
||||
"max",
|
||||
"EgtSurfFrRectangle"
|
||||
]
|
||||
}
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
--
|
||||
-- EEEEEEEEEE GGGGGG TTTTTTTTTTTTTT
|
||||
-- EEEEEEEEEE GGGGGGGGGG TTTTTTTTTTTTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEE GGGG TTTT
|
||||
-- EEEEEEE GGGG GGGGGGG TTTT
|
||||
-- EEEEEEE GGGG GGGGGGG TTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEEEEEEEE GGGGGGGGGG TTTT
|
||||
-- EEEEEEEEEE GGGGGG TTTT
|
||||
--
|
||||
-- by EgalTech s.r.l.
|
||||
-- File dei parametri di configurazione by EgalTech s.r.l. 2020/08/13
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local Config = {}
|
||||
|
||||
-------------------------- Main -------------------------
|
||||
|
||||
-- path chiamate REST
|
||||
--Config.sRESTPath = "http://iis01/NKC/api/"
|
||||
--Config.sRESTPath = "http://seriate.steamware.net:8082/NKC/api/"
|
||||
Config.sRESTPath = "http://iis01.egalware.com/NKC/api/"
|
||||
Config.sPathMat = Config.sRESTPath .. "Material"
|
||||
Config.sPathBatch = Config.sRESTPath .. "BatchProc"
|
||||
-- Nesting cycle waiting time
|
||||
Config.CycleDelay = 3
|
||||
|
||||
-- Max bunk height
|
||||
Config.MaxBunkThickness = 450
|
||||
|
||||
-- save data path
|
||||
Config.sBasePath = "c:/Users/Dell/Dropbox/SVG"
|
||||
----------------------------- NestingLib ---------------------------------------
|
||||
|
||||
-- single nesting time for final nesting
|
||||
Config.nFinalMaxTime = 5
|
||||
-- single nesting time for estimation
|
||||
Config.nEstimMaxTime = 5
|
||||
|
||||
-- table of association layer names to machinings -> {{"LayerName"}, {'Machining1', 'Machining2', ...}}
|
||||
Config.OutlineMachining = {{".375 ROUGHER", "ROUGHER"},
|
||||
{'3/8 MILLING', '1/4 MILLING'}}
|
||||
Config.HoleMachining = {"HOLE", {'3/16 DRILLING', '1/4 DRILLING', '1/2 DRILLING', '1/8 DRILLING', '11/32 DRILLING', '13/32 DRILLING',
|
||||
'3/8 DRILLING', '5/16 DRILLING', '7/16 DRILLING', '17/32 DRILLING', '37/64 DRILLING'}}
|
||||
Config.RampMachining = {"RAMP", '3/8 MILLING'}
|
||||
Config.CountersinkMachining = {"COUNTERSINK", '45 DEG'}
|
||||
Config.OutsideChamferMachining = {"OUTSIDE CHAMFER", '45 DEG'}
|
||||
Config.InsideChamferMachining = {"INSIDECHAMFER", '45 DEG'}
|
||||
-- list of pocketing machinings
|
||||
Config.Pocketing = {'3/8 POCKETING', '1/4 POCKETING'}
|
||||
|
||||
|
||||
Config.OutlineMachName = {".375 ROUGHER", "ROUGHER"}
|
||||
Config.MXOutlineMachTools = {'3/8 MILLING', '1/4 MILLING'}
|
||||
Config.NWOutlineMachTools = {'3/8 MILLING', '1/4 MILLING'}
|
||||
Config.HoleMachName = {"HOLE"}
|
||||
Config.MXHoleMachTools = {'3/16 DRILLING', '1/4 DRILLING', '1/2 DRILLING', '1/8 DRILLING', '11/32 DRILLING', '13/32 DRILLING',
|
||||
'3/8 DRILLING', '5/16 DRILLING', '7/16 DRILLING', '17/32 DRILLING', '37/64 DRILLING'}
|
||||
Config.NWHoleMachTools = {'1/2 DRILLING', '1/8 DRILLING', '3/8 DRILLING', '5/16 DRILLING', '7/16 DRILLING', '37/64 DRILLING', '1/4 DRILLING'}
|
||||
Config.RampMachName = {"RAMP"}
|
||||
Config.MXRampMachTools = {'3/8 MILLING'}
|
||||
Config.NWRampMachTools = {'3/8 MILLING'}
|
||||
Config.CountersinkMachName = {"COUNTERSINK"}
|
||||
Config.MXCountersinkMachTools = {'45 DEG'}
|
||||
Config.NWCountersinkMachTools = {'45 DEG'}
|
||||
Config.InsideChamferMachName = {"INSIDE CHAMFER"}
|
||||
Config.MXInsideChamferMachTools = {'45 DEG'}
|
||||
Config.NWInsideChamferMachTools = {'45 DEG'}
|
||||
Config.OutsideChamferMachName = {"OUTSIDE CHAMFER"}
|
||||
Config.MXOutsideChamferMachTools = {'45 DEG'}
|
||||
Config.NWOutsideChamferMachTools = {'45 DEG'}
|
||||
Config.MXPocketingTools = {'3/8 POCKETING', '1/4 POCKETING'}
|
||||
Config.NWPocketingTools = {'3/8 POCKETING', '1/4 POCKETING'}
|
||||
|
||||
-- tolerance betwwen start and end of a path to consider it closed
|
||||
Config.OpenPathTolerance = 0.01
|
||||
-- tolerance between part thickness and material thickness to consider a hole throught
|
||||
Config.ThicknessTolerance = 0.09
|
||||
-- remnant minimum dimension
|
||||
Config.RemnantMinDimension = 304.8
|
||||
-- minimum area in which position internal parts
|
||||
Config.IntPartMinArea = 5000
|
||||
-- tolerance between hole diameter and tool diameter
|
||||
Config.HoleTolerance = 0.1
|
||||
|
||||
-- managing small parts (tabs,skeleton, ...)
|
||||
Config.nSkelSkinTabMode = 2 -- 0 = nothing ; 2 = Tabs ; 3 = Skeleton ; 4 = Skeleton&Tab
|
||||
Config.dSkelSkinTab_MaxArea = 36500 --- area limit
|
||||
|
||||
-- color for paths pocketing
|
||||
Config.colPocketingPaths = Color3d( 0, 255, 255)
|
||||
-- suddivisione area pezzi in categorie per ordinamento lavorazione dei pezzi
|
||||
Config.dVerySmallPartArea = 3225
|
||||
Config.dSmallPartArea = 15200 -- 11612
|
||||
Config.dMediumPartArea = 60000
|
||||
-- lato massimo per rientrare in pezzi piccoli anche se con area grande
|
||||
Config.dSmallPartSide = 50.8
|
||||
|
||||
-- attivazione distruzione scheletro
|
||||
Config.bSkeletonReduction = true
|
||||
Config.bSRMaxHeight = 100 * 25.4
|
||||
Config.bSRMaxWidth = 30 * 25.4
|
||||
-- quantita' di cui il taglio skeleton entra nello spazio vuoto di taglio pezzi
|
||||
Config.dSkeletonCut = 0.5
|
||||
|
||||
-- spessore scheletro pezzi piccoli
|
||||
Config.dSkeletonWidth = 1 * 25.4
|
||||
|
||||
-- riduzione feed su pezzi con tab
|
||||
Config.dTabFeed = 15000
|
||||
-- riduzione feed su pezzi piccoli
|
||||
Config.bSmallFeedReduce = true
|
||||
Config.dSmallFeed = 8000
|
||||
|
||||
-- variabile che indica se modalita' doppia macchina
|
||||
Config.bDoubleMach = false
|
||||
|
||||
-- tab parameters for each material
|
||||
Config.TabParams = {{MatId = 1, MatExtCode = 6120, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 2, MatExtCode = 6110, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 3, MatExtCode = 6049, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 4, MatExtCode = 6118, Length = 10.0, Height = 2.0, Angle = 30, Distance = 50, MinCount = 6, MaxCount = 12},
|
||||
{MatId = 5, MatExtCode = 6479, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 6, MatExtCode = 6408, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 7, MatExtCode = 6406, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 8, MatExtCode = 6478, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 9, MatExtCode = 6473, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 10, MatExtCode = 6474, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 11, MatExtCode = 6423, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 12, MatExtCode = 112268, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 13, MatExtCode = 119169, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 14, MatExtCode = 121214, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 15, MatExtCode = 111625, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 16, MatExtCode = 6127, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 17, MatExtCode = 6044, Length = 15.0, Height = 3.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 18, MatExtCode = 101523, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 19, MatExtCode = 6117, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 20, MatExtCode = 6119, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 21, MatExtCode = 6115, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 24, MatExtCode = 108360, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 25, MatExtCode = 124880, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 26, MatExtCode = 127662, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 27, MatExtCode = 127663, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 28, MatExtCode = 127664, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 29, MatExtCode = 127665, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
}
|
||||
|
||||
-- parts minimum distance from raw part outline for each material
|
||||
Config.Kerf = {{MatId = 1, MatExtCode = 6120, Kerf = 8},
|
||||
{MatId = 2, MatExtCode = 6110, Kerf = 20},
|
||||
{MatId = 3, MatExtCode = 6049, Kerf = 20},
|
||||
{MatId = 4, MatExtCode = 6118, Kerf = 10},
|
||||
{MatId = 5, MatExtCode = 6479, Kerf = 20},
|
||||
{MatId = 6, MatExtCode = 6408, Kerf = 20},
|
||||
{MatId = 7, MatExtCode = 6406, Kerf = 20},
|
||||
{MatId = 8, MatExtCode = 6478, Kerf = 30},
|
||||
{MatId = 9, MatExtCode = 6473, Kerf = 20},
|
||||
{MatId = 10, MatExtCode = 6474, Kerf = 20},
|
||||
{MatId = 11, MatExtCode = 6423, Kerf = 20},
|
||||
{MatId = 12, MatExtCode = 112268, Kerf = 20},
|
||||
{MatId = 13, MatExtCode = 119169, Kerf = 20},
|
||||
{MatId = 14, MatExtCode = 121214, Kerf = 10},
|
||||
{MatId = 15, MatExtCode = 111625, Kerf = 20},
|
||||
{MatId = 16, MatExtCode = 6127, Kerf = 20},
|
||||
{MatId = 17, MatExtCode = 6044, Kerf = 20},
|
||||
{MatId = 18, MatExtCode = 101523, Kerf = 20},
|
||||
{MatId = 19, MatExtCode = 6117, Kerf = 20},
|
||||
{MatId = 20, MatExtCode = 6119, Kerf = 20},
|
||||
{MatId = 21, MatExtCode = 6115, Kerf = 20},
|
||||
{MatId = 24, MatExtCode = 108360, Kerf = 8},
|
||||
{MatId = 25, MatExtCode = 124880, Kerf = 20},
|
||||
{MatId = 26, MatExtCode = 127662, Kerf = 20},
|
||||
{MatId = 27, MatExtCode = 127663, Kerf = 20},
|
||||
{MatId = 28, MatExtCode = 127664, Kerf = 20},
|
||||
{MatId = 29, MatExtCode = 127665, Kerf = 10},
|
||||
}
|
||||
|
||||
Config.KitXModel = {{Model = '65w981', KitQty = 6},
|
||||
{Model = '62163t', KitQty = 12},
|
||||
{Model = '65w981s', KitQty = 6},
|
||||
{Model = '53xhp81', KitQty = 10},
|
||||
}
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return Config
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
--
|
||||
-- EEEEEEEEEE GGGGGG TTTTTTTTTTTTTT
|
||||
-- EEEEEEEEEE GGGGGGGGGG TTTTTTTTTTTTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEE GGGG TTTT
|
||||
-- EEEEEEE GGGG GGGGGGG TTTT
|
||||
-- EEEEEEE GGGG GGGGGGG TTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEEEEEEEE GGGGGGGGGG TTTT
|
||||
-- EEEEEEEEEE GGGGGG TTTT
|
||||
--
|
||||
-- by EgalTech s.r.l.
|
||||
-- File dei parametri di configurazione by EgalTech s.r.l. 2020/08/13
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local Config = {}
|
||||
|
||||
-------------------------- Main -------------------------
|
||||
|
||||
-- path chiamate REST
|
||||
Config.sRESTPath = "http://seriate.steamware.net:8083/NKC/api/"
|
||||
Config.sPathMat = Config.sRESTPath .. "Material"
|
||||
Config.sPathBatch = Config.sRESTPath .. "BatchProc"
|
||||
-- Nesting cycle waiting time
|
||||
Config.CycleDelay = 3
|
||||
|
||||
-- Max bunk height
|
||||
Config.MaxBunkThickness = 450
|
||||
|
||||
-- save data path
|
||||
Config.sBasePath = "c:/Users/Dell/Dropbox/SVG"
|
||||
|
||||
----------------------------- NestingLib ---------------------------------------
|
||||
|
||||
-- single nesting time for final nesting
|
||||
Config.nFinalMaxTime = 5
|
||||
-- single nesting time for estimation
|
||||
Config.nEstimMaxTime = 5
|
||||
|
||||
-- table of association layer names to machinings -> {{"LayerName"}, {'Machining1', 'Machining2', ...}}
|
||||
Config.OutlineMachining = {{".375 ROUGHER", "ROUGHER"},
|
||||
{'3/8 MILLING', '1/4 MILLING'}}
|
||||
Config.HoleMachining = {"HOLE", {'3/16 DRILLING', '1/4 DRILLING', '1/2 DRILLING', '1/8 DRILLING', '11/32 DRILLING', '13/32 DRILLING',
|
||||
'3/8 DRILLING', '5/16 DRILLING', '7/16 DRILLING', '17/32 DRILLING', '37/64 DRILLING'}}
|
||||
Config.RampMachining = {"RAMP", '3/8 MILLING'}
|
||||
-- list of pocketing machinings
|
||||
Config.Pocketing = {'3/8 POCKETING', '1/4 POCKETING'}
|
||||
|
||||
|
||||
Config.OutlineMachName = {".375 ROUGHER", "ROUGHER"}
|
||||
Config.MXOutlineMachTools = {'3/8 MILLING', '1/4 MILLING'}
|
||||
Config.NWOutlineMachTools = {'3/8 MILLING', '1/4 MILLING'}
|
||||
Config.HoleMachName = {"HOLE"}
|
||||
Config.MXHoleMachTools = {'3/16 DRILLING', '1/4 DRILLING', '1/2 DRILLING', '1/8 DRILLING', '11/32 DRILLING', '13/32 DRILLING',
|
||||
'3/8 DRILLING', '5/16 DRILLING', '7/16 DRILLING', '17/32 DRILLING', '37/64 DRILLING'}
|
||||
Config.NWHoleMachTools = {'1/2 DRILLING', '1/8 DRILLING', '3/8 DRILLING', '5/16 DRILLING', '7/16 DRILLING', '37/64 DRILLING', '1/4 DRILLING'}
|
||||
Config.RampMachName = {"RAMP"}
|
||||
Config.MXRampMachTools = {'3/8 MILLING'}
|
||||
Config.NWRampMachTools = {'3/8 MILLING'}
|
||||
Config.MXPocketingTools = {'3/8 POCKETING', '1/4 POCKETING'}
|
||||
Config.NWPocketingTools = {'3/8 POCKETING', '1/4 POCKETING'}
|
||||
|
||||
-- tolerance betwwen start and end of a path to consider it closed
|
||||
Config.OpenPathTolerance = 0.01
|
||||
-- tolerance between part thickness and material thickness to consider a hole throught
|
||||
Config.ThicknessTolerance = 0.09
|
||||
-- remnant minimum dimension
|
||||
Config.RemnantMinDimension = 304.8
|
||||
-- minimum area in which position internal parts
|
||||
Config.IntPartMinArea = 5000
|
||||
-- tolerance between hole diameter and tool diameter
|
||||
Config.HoleTolerance = 0.1
|
||||
|
||||
-- managing small parts (tabs,skeleton, ...)
|
||||
Config.nSkelSkinTabMode = 2 -- 0 = nothing ; 2 = Tabs ; 3 = Skeleton ; 4 = Skeleton&Tab
|
||||
Config.dSkelSkinTab_MaxArea = 36500 --- area limit
|
||||
|
||||
-- color for paths pocketing
|
||||
Config.colPocketingPaths = Color3d( 0, 255, 255)
|
||||
-- suddivisione area pezzi in categorie per ordinamento lavorazione dei pezzi
|
||||
Config.dVerySmallPartArea = 3225
|
||||
Config.dSmallPartArea = 15200 -- 11612
|
||||
Config.dMediumPartArea = 60000
|
||||
-- lato massimo per rientrare in pezzi piccoli anche se con area grande
|
||||
Config.dSmallPartSide = 50.8
|
||||
|
||||
-- attivazione distruzione scheletro
|
||||
Config.bSkeletonReduction = true
|
||||
Config.bSRMaxHeight = 100 * 25.4
|
||||
Config.bSRMaxWidth = 30 * 25.4
|
||||
-- quantita' di cui il taglio skeleton entra nello spazio vuoto di taglio pezzi
|
||||
Config.dSkeletonCut = 0.5
|
||||
|
||||
-- spessore scheletro pezzi piccoli
|
||||
Config.dSkeletonWidth = 1 * 25.4
|
||||
|
||||
-- riduzione feed su pezzi piccoli
|
||||
Config.bSmallFeedReduce = true
|
||||
Config.dSmallFeed = 8000
|
||||
|
||||
-- tab parameters for each material
|
||||
Config.TabParams = {{MatId = 1, MatExtCode = 6120, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 2, MatExtCode = 6110, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 3, MatExtCode = 6049, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 4, MatExtCode = 6118, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 5, MatExtCode = 6479, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 6, MatExtCode = 6408, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 7, MatExtCode = 6406, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 8, MatExtCode = 6478, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 9, MatExtCode = 6473, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 10, MatExtCode = 6474, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 11, MatExtCode = 6423, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 12, MatExtCode = 112268, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 13, MatExtCode = 119169, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 14, MatExtCode = 121214, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 15, MatExtCode = 111625, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 16, MatExtCode = 6127, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 17, MatExtCode = 6044, Length = 15.0, Height = 3.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 18, MatExtCode = 101523, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 19, MatExtCode = 6117, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 20, MatExtCode = 6119, Length = 10.0, Height = 1.5, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
{MatId = 21, MatExtCode = 6115, Length = 10.0, Height = 2.0, Angle = 30, Distance = 60, MinCount = 3, MaxCount = 4},
|
||||
}
|
||||
|
||||
-- parts minimum distance from raw part outline for each material
|
||||
Config.Kerf = {{MatId = 1, MatExtCode = 6120, Kerf = 20},
|
||||
{MatId = 2, MatExtCode = 6110, Kerf = 20},
|
||||
{MatId = 3, MatExtCode = 6049, Kerf = 20},
|
||||
{MatId = 4, MatExtCode = 6118, Kerf = 20},
|
||||
{MatId = 5, MatExtCode = 6479, Kerf = 20},
|
||||
{MatId = 6, MatExtCode = 6408, Kerf = 20},
|
||||
{MatId = 7, MatExtCode = 6406, Kerf = 20},
|
||||
{MatId = 8, MatExtCode = 6478, Kerf = 30},
|
||||
{MatId = 9, MatExtCode = 6473, Kerf = 20},
|
||||
{MatId = 10, MatExtCode = 6474, Kerf = 20},
|
||||
{MatId = 11, MatExtCode = 6423, Kerf = 20},
|
||||
{MatId = 12, MatExtCode = 112268, Kerf = 20},
|
||||
{MatId = 13, MatExtCode = 119169, Kerf = 20},
|
||||
{MatId = 14, MatExtCode = 121214, Kerf = 20},
|
||||
{MatId = 15, MatExtCode = 111625, Kerf = 20},
|
||||
{MatId = 16, MatExtCode = 6127, Kerf = 20},
|
||||
{MatId = 17, MatExtCode = 6044, Kerf = 20},
|
||||
{MatId = 18, MatExtCode = 101523, Kerf = 20},
|
||||
{MatId = 19, MatExtCode = 6117, Kerf = 20},
|
||||
{MatId = 20, MatExtCode = 6119, Kerf = 20},
|
||||
{MatId = 21, MatExtCode = 6115, Kerf = 20},
|
||||
}
|
||||
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return Config
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
E.1 -> "Can't find DXF file"
|
||||
E.2 -> "Can't find material tag in DXF"
|
||||
E.4 -> "Can't find outline"
|
||||
E.6 -> "Error in DXF reading"
|
||||
E.7 -> "Impossible running estimation!", "Error in machining!"
|
||||
E.8 -> "Open paths found"
|
||||
E.9 -> "Outline tool diameter not found!"
|
||||
E.10 -> "Error in nesting function!"
|
||||
E.12 -> "Error on control counting. Lost part, sheet, bunk, etc..."
|
||||
E.13 -> "Error, outline thickness must be negative!"
|
||||
E.14 -> "There are entities that are not CompositeCurves or Arcs"
|
||||
@@ -0,0 +1,73 @@
|
||||
-- necessary to find socket.core and mime.core
|
||||
package.cpath = package.cpath .. ";/EgtProg/LuaLibs/?.dll"
|
||||
|
||||
require( 'EgtBase')
|
||||
_ENV = EgtProtectGlobal()
|
||||
EgtEnableDebug( true)
|
||||
|
||||
local AREA = "Area"
|
||||
|
||||
local BasePath = "c:/Users/Dell/Dropbox/SVG"
|
||||
local BatchDateId = "/2021/6/629"
|
||||
|
||||
local MaxMatId = 25
|
||||
for MatId = 1, MaxMatId do
|
||||
-- apro file
|
||||
if EgtOpenFile(BasePath .. "/Nesting" .. BatchDateId .. "/" .. MatId .. ".nge") then
|
||||
-- vado su gruppi di lavorazione
|
||||
local nSheetGroupId = EgtGetFirstMachGroup()
|
||||
while nSheetGroupId do
|
||||
local sGroupName = EgtGetMachGroupName(nSheetGroupId)
|
||||
local bOk = EgtSetCurrMachGroup(nSheetGroupId)
|
||||
local nOp = EgtGetFirstOperation()
|
||||
-- while nOp and false do
|
||||
-- if EgtGetOperationType(nOp) == MCH_OY.MILLING then
|
||||
-- local bOk = EgtSetCurrMachining(nOp)
|
||||
-- local nOut = EgtGetMachiningGeometry()
|
||||
-- local nPart = EgtGetParent(EgtGetParent(nOut[1][1]))
|
||||
-- local dArea = EgtGetInfo(nPart, AREA, 'd')
|
||||
--
|
||||
-- --local b3Part = EgtGetBBox(nPart, 13)
|
||||
--
|
||||
-- if EgtGetMachiningParam(MCH_MP.USERNOTES) == 'Outline = 1' then -- and (b3Part:getX() < 18 * GEO.ONE_INCH or b3Part:getY() < 18 * GEO.ONE_INCH) then
|
||||
-- EgtSetMachiningParam(MCH_MP.INVERT, true)
|
||||
-- if dArea and dArea < 11652 then
|
||||
-- EgtSetMachiningParam(MCH_MP.LEAVETAB, true)
|
||||
-- EgtSetMachiningParam(MCH_MP.TABMIN, 2)
|
||||
-- EgtSetMachiningParam(MCH_MP.TABMAX, 4)
|
||||
-- EgtSetMachiningParam(MCH_MP.TABDIST, 60)
|
||||
-- elseif dArea and dArea < 36500 then
|
||||
-- EgtSetMachiningParam(MCH_MP.LEAVETAB, true)
|
||||
-- EgtSetMachiningParam(MCH_MP.TABMIN, 4)
|
||||
-- EgtSetMachiningParam(MCH_MP.TABMAX, 6)
|
||||
-- EgtSetMachiningParam(MCH_MP.TABDIST, 200)
|
||||
-- else
|
||||
-- EgtSetMachiningParam(MCH_MP.TABDIST, 50000)
|
||||
-- end
|
||||
---- else
|
||||
---- EgtSetMachiningParam(MCH_MP.DEPTH_STR, "TH+0.1")
|
||||
-- end
|
||||
-- end
|
||||
-- nOp = EgtGetNextOperation(nOp)
|
||||
-- end
|
||||
-- local nRawPart = EgtGetFirstRawPart()
|
||||
-- local nPart = EgtGetFirstPartInRawPart(nRawPart)
|
||||
-- while nPart do
|
||||
--
|
||||
-- nPart = EgtGetNextPartInRawPart(nPart)
|
||||
-- end
|
||||
EgtApplyAllMachinings()
|
||||
EgtApplyAllMachinings()
|
||||
-- genero
|
||||
local sCncPath = BasePath .. "/CNC" .. BatchDateId .. "/" .. MatId .."/" .. EgtGetMachGroupName(nSheetGroupId) .. ".cnc"
|
||||
local sPrintPath = BasePath .. "/CNC" .. BatchDateId .. "/" .. MatId .."/" .. EgtGetMachGroupName(nSheetGroupId) .. "_2.cnc"
|
||||
local sNewPrintPath = BasePath .. "/CNC_PRINT" .. BatchDateId .. "/" .. MatId .."/" .. EgtGetMachGroupName(nSheetGroupId) .. ".cnc"
|
||||
bOk = EgtGenerate(sCncPath)
|
||||
-- sposto file di stampa
|
||||
bOk = EgtCopyFile(sPrintPath, sNewPrintPath)
|
||||
bOk = EgtEraseFile(sPrintPath)
|
||||
nSheetGroupId = EgtGetNextMachGroup(nSheetGroupId)
|
||||
end
|
||||
EgtSaveFile()
|
||||
end
|
||||
end
|
||||
+2806
File diff suppressed because it is too large
Load Diff
+62
@@ -0,0 +1,62 @@
|
||||
--
|
||||
-- EEEEEEEEEE GGGGGG TTTTTTTTTTTTTT
|
||||
-- EEEEEEEEEE GGGGGGGGGG TTTTTTTTTTTTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEE GGGG TTTT
|
||||
-- EEEEEEE GGGG GGGGGGG TTTT
|
||||
-- EEEEEEE GGGG GGGGGGG TTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEEEEEEEE GGGGGGGGGG TTTT
|
||||
-- EEEEEEEEEE GGGGGG TTTT
|
||||
--
|
||||
-- by EgalTech s.r.l.
|
||||
-- Libreria delle funzioni REST by EgalTech s.r.l. 2020/08/13
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local RESTLib = {}
|
||||
|
||||
-- Include
|
||||
require( 'EgtBase')
|
||||
ltn12 = require( 'ltn12')
|
||||
http = require( 'socket.http')
|
||||
JSON = require( 'JSON')
|
||||
|
||||
-- funzione get di chiamata REST
|
||||
function RESTLib.get(path)
|
||||
local resp = {}
|
||||
-- Get info from website
|
||||
--answ, status, body = http.request{url = path, content_type = 'application/json', sink = ltn12.sink.file(io.stdout)}
|
||||
local body, code, headers = http.request{url = path, content_type = 'application/json', sink = ltn12.sink.table(resp)}
|
||||
-- Verify errors
|
||||
if code == 200 then
|
||||
-- concateno le stringhe ricevute
|
||||
local TempData = table.concat(resp)
|
||||
-- e le decodifico da JSON a tabella lua
|
||||
return JSON:decode(TempData) -- decode example
|
||||
else
|
||||
print("Error: ".. (code or '') )
|
||||
return {}
|
||||
end
|
||||
end
|
||||
--
|
||||
|
||||
-- funzione set di chiamata REST
|
||||
function RESTLib.set(path, value)
|
||||
local resp = JSON:encode(value)
|
||||
-- Get info from website
|
||||
local body, code, headers = http.request{url = path, content_type = 'application/json', source = ltn12.source.string(resp), method = "POST",
|
||||
headers = {["Content-Type"] = "application/json",
|
||||
["content-length"] = string.len(resp)}}
|
||||
-- Verify errors
|
||||
if code == 200 then
|
||||
return true
|
||||
else
|
||||
print("Error: ".. (code or '') )
|
||||
return false
|
||||
end
|
||||
end
|
||||
--
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return RESTLib
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
--
|
||||
-- EEEEEEEEEE GGGGGG TTTTTTTTTTTTTT
|
||||
-- EEEEEEEEEE GGGGGGGGGG TTTTTTTTTTTTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEE GGGG TTTT
|
||||
-- EEEEEEE GGGG GGGGGGG TTTT
|
||||
-- EEEEEEE GGGG GGGGGGG TTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEEEEEEEE GGGGGGGGGG TTTT
|
||||
-- EEEEEEEEEE GGGGGG TTTT
|
||||
--
|
||||
-- by EgalTech s.r.l.
|
||||
-- Libreria delle funzioni ausiliarie by EgalTech s.r.l. 2020/08/13
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local UtilityLib = {}
|
||||
|
||||
-- Include
|
||||
require( 'EgtBase')
|
||||
local Config = require( 'Config')
|
||||
|
||||
-- path di salvataggio dati
|
||||
local PNGPath = Config.sBasePath .. "/PNG"
|
||||
|
||||
-- list of all png created codes
|
||||
local PNGIdList = {}
|
||||
|
||||
-- Check if folder exists --
|
||||
function UtilityLib.FolderExists(strFolderName)
|
||||
if EgtExistsDirectory(strFolderName:gsub("\\$",""),"mode") then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
--
|
||||
|
||||
local OUTLINE = "Outline"
|
||||
-- Colore del grezzo
|
||||
local ColA = Color3d( 255, 165, 0, 30)
|
||||
|
||||
local SHEETLABEL = "SheetLabel"
|
||||
-- funzione che crea il grezzo
|
||||
function UtilityLib.RawPartCreation(SheetPartId, vtOffs, IsOffLine)
|
||||
local Pz = SheetPartId
|
||||
local Ls = EgtGetFirstNameInGroup( Pz, OUTLINE)
|
||||
local Er = EgtGetFirstNameInGroup( Ls, OUTLINE)
|
||||
local SheetLabel = EgtGetFirstNameInGroup( Ls, SHEETLABEL)
|
||||
local b3Part = EgtGetBBoxGlob( Pz or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
-- se pezzo non definito, non devo fare alcunchè
|
||||
if not Pz then
|
||||
DISP.ERR = 0
|
||||
return
|
||||
end
|
||||
-- se pezzo vuoto, non devo fare alcunchè
|
||||
if b3Part:isEmpty() then
|
||||
DISP.ERR = 2
|
||||
return
|
||||
end
|
||||
-- Definizione e posizionamento del grezzo
|
||||
local nRaw
|
||||
if Er then
|
||||
nRaw = EgtAddRawPartWithPart( Pz, Er, 0, ColA)
|
||||
EgtRemovePartFromRawPart(Pz)
|
||||
EgtSetStatus( Er, GDB_ST.ON)
|
||||
else
|
||||
nRaw = EgtAddRawPartWithPart( Pz, GDB_ID.NULL, dOverMat, ColA)
|
||||
EgtRemovePartFromRawPart(Pz)
|
||||
end
|
||||
if not nRaw then
|
||||
EgtOutLog( 'InitDisp for NE_nest : error defining raw part')
|
||||
DISP.ERR = 3
|
||||
return
|
||||
end
|
||||
local b3Raw = EgtGetBBoxGlob(nRaw, GDB_BB.STANDARD)
|
||||
local b3Label = EgtGetBBoxGlob(SheetLabel, GDB_BB.STANDARD)
|
||||
local nRawLabel = EgtCopyGlob(SheetLabel, nRaw)
|
||||
local dYPos = b3Raw:getMax():getY()
|
||||
if b3Raw:getDimY() > 1465 then
|
||||
dYPos = b3Raw:getMin():getY() + 1465 + (b3Label:getDimY())
|
||||
end
|
||||
EgtMove(nRawLabel, Point3d(b3Raw:getMin():getX(), dYPos - b3Label:getDimY(), b3Raw:getMin():getZ()) - b3Label:getMin(), GDB_RT.GLOB)
|
||||
-- se Northwood posiziono a sinistra, altrimenti a destra
|
||||
local nTableRefPoint = MCH_CR.BR
|
||||
if IsOffLine then
|
||||
nTableRefPoint = MCH_CR.BL
|
||||
end
|
||||
if not EgtMoveToCornerRawPart( nRaw, vtOffs, nTableRefPoint) then
|
||||
EgtOutLog( 'InitDisp for NE_nest : error positioning raw part on table')
|
||||
-- DISP.ERR = 4
|
||||
return
|
||||
end
|
||||
return nRaw
|
||||
end
|
||||
--
|
||||
|
||||
|
||||
-- funzione che imposta tavola macchina
|
||||
function UtilityLib.SetupMachineTable(IsOffline)
|
||||
-- Scelta della tavola
|
||||
local sTab = 'Tab'
|
||||
EgtSetTable( sTab)
|
||||
-- Dimensioni tavola
|
||||
local b3Tab = EgtGetTableArea()
|
||||
-- Richiesta posizione rispetto allo Zero tavola
|
||||
local vtOffs = Vector3d( b3Tab:getDimX(), 0, 0)
|
||||
-- se NorthWood cambio offset
|
||||
if IsOffline then
|
||||
vtOffs = Vector3d(0,0,0)
|
||||
end
|
||||
return vtOffs
|
||||
end
|
||||
--
|
||||
|
||||
local MATERIAL = {"MATERIAL FLAG"}
|
||||
local PAINT = {"PAINT FLAG"}
|
||||
local ASSEMBLY = {"TO BE ASSEMBLED","AssemblyCell"}
|
||||
local TNUT = {"T-NUT FLAG","TNutFlag"}
|
||||
local ROUND = {"ROUND EDGE","RoundEdge"}
|
||||
local TAB = {"CHOP AT TAB","ChopAtTab"}
|
||||
local PDF = {"PDF LINK"}
|
||||
local CUTOPT = {"CUT OPT", "CutOpt"}
|
||||
local LABEL = {"LABEL", "Label"}
|
||||
local NAME = {"NAME", "Name"}
|
||||
local INCHAMFER = {"INSIDE CHAMFER WIDTH", "InsideChamferWidth"}
|
||||
local OUTCHAMFER = {"OUTSIDE CHAMFER WIDTH", "OutsideChamferWidth"}
|
||||
|
||||
local DXFFlags = {MATERIAL, PAINT, ASSEMBLY, TNUT, ROUND, TAB, PDF, CUTOPT, LABEL, NAME, INCHAMFER, OUTCHAMFER}
|
||||
|
||||
-- funzione che legge i dxf
|
||||
-- valore di ritorno numero 5 e' ErrorType:
|
||||
-- 1) File not found
|
||||
-- 2) Material layer not found
|
||||
function UtilityLib.readDXF(DXFpath, PartExtCode, IsEstimation, CreatePng)
|
||||
-- elimino doppie barre dalla path
|
||||
DXFpath = string.gsub(DXFpath, "\\", '/')
|
||||
local errorType = 0
|
||||
local material = nil
|
||||
local pdfPath = ""
|
||||
local paint = false
|
||||
local flags = {}
|
||||
local revision = ""
|
||||
-- apro DXF
|
||||
EgtNewFile()
|
||||
EgtOutLog(DXFpath)
|
||||
local res = EgtImportDxf(DXFpath)
|
||||
if not res then
|
||||
errorType = 1
|
||||
EgtOutLog("DXF file not found :" .. DXFpath)
|
||||
return material, pdfPath, paint, flags, errorType
|
||||
end -- GESTIRE ERRORE!!
|
||||
-- trovo pezzo
|
||||
local part = EgtGetFirstInGroup(GDB_ID.ROOT)
|
||||
-- cerco i layer
|
||||
for Flag = 1, #DXFFlags do
|
||||
local flagLayer = EgtGetFirstNameInGroup(part, DXFFlags[Flag][1])
|
||||
if flagLayer then
|
||||
local textObject = EgtGetFirstInGroup(flagLayer)
|
||||
-- leggo il testo
|
||||
local flagText = EgtTextContent(textObject)
|
||||
-- verifico se il flag e' material
|
||||
if DXFFlags[Flag][1] == MATERIAL[1] then
|
||||
-- ritaglio valore
|
||||
local _, _, valueText = string.find(flagText, ".*:%s*(%d+)")
|
||||
material = tonumber(valueText)
|
||||
elseif DXFFlags[Flag][1] == PDF[1] then
|
||||
-- ritaglio valore
|
||||
local _, _, valueText = string.find(flagText, ".*:%s*\"(.+)\"")
|
||||
pdfPath = valueText
|
||||
elseif DXFFlags[Flag][1] == PAINT[1] then
|
||||
-- ritaglio valore
|
||||
local _, _, valueText = string.find(flagText, ".*:%s*(%a+)")
|
||||
local PaintVal = string.lower(valueText)
|
||||
if PaintVal == "yes" then
|
||||
paint = true
|
||||
else
|
||||
paint = false
|
||||
end
|
||||
elseif DXFFlags[Flag][1] == NAME[1] then
|
||||
revision = flagText
|
||||
else
|
||||
-- ritaglio valore
|
||||
local _, _, valueText = string.find(flagText, ".*:%s*(%w+[&]*%w*)")
|
||||
flags[DXFFlags[Flag][2]] = valueText
|
||||
end
|
||||
else
|
||||
if Flag < 8 then
|
||||
errorType = 2
|
||||
EgtOutLog(DXFFlags[Flag][1] .. " layer not found :" .. DXFpath)
|
||||
return material, pdfPath, paint, flags, errorType
|
||||
end
|
||||
end
|
||||
end
|
||||
if ( IsEstimation and paint) or CreatePng then
|
||||
-- verifico se gia' processato
|
||||
local Index = 1
|
||||
local bFound = false
|
||||
while not bFound and Index <= #PNGIdList do
|
||||
if PartExtCode == PNGIdList[Index] then
|
||||
bFound = true
|
||||
end
|
||||
Index = Index + 1
|
||||
end
|
||||
if not bFound then
|
||||
SavePartImage(revision)
|
||||
table.insert(PNGIdList, PartExtCode)
|
||||
end
|
||||
end
|
||||
return material, pdfPath, paint, flags, errorType, revision
|
||||
end
|
||||
--
|
||||
|
||||
-- funzione che salva immagine per etichetta verniciati
|
||||
function SavePartImage(PartExtCode)
|
||||
local nPartId = EgtGetFirstInGroup(GDB_ID.ROOT)
|
||||
local nLayerId = EgtGetFirstLayer( nPartId)
|
||||
while nLayerId and nLayerId ~= GDB_ID.NULL do
|
||||
-- nascondo tutti i layer tranne i contorni, i buchi e le rampe
|
||||
local sLayerName = EgtGetName(nLayerId)
|
||||
local bOutlineLayer = false
|
||||
for Index = 1, #Config.OutlineMachining[1] do
|
||||
if sLayerName == Config.OutlineMachining[1][Index] then
|
||||
bOutlineLayer = true
|
||||
end
|
||||
end
|
||||
if bOutlineLayer == true or sLayerName == Config.HoleMachining[1] or sLayerName == Config.RampMachining[1] then
|
||||
-- coloro i contorni di nero
|
||||
local nGeomId = EgtGetFirstInGroup(nLayerId)
|
||||
while nGeomId and nGeomId ~= GDB_ID.NULL do
|
||||
EgtSetColor(nGeomId, BLACK())
|
||||
nGeomId = EgtGetNext(nGeomId)
|
||||
end
|
||||
else
|
||||
-- disattivo tutti gli altri layer
|
||||
EgtSetStatus(nLayerId, GDB_ST.OFF)
|
||||
end
|
||||
nLayerId = EgtGetNextLayer(nLayerId)
|
||||
end
|
||||
-- -- calcolo bbox pezzo
|
||||
-- local b3PartId = EgtGetBBox(nPartId, GDB_BB.STANDARD + GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM)
|
||||
-- -- lo sposto
|
||||
-- EgtMove(nPartId, Vector3d(- (b3PartId:getDimX() / 2), - (b3PartId:getDimY() / 2), 0))
|
||||
EgtZoom(SCE_ZM.ALL)
|
||||
EgtGetImage( SCE_SM.SH, WHITE(), WHITE(), 1600, 1000, PNGPath .. "/" .. PartExtCode .. ".png")
|
||||
EgtGetImage( SCE_SM.SH, WHITE(), WHITE(), 2000, 800, PNGPath .. "/" .. PartExtCode .. "_SP.png")
|
||||
-- EgtSaveFile(PNGPath .. "/" .. PartExtCode .. ".nge")
|
||||
end
|
||||
--
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return UtilityLib
|
||||
Reference in New Issue
Block a user