Aggiungere i file di progetto.

This commit is contained in:
luca.mustacchio@outlook.it
2026-01-31 12:14:12 +01:00
parent d5337157f8
commit 3c0c8e0e47
61 changed files with 135355 additions and 0 deletions

6
dxf/App.config Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

84
dxf/Form1.Designer.vb generated Normal file
View File

@@ -0,0 +1,84 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
'Form esegue l'override del metodo Dispose per pulire l'elenco dei componenti.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Richiesto da Progettazione Windows Form
Private components As System.ComponentModel.IContainer
'NOTA: la procedura che segue è richiesta da Progettazione Windows Form
'Può essere modificata in Progettazione Windows Form.
'Non modificarla mediante l'editor del codice.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.Button1 = New System.Windows.Forms.Button()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.Label1 = New System.Windows.Forms.Label()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(12, 12)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 23)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Apri dxf"
Me.Button1.UseVisualStyleBackColor = True
'
'PictureBox1
'
Me.PictureBox1.Location = New System.Drawing.Point(12, 41)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(776, 397)
Me.PictureBox1.TabIndex = 1
Me.PictureBox1.TabStop = False
'
'Timer1
'
Me.Timer1.Enabled = True
Me.Timer1.Interval = 1
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(93, 22)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(39, 13)
Me.Label1.TabIndex = 2
Me.Label1.Text = "Label1"
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(800, 450)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.Button1)
Me.Name = "Form1"
Me.Text = "Form1"
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Button1 As Button
Friend WithEvents PictureBox1 As PictureBox
Friend WithEvents Timer1 As Timer
Friend WithEvents Label1 As Label
End Class

123
dxf/Form1.resx Normal file
View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

47
dxf/Form1.vb Normal file
View File

@@ -0,0 +1,47 @@
Imports System.Drawing.Drawing2D
Imports netDxf
Public Class Form1
Dim grafica As GestioneGrafica
Dim dxfTMP As dxf_disegno
Dim puntoMouse As Point
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
dxfTMP = New dxf_disegno(ModuloGestionFile.apriDXF)
dxfTMP.getEntità()
grafica = New GestioneGrafica(PictureBox1)
dxfTMP.disegna(grafica.GetGraphics)
grafica.FinalizzaGrafica()
End Sub
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
End Sub
Private Sub PictureBox1_MouseMove(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseMove
puntoMouse = e.Location
End Sub
Dim sparisce = 0
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
sparisce += 1
If IsNothing(dxfTMP) = False Then
grafica.GetGraphics.Clear(Color.Black)
dxfTMP.disegna(grafica.GetGraphics)
If dxfTMP.inizializzato = True Then
For Each p As GraphicsPath In dxfTMP.path
If p.IsOutlineVisible(puntoMouse, New Pen(Color.White, 10)) Then
grafica.GetGraphics.DrawPath(New Pen(Color.FromArgb(120, 255, 0, 0), 5), p)
Dim i As Integer = dxfTMP.path.IndexOf(p)
Dim s = dxfTMP.DatiEntità(i)
sparisce = 0
Label1.Text = s
End If
Next
End If
If sparisce = 10 Then Label1.Text = ""
grafica.FinalizzaGrafica()
End If
End Sub
End Class

38
dxf/GestioneGrafica.vb Normal file
View File

@@ -0,0 +1,38 @@
Public Class GestioneGrafica
Private contestoBuffer As New BufferedGraphicsContext
Public bufferedG As BufferedGraphics
Private controllo As Control
Public Sub New(controllo As Control)
Me.controllo = controllo
Me.AggiornaBuffer()
End Sub
Public Sub AggiornaBuffer()
If Me.controllo.Size.Height = 0 Or Me.controllo.Size.Width = 0 Then Exit Sub
' .WriteLine("dimension del controllo per aggiornmento buffer = " & Me.controllo.Size.ToString)
contestoBuffer.MaximumBuffer = Me.controllo.Size
bufferedG = contestoBuffer.Allocate(controllo.CreateGraphics, New Rectangle(New Point(0, 0), controllo.Size))
bufferedG.Graphics.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
End Sub
Public Sub FinalizzaGrafica()
bufferedG.Render(controllo.CreateGraphics)
End Sub
Public Function GetGraphics() As Graphics
If IsActiveGraphics() Then
Return bufferedG.Graphics
Else
Return Nothing
End If
End Function
Public Function IsActiveGraphics() As Boolean
If IsNothing(bufferedG) Then
Return False
Else
Return True
End If
End Function
End Class

73
dxf/ModuloGestionFile.vb Normal file
View File

@@ -0,0 +1,73 @@

Imports netDxf
Module ModuloGestionFile
Public PATH As String = My.Computer.FileSystem.CurrentDirectory.ToString
Public Structure filtri_file
Const immgagini_jpg = "file images (*.jpg)|*.jpg"
Const immgagini_bmp = "file images (*.bmp)|*.bmp"
Const immgagini_png = "file images (*.png)|*.png"
Const immgagini_dxf = "file mask (*.dxf)|*.dxf"
Const immgagini_all = "All files (*.*)|*.*"
End Structure
Public Function apriImmagine(formati As Array) As Bitmap
Dim testo_filtri = formati(0)
For i = 1 To formati.Length - 1
testo_filtri &= "| " & formati(i)
Next
Dim immagine As Bitmap
Using f As New OpenFileDialog
f.InitialDirectory = PATH + "\maschere"
f.Filter = testo_filtri
If f.ShowDialog = DialogResult.OK Then
immagine = New Bitmap(f.FileName)
Return immagine
Else
Return Nothing
End If
End Using
End Function
Public Function apriDXF() As DxfDocument
Using f As New OpenFileDialog
Dim dxf As New DxfDocument
f.InitialDirectory = PATH + "\maschere\"
f.Filter = filtri_file.immgagini_dxf
If f.ShowDialog = DialogResult.OK Then
Try
Return DxfDocument.Load(f.FileName)
Catch err As netDxf.IO.DxfVersionNotSupportedException
Dim mess = MsgBox("ATTENZIONE il file che si sta tentando di aprire non è un file dxf valido. Usare programmi compatibili tipo AutoCad", MsgBoxStyle.OkOnly, "Errore Compatibilità")
Return Nothing
End Try
Else
Return Nothing
End If
End Using
End Function
Public Function ImportaDXF() As Boolean
Using f As New OpenFileDialog
f.InitialDirectory = PATH + "\maschere\"
f.Filter = "mask file (*.dxf)|*.dxf"
If f.ShowDialog = DialogResult.OK Then
'' .WriteLine("nome file apridxf=" + f.FileName)
'COMMENTATO PER EVITARE ERRORE miaMAschera = New maschera(PictureBox1, f.FileName, immagineBase)
'COMMENTATO PER EVITARE ERRORE immaginemaschera = New maschera_base(immagineBase, miaMAschera)
'testo += Chr(13) + Chr(10) + "Raggio MAschera=" + miaMAschera.info.Raggio.ToString
Dim ris = MsgBox("importare " + f.FileName + " nella directory " + f.InitialDirectory + "?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Importa Maschera")
'' .WriteLine("ris=" + ris.ToString)
If ris = MsgBoxResult.Yes Then
'IngAC_FILE_COPIA(f.FileName, f.InitialDirectory + "ccc.ddd", True)
Dim NomeFile As String = System.IO.Path.GetFileName(f.FileName)
My.Computer.FileSystem.CopyFile(f.FileName, f.InitialDirectory + NomeFile)
End If
Return True
End If
End Using
Return False
End Function
End Module

38
dxf/My Project/Application.Designer.vb generated Normal file
View File

@@ -0,0 +1,38 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
' or if you encounter build errors in this file, go to the Project Designer
' (go to Project Properties or double-click the My Project node in
' Solution Explorer), and make changes on the Application tab.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.dxf.Form1
End Sub
End Class
End Namespace

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>true</MySubMain>
<MainForm>Form1</MainForm>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>0</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View File

@@ -0,0 +1,35 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' Le informazioni generali relative a un assembly sono controllate dal seguente
' set di attributi. Modificare i valori di questi attributi per modificare le informazioni
' associate a un assembly.
' Controllare i valori degli attributi degli assembly
<Assembly: AssemblyTitle("dxf")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("dxf")>
<Assembly: AssemblyCopyright("Copyright © 2023")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'Se il progetto viene esposto a COM, il GUID seguente verrà usato come ID del typelib
<Assembly: Guid("5de2c942-a71e-497b-80c8-0240579d0e74")>
' Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
'
' Versione principale
' Versione secondaria
' Numero di build
' Revisione
'
' È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
' usando l'asterisco '*' come illustrato di seguito:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

62
dxf/My Project/Resources.Designer.vb generated Normal file
View File

@@ -0,0 +1,62 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("dxf.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set(ByVal value As Global.System.Globalization.CultureInfo)
resourceCulture = value
End Set
End Property
End Module
End Namespace

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

73
dxf/My Project/Settings.Designer.vb generated Normal file
View File

@@ -0,0 +1,73 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.dxf.My.MySettings
Get
Return Global.dxf.My.MySettings.Default
End Get
End Property
End Module
End Namespace

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

BIN
dxf/bin/Debug/dxf.exe Normal file

Binary file not shown.

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

BIN
dxf/bin/Debug/dxf.pdb Normal file

Binary file not shown.

26
dxf/bin/Debug/dxf.xml Normal file
View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>
dxf
</name>
</assembly>
<members>
<member name="T:dxf.My.Resources.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:dxf.My.Resources.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:dxf.My.Resources.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
</members>
</doc>

BIN
dxf/bin/Debug/netDxf.dll Normal file

Binary file not shown.

20151
dxf/bin/Debug/netDxf.xml Normal file

File diff suppressed because it is too large Load Diff

13
dxf/dxf.vbproj.user Normal file
View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory />
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>it-IT</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>

98
dxf/dxf_disegno.vb Normal file
View File

@@ -0,0 +1,98 @@
Imports System.Drawing.Drawing2D
Imports netDxf
Imports netDxf.Objects
Public Class dxf_disegno
Public entita As New List(Of netDxf.Entities.EntityObject)
Private dxf As DxfDocument
Public regione As Region
Public path As New List(Of GraphicsPath)
Public inizializzato = False
Public Sub New(fileDxf As DxfDocument)
dxf = fileDxf
For Each lay As netDxf.Objects.Layout In dxf.Layouts
Dim ent As List(Of netDxf.DxfObject) = dxf.Layouts.GetReferences(lay)
For Each a As netDxf.DxfObject In ent
Select Case a.GetType
Case GetType(Entities.Circle)
Dim p As New GraphicsPath
Dim centro As Vector3 = DirectCast(a, netDxf.Entities.Circle).Center
Dim raggio As Double = DirectCast(a, netDxf.Entities.Circle).Radius
p.AddEllipse(New Rectangle(New Point(centro.X - raggio, centro.Y - raggio), New Size(raggio * 2, raggio * 2)))
path.Add(p)
entita.Add(a)
Case GetType(Entities.Line)
Dim x1 = DirectCast(a, Entities.Line).StartPoint.X
Dim y1 = DirectCast(a, Entities.Line).StartPoint.Y
Dim x2 = DirectCast(a, Entities.Line).EndPoint.X
Dim y2 = DirectCast(a, Entities.Line).EndPoint.Y
Dim p As New GraphicsPath
p.AddLine(New PointF(x1, y1), New PointF(x2, y2))
path.Add(p)
entita.Add(a)
End Select
Next
Next
inizializzato = True
End Sub
Public Sub getEntità()
For Each lay As netDxf.Objects.Layout In dxf.Layouts
Console.WriteLine("lay= " + lay.PlotSettings.Origin.ToString)
'Dim ent As List(Of netDxf.DxfObject) = dxf.Layouts.GetReferences(lay)
'For Each en As netDxf.DxfObject In ent
' Console.WriteLine("nome entità: {0}", en)
'Next
Next
End Sub
Public Sub disegna(g As Graphics)
Dim penna As New Pen(Color.White, 1)
Dim penna2 As New Pen(Color.Red, 3)
For Each en As Entities.EntityObject In entita
Select Case en.GetType
Case GetType(Entities.Circle)
Dim centro As Vector3 = DirectCast(en, netDxf.Entities.Circle).Center
Dim raggio As Double = DirectCast(en, netDxf.Entities.Circle).Radius
g.DrawEllipse(penna, New Rectangle(New Point(centro.X - raggio, centro.Y - raggio), New Size(raggio * 2, raggio * 2)))
'g.FillEllipse(New SolidBrush(Color.FromArgb(120, 0, 255, 0)), New Rectangle(New Point(centro.X - raggio, centro.Y - raggio), New Size(raggio * 2, raggio * 2))) 'colora il foro se ha intersezione con la maschera
'regione = New Region(path)
'g.FillPath(Brushes.Red, regione)
'g.FillRegion(Brushes.Red, regione)
Case GetType(Entities.Line)
Dim x1 = DirectCast(en, Entities.Line).StartPoint.X
Dim y1 = DirectCast(en, Entities.Line).StartPoint.Y
Dim x2 = DirectCast(en, Entities.Line).EndPoint.X
Dim y2 = DirectCast(en, Entities.Line).EndPoint.Y
g.DrawLine(penna, New PointF(x1, y1), New PointF(x2, y2))
End Select
Next
End Sub
Public Function DatiEntità(i As Integer) As String
Dim stringa As String = ""
Select Case Me.entita(i).GetType
Case GetType(Entities.Circle)
Dim centro As Vector3 = DirectCast(Me.entita(i), netDxf.Entities.Circle).Center
Dim raggio As Double = DirectCast(Me.entita(i), netDxf.Entities.Circle).Radius.ToString("F2")
Dim X As Single = centro.X
Dim Y As Single = centro.Y
Dim Z As Single = centro.Z
stringa = String.Format("[{0}] cerchio -> centro= ({1}),({2}),({3}), raggio= {4}", i, X, Y, Z, raggio)
Case GetType(Entities.Line)
Dim x1 = DirectCast(Me.entita(i), Entities.Line).StartPoint.X
Dim y1 = DirectCast(Me.entita(i), Entities.Line).StartPoint.Y
Dim x2 = DirectCast(Me.entita(i), Entities.Line).EndPoint.X
Dim y2 = DirectCast(Me.entita(i), Entities.Line).EndPoint.Y
Dim deltaX As Single = x2 - x1
Dim deltaY As Single = y2 - y1
Dim distance As Single = Math.Sqrt(deltaX * deltaX + deltaY * deltaY)
stringa = String.Format("[{1}] linea -> lunghezza= {0}", distance, i)
End Select
Return stringa
End Function
End Class

13512
dxf/maschera D2 2F.dxf Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
' <autogenerated/>
Option Strict Off
Option Explicit On
Imports System
Imports System.Reflection
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName:=".NET Framework 4.7.2")>

Binary file not shown.

Binary file not shown.

BIN
dxf/obj/Debug/dxf.exe Normal file

Binary file not shown.

BIN
dxf/obj/Debug/dxf.pdb Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
6f6069288c0763c7aabc9cd0e738f7caef8cd069bd3d888adfecd3eb813e78f8

View File

@@ -0,0 +1,31 @@
C:\Users\ski90\source\repos\dxf\dxf\bin\Debug\dxf.exe.config
C:\Users\ski90\source\repos\dxf\dxf\bin\Debug\dxf.exe
C:\Users\ski90\source\repos\dxf\dxf\bin\Debug\dxf.pdb
C:\Users\ski90\source\repos\dxf\dxf\bin\Debug\dxf.xml
C:\Users\ski90\source\repos\dxf\dxf\bin\Debug\netDxf.dll
C:\Users\ski90\source\repos\dxf\dxf\bin\Debug\netDxf.xml
C:\Users\ski90\source\repos\dxf\dxf\obj\Debug\dxf.vbproj.AssemblyReference.cache
C:\Users\ski90\source\repos\dxf\dxf\obj\Debug\dxf.vbproj.SuggestedBindingRedirects.cache
C:\Users\ski90\source\repos\dxf\dxf\obj\Debug\dxf.Form1.resources
C:\Users\ski90\source\repos\dxf\dxf\obj\Debug\dxf.Resources.resources
C:\Users\ski90\source\repos\dxf\dxf\obj\Debug\dxf.vbproj.GenerateResource.cache
C:\Users\ski90\source\repos\dxf\dxf\obj\Debug\dxf.vbproj.CoreCompileInputs.cache
C:\Users\ski90\source\repos\dxf\dxf\obj\Debug\dxf.vbproj.CopyComplete
C:\Users\ski90\source\repos\dxf\dxf\obj\Debug\dxf.exe
C:\Users\ski90\source\repos\dxf\dxf\obj\Debug\dxf.xml
C:\Users\ski90\source\repos\dxf\dxf\obj\Debug\dxf.pdb
C:\Users\lucam\source\repos\dxf\dxf\bin\Debug\dxf.exe.config
C:\Users\lucam\source\repos\dxf\dxf\bin\Debug\dxf.exe
C:\Users\lucam\source\repos\dxf\dxf\bin\Debug\dxf.pdb
C:\Users\lucam\source\repos\dxf\dxf\bin\Debug\dxf.xml
C:\Users\lucam\source\repos\dxf\dxf\bin\Debug\netDxf.dll
C:\Users\lucam\source\repos\dxf\dxf\bin\Debug\netDxf.xml
C:\Users\lucam\source\repos\dxf\dxf\obj\Debug\dxf.vbproj.AssemblyReference.cache
C:\Users\lucam\source\repos\dxf\dxf\obj\Debug\dxf.Form1.resources
C:\Users\lucam\source\repos\dxf\dxf\obj\Debug\dxf.Resources.resources
C:\Users\lucam\source\repos\dxf\dxf\obj\Debug\dxf.vbproj.GenerateResource.cache
C:\Users\lucam\source\repos\dxf\dxf\obj\Debug\dxf.vbproj.CoreCompileInputs.cache
C:\Users\lucam\source\repos\dxf\dxf\obj\Debug\dxf.exe
C:\Users\lucam\source\repos\dxf\dxf\obj\Debug\dxf.xml
C:\Users\lucam\source\repos\dxf\dxf\obj\Debug\dxf.pdb
C:\Users\lucam\source\repos\dxf\dxf\obj\Debug\dxf.vbproj.Up2Date

Binary file not shown.

26
dxf/obj/Debug/dxf.xml Normal file
View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>
dxf
</name>
</assembly>
<members>
<member name="T:dxf.My.Resources.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:dxf.My.Resources.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:dxf.My.Resources.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
</members>
</doc>

View File

@@ -0,0 +1,7 @@
' <autogenerated/>
Option Strict Off
Option Explicit On
Imports System
Imports System.Reflection
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName:=".NET Framework 4.7.2")>

Binary file not shown.

4
dxf/packages.config Normal file
View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="netDxf" version="2022.11.2" targetFramework="net472" />
</packages>