Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum. Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

PRODUCTIQUE TOURNAGE


Information sur la source

Description

Cliquez pour voir la capture en taille normale
Voila mon programme permet de créer un programme ISO de tournage.
Dedans il y'a des controles utilisateurs style xp et une gestion de la memoire.
Son peut utiliser une richtextbox autrement merci dme le signaler.

 

Source

  • Petite partie du code :
  • Public Sub CreateCodeISO(Dec As Integer, AffiCoul As Integer, tAffiNom As Integer, tAffiNumBloc As Integer, tAffiComm As Integer, Comm As Integer, SautLigne As Integer)
  • 'Fonction qui crée le programme ISO
  • Dim strTemp As String
  • Dim strTemp2 As String
  • Dim strTemp3 As String
  • Dim strTemp4 As String
  • Dim intTemp As Integer
  • Dim intTemp2 As Integer
  • Dim intTemp3 As Integer
  • Dim intTemp4 As Integer
  • Dim intTemp5 As Integer
  • Dim comptBloc As Integer
  • Dim comptLigne As Integer
  • Dim tabTemp() As String
  • If AffiCoul = 0 Then
  • AffiNom = 0
  • AffiNumBloc = 0
  • AffiComm = 0
  • Else
  • AffiNom = tAffiNom
  • AffiNumBloc = tAffiNumBloc
  • AffiComm = tAffiComm
  • End If
  • strTemp3 = "\f1\par}"
  • comptBloc = 2
  • comptLigne = 0
  • intTemp4 = 0
  • If Dec = 1 Then intTemp4 = 7
  • With frmCodeISO.CodeISO
  • .TextRTF = ""
  • intTemp = 0
  • If AffiNom = 1 Then intTemp = 1
  • strTemp = "{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 " & optPolice & ";}{\f1\fswiss\fcharset0 Arial;}}{\colortbl ;\red128\green0\blue128;\red128\green0\blue0;\red0\green0\blue0;\red0\green0\blue128;}{\*\generator Msftedit 5.41.15.1503;}\viewkind4\uc1\pard\cf" & intTemp & "\lang1036\f0\fs20 " & NomProgramme & "\cf0\par"
  • intTemp = 0
  • If AffiNumBloc = 1 Then intTemp = 2
  • strTemp = strTemp & "\cf" & intTemp & Space(intTemp4) & " N10\cf0 G0 G52 X0 Z0 M9 G40 G80\cf2\par"
  • For b = 1 To NbrCycles
  • intTemp3 = tabNomCycles(b, 2) - tabNomCycles(b, 1)
  • intTemp = 0
  • intTemp2 = 0
  • If AffiNumBloc = 1 Then intTemp = 2
  • If AffiComm = 1 Then intTemp2 = 4
  • strTemp2 = ""
  • If SautLigne = 1 Then strTemp2 = "\par "
  • strTemp2 = strTemp2 & "\cf" & intTemp & Space(intTemp4) & " N" & comptBloc * 10 & "\cf0 " & tabProgramme(comptLigne)
  • If Comm = 1 Then strTemp2 = strTemp2 & " \cf" & intTemp2 & " ( " & tabNomCycles(b, 0) & " )"
  • strTemp2 = strTemp2 & "\par"
  • strTemp = strTemp & strTemp2
  • For c = tabNomCycles(b, 1) + 1 To tabNomCycles(b, 2)
  • comptBloc = comptBloc + 1
  • intTemp = 0
  • intTemp2 = 0
  • If AffiNumBloc = 1 Then intTemp = 2
  • If AffiComm = 1 Then intTemp2 = 4
  • strTemp4 = tabProgramme(c)
  • If Left(strTemp4, 1) = "@" Then
  • strTemp4 = Right(strTemp4, Len(strTemp4) - 1)
  • Select Case Left(strTemp4, 3) 'Fonctions spéciales
  • Case "G79"
  • intTemp5 = Right(strTemp4, Len(strTemp4) - 3)
  • strTemp4 = "G79 N" & (comptBloc + intTemp5 + 1) * 10
  • Case "G64"
  • tabTemp = Split(strTemp4, "/")
  • intTemp5 = tabTemp(4)
  • strTemp4 = "G64 N" & (comptBloc - intTemp5) * 10 & " N" & (comptBloc - 1) * 10 & " I" & tabTemp(1) & " K" & tabTemp(2) & " F" & tabTemp(3)
  • Case "G77"
  • tabTemp = Split(strTemp4, "/")
  • strTemp4 = "G77"
  • For d = 1 To UBound(tabTemp)
  • intTemp5 = tabTemp(d)
  • strTemp4 = strTemp4 & " N" & (comptBloc + intTemp5) * 10
  • Next d
  • End Select
  • End If
  • strTemp = strTemp & "\cf" & intTemp & Space(intTemp4) & " N" & comptBloc * 10 & "\cf0 " & strTemp4 & "\cf" & intTemp2 & " \par"
  • Next c
  • comptLigne = comptLigne + intTemp3 + 1
  • comptBloc = comptBloc + 1
  • Next b
  • If SautLigne = 1 Then strTemp = strTemp & "\par "
  • intTemp = 0
  • If AffiNumBloc = 1 Then intTemp = 2
  • strTemp = strTemp & "\cf" & intTemp & Space(intTemp4) & " N" & (DerniereLigneProg + 2) * 10 & "\cf0 M2\par"
  • .TextRTF = strTemp & strTemp3
  • End With
  • End Sub
Petite partie du code :

Public Sub CreateCodeISO(Dec As Integer, AffiCoul As Integer, tAffiNom As Integer, tAffiNumBloc As Integer, tAffiComm As Integer, Comm As Integer, SautLigne As Integer)
'Fonction qui crée le programme ISO

Dim strTemp As String
Dim strTemp2 As String
Dim strTemp3 As String
Dim strTemp4 As String
Dim intTemp As Integer
Dim intTemp2 As Integer
Dim intTemp3 As Integer
Dim intTemp4 As Integer
Dim intTemp5 As Integer
Dim comptBloc As Integer
Dim comptLigne As Integer
Dim tabTemp() As String

If AffiCoul = 0 Then
    AffiNom = 0
    AffiNumBloc = 0
    AffiComm = 0
Else
    AffiNom = tAffiNom
    AffiNumBloc = tAffiNumBloc
    AffiComm = tAffiComm
End If

strTemp3 = "\f1\par}"
comptBloc = 2
comptLigne = 0
intTemp4 = 0
If Dec = 1 Then intTemp4 = 7

With frmCodeISO.CodeISO
    .TextRTF = ""
    intTemp = 0
    If AffiNom = 1 Then intTemp = 1
    strTemp = "{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 " & optPolice & ";}{\f1\fswiss\fcharset0 Arial;}}{\colortbl ;\red128\green0\blue128;\red128\green0\blue0;\red0\green0\blue0;\red0\green0\blue128;}{\*\generator Msftedit 5.41.15.1503;}\viewkind4\uc1\pard\cf" & intTemp & "\lang1036\f0\fs20 " & NomProgramme & "\cf0\par"
    intTemp = 0
    If AffiNumBloc = 1 Then intTemp = 2
    strTemp = strTemp & "\cf" & intTemp & Space(intTemp4) & " N10\cf0  G0 G52 X0 Z0 M9 G40 G80\cf2\par"
    For b = 1 To NbrCycles
        intTemp3 = tabNomCycles(b, 2) - tabNomCycles(b, 1)
        intTemp = 0
        intTemp2 = 0
        If AffiNumBloc = 1 Then intTemp = 2
        If AffiComm = 1 Then intTemp2 = 4
        strTemp2 = ""
        If SautLigne = 1 Then strTemp2 = "\par "
        strTemp2 = strTemp2 & "\cf" & intTemp & Space(intTemp4) & " N" & comptBloc * 10 & "\cf0  " & tabProgramme(comptLigne)
        If Comm = 1 Then strTemp2 = strTemp2 & " \cf" & intTemp2 & "   ( " & tabNomCycles(b, 0) & " )"
        strTemp2 = strTemp2 & "\par"
        strTemp = strTemp & strTemp2
        For c = tabNomCycles(b, 1) + 1 To tabNomCycles(b, 2)
            comptBloc = comptBloc + 1
            intTemp = 0
            intTemp2 = 0
            If AffiNumBloc = 1 Then intTemp = 2
            If AffiComm = 1 Then intTemp2 = 4
            strTemp4 = tabProgramme(c)
            If Left(strTemp4, 1) = "@" Then
                strTemp4 = Right(strTemp4, Len(strTemp4) - 1)
                Select Case Left(strTemp4, 3) 'Fonctions spéciales
                    Case "G79"
                        intTemp5 = Right(strTemp4, Len(strTemp4) - 3)
                        strTemp4 = "G79 N" & (comptBloc + intTemp5 + 1) * 10
                    Case "G64"
                        tabTemp = Split(strTemp4, "/")
                        intTemp5 = tabTemp(4)
                        strTemp4 = "G64 N" & (comptBloc - intTemp5) * 10 & " N" & (comptBloc - 1) * 10 & " I" & tabTemp(1) & " K" & tabTemp(2) & " F" & tabTemp(3)
                    Case "G77"
                        tabTemp = Split(strTemp4, "/")
                        strTemp4 = "G77"
                        For d = 1 To UBound(tabTemp)
                            intTemp5 = tabTemp(d)
                            strTemp4 = strTemp4 & " N" & (comptBloc + intTemp5) * 10
                        Next d
                End Select
            End If
            strTemp = strTemp & "\cf" & intTemp & Space(intTemp4) & " N" & comptBloc * 10 & "\cf0  " & strTemp4 & "\cf" & intTemp2 & "  \par"
        Next c
        comptLigne = comptLigne + intTemp3 + 1
        comptBloc = comptBloc + 1
    Next b
    If SautLigne = 1 Then strTemp = strTemp & "\par "
    intTemp = 0
    If AffiNumBloc = 1 Then intTemp = 2
    strTemp = strTemp & "\cf" & intTemp & Space(intTemp4) & " N" & (DerniereLigneProg + 2) * 10 & "\cf0  M2\par"
    .TextRTF = strTemp & strTemp3
End With
End Sub

Conclusion

Mise a jour prévue pour le filtage bientot, ou si qq est motive pour le continuer (prévenez moi ^^).


 

Fichier Zip

Pour les "Membres Club", vous pouvez télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip

Commentaires et avis

signaler à un administrateur
Commentaire de pondpond le 30/12/2004 00:05:43

Ca m'a l'air sympatique !

J'ai fait une teminale STI Génie mécanique, et à cette époque j'avais fait un programme qui pourrait peut-être te servir :
En fait, il aidait à faire la description du profil fini de ta pièce de tournage.
Il générait la liste des coordonnés des points de ce profil en fonction d'un dessin que tu réalisais. Puis, il y avait possibilité de visualiser le résultat en 3D grâce à openGL.
Je ne l'ai pas mis sur VBfrance. Mais si çà t'interresse, contact moi.

Sinon, je ne note pas car c'est pas fini. Mais c'est bien parti !

Bonne progr !

signaler à un administrateur
Commentaire de BFR le 01/01/2005 12:00:23

Salut
Je suis tourneur sur CN et c'est pas mal du tout et un tres bonne base qui demande à etre develloper, moi meme j'ai créé des outils pour la CN (editeur de programme etc...) je t'encourage à continuer dans cette voie, il manque peut-etre un fichier d'aide et la programmation est claire et j'attend la suite

Franck

signaler à un administrateur
Commentaire de BFR le 01/01/2005 12:06:20

message pour pondpond
Salut
je suis moi meme intérressé par les sources de ton programme que tu as proposé a NeoUmbrella.
Merci d'avance
Franck

FBurl@aol.com

signaler à un administrateur
Commentaire de NeoUmbrella le 01/01/2005 15:53:03

Salut,
Merci pour vos commentaires, faut que je trouve le temps de le continuer mais il ne sera pas bcp amélioré du fait de mon experience en Productique.
Si tu peux me passer les sources de ton programme pondpond ca serait cool =)
BFR -> Les outils que tu as dévelopé sont en quel langage, si c'est en vb puis je avoir la source ?

Merci et bonne année ^^

signaler à un administrateur
Commentaire de setif le 07/04/2005 22:41:27

Salut
je suis moi meme intérressé par les sources de ton programme que tu as proposé a NeoUmbrella.

Merci d'avance

Ajouter un commentaire



Nos sponsors

Sondage...

CalendriCode

Janvier 2009
LMMJVSD
   1234
567891011
12131415161718
19202122232425
262728293031 

Consulter la suite du CalendriCode



Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel BAÏSE, Merci à Vincent pour ses précieux conseils
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés
Temps d'éxécution de la page : 0,250 sec

Google Coop CodeS-SourceS Google Coop CodeS-SourceS


Certaines images présentes sur le site (notament certains avatars) sont issues des collections IconShock, donc si vous souhaitez utiliser ces icons vous devez les acheter, ne les copiez pas et ne utilisez pas dans vos sites et applications sans les avoir commandé.