Remplir cartouche

Forum destiné aux questions et discussions en français
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Remplir cartouche

Post by mario52 »

Bonjour normandc
FreeCAD 0.14 2192(Git)
normandc wrote:As-tu essayé l'outil Draft-Drawing de l'atelier Draft
voiçi ce qui se passe avec un cercle (à peu près la même chose avec un box)

Traceback (most recent call last):
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3297, in onChanged
obj.ViewResult = self.updateSVG(obj)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3301, in updateSVG
svg = getSVG(obj.Source,obj.Scale,obj.LineWidth,obj.FontSize,obj.FillStyle,obj.Direction)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 1363, in getSVG
if getType(obj) == "Dimension":
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 163, in getType
if "Proxy" in obj.PropertiesList:
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'PropertiesList'
Traceback (most recent call last):
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3297, in onChanged
obj.ViewResult = self.updateSVG(obj)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3301, in updateSVG
svg = getSVG(obj.Source,obj.Scale,obj.LineWidth,obj.FontSize,obj.FillStyle,obj.Direction)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 1363, in getSVG
if getType(obj) == "Dimension":
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 163, in getType
if "Proxy" in obj.PropertiesList:
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'PropertiesList'
Traceback (most recent call last):
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3297, in onChanged
obj.ViewResult = self.updateSVG(obj)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3301, in updateSVG
svg = getSVG(obj.Source,obj.Scale,obj.LineWidth,obj.FontSize,obj.FillStyle,obj.Direction)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 1363, in getSVG
if getType(obj) == "Dimension":
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 163, in getType
if "Proxy" in obj.PropertiesList:
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'PropertiesList'
Traceback (most recent call last):
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3297, in onChanged
obj.ViewResult = self.updateSVG(obj)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3301, in updateSVG
svg = getSVG(obj.Source,obj.Scale,obj.LineWidth,obj.FontSize,obj.FillStyle,obj.Direction)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 1363, in getSVG
if getType(obj) == "Dimension":
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 163, in getType
if "Proxy" in obj.PropertiesList:
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'PropertiesList'
Traceback (most recent call last):
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3297, in onChanged
obj.ViewResult = self.updateSVG(obj)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3301, in updateSVG
svg = getSVG(obj.Source,obj.Scale,obj.LineWidth,obj.FontSize,obj.FillStyle,obj.Direction)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 1363, in getSVG
if getType(obj) == "Dimension":
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 163, in getType
if "Proxy" in obj.PropertiesList:
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'PropertiesList'
Traceback (most recent call last):
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3297, in onChanged
obj.ViewResult = self.updateSVG(obj)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3301, in updateSVG
svg = getSVG(obj.Source,obj.Scale,obj.LineWidth,obj.FontSize,obj.FillStyle,obj.Direction)
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 1363, in getSVG
if getType(obj) == "Dimension":
File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 163, in getType
if "Proxy" in obj.PropertiesList:
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'PropertiesList'

et avec le sketcher et l'outil "Drawing" (Inserrer une nouvelle feuille -> Inserrer une projection . . . . )
Fatal error occurred while projecting shape
Fatal error occurred while projecting shape
Fatal error occurred while projecting shape
Fatal error occurred while projecting shape

et mon petit programme ne fonctionne plus convenablement, il n'affiche plus le type de projection (US ou EU).
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Remplir cartouche

Post by NormandC »

Faudrait peut-être remonter à Yorik. Si ça fonctionnait avant, c'est peut-être lié au changement de bibliothèque tierce de PyQt à Pyside pour une question de licence par rapport à la distribution Debian. Debian and GPL again

Édition : j'ai posté un lien vers ici dans la discussion sur Debian et GPL.
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Remplir cartouche

Post by mario52 »

Bonjour
j'ai oublier je suis sur Vista SP2
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Remplir cartouche

Post by yorik »

Hello,
Il y a deux erreurs différentes la-dedans... La première ('NoneType' object has no attribute 'PropertiesList') est just cosmétique et némpêche pas les choses de fonctionner correctement. Mais j'ai corrigé ça hier justement, il ne devrait plus y avoir d'erreur maintenant.

La deuxième (Fatal error occurred while projecting shape) est un message d'opencascade il me semble... Il doit y avoir un problème dans tes shapes qui empêche de les projeter... En tous cas je viens de vérifier, il n'y a normalement pas de problèmes à utiliser l'outil Draft Drawing sur un sketch..
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Remplir cartouche

Post by mario52 »

Bonjour
yorikvanhavre wrote:Il doit y avoir un problème dans tes shapes qui empêche de les projeter
un simple cercle comme j'ai dit

ici version 0.13 1828
avec un cercle Sketch et "Placer les objets sélectionnés . . ." de Draft

FeaturePython::onChanged (ViewSketch): 'NoneType' object has no attribute 'PropertiesList'
FeaturePython::onChanged (ViewSketch): 'NoneType' object has no attribute 'PropertiesList'
FeaturePython::onChanged (ViewSketch): 'NoneType' object has no attribute 'PropertiesList'
FeaturePython::onChanged (ViewSketch): 'NoneType' object has no attribute 'PropertiesList'
FeaturePython::onChanged (ViewSketch): 'NoneType' object has no attribute 'PropertiesList'
FeaturePython::onChanged (ViewSketch): 'NoneType' object has no attribute 'PropertiesList'
1
1

ici un cercle Draft et "Placer les objets sélectionnés . . ." de Draft

FeaturePython::onChanged (ViewCircle): 'NoneType' object has no attribute 'PropertiesList'
FeaturePython::onChanged (ViewCircle): 'NoneType' object has no attribute 'PropertiesList'
FeaturePython::onChanged (ViewCircle): 'NoneType' object has no attribute 'PropertiesList'
FeaturePython::onChanged (ViewCircle): 'NoneType' object has no attribute 'PropertiesList'
FeaturePython::onChanged (ViewCircle): 'NoneType' object has no attribute 'PropertiesList'
FeaturePython::onChanged (ViewCircle): 'NoneType' object has no attribute 'PropertiesList'

est ce que ça a un rapport avec ceci "Wizard shaft not installed" qui s'affiche depuis quelque temps ?

cercle sketch et Drawing "Inserrer une projection orthogonale . . ." impeccable !
cercle Draft et Drawing "Inserrer une projection orthogonale . . ." impeccable !
et avec cette version mon programme n'a pas de problème.
yorikvanhavre wrote:Mais j'ai corrigé ça hier justement, il ne devrait plus y avoir d'erreur maintenant.
ou puis je télécharger ?
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Remplir cartouche

Post by mario52 »

Bonjour yorik

je viens d'installer la dernière version

OS: Windows Vista
Platform: 32-bit
Version: 0.14.3263
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.5.1
yorik wrote:La deuxième (Fatal error occurred while projecting shape) est un message d'opencascade il me semble... Il doit y avoir un problème dans tes shapes qui empêche de les projeter... En tous cas je viens de vérifier, il n'y a normalement pas de problèmes à utiliser l'outil Draft Drawing sur un sketch..
et j'obtient toujours la même erreur avec un sketch (un simple objet) que ce soit avec Part design ou Sketcher
Fatal error occurred while projecting shape
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
fmd14
Posts: 83
Joined: Tue Aug 25, 2015 3:50 pm

Re: Remplir cartouche

Post by fmd14 »

bonjour Mario52,


OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17



Est-ce que votre macro pour la modification du cartouche fonctionne sur une version 016
que l'extension faut-il mettre sur le fichier
Lors du lancement de celle ci j'ai un message "Erreur Cartouche" ligne 250
et de plus je n'arrive pas a modifier le cartouche
FMD14
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Remplir cartouche

Post by mario52 »

bonjour
j'ai copié la macro depuis le wiki Macro_CartoucheFC_Full et elle fonctionne sur toutes les versions (je n'ai eu aucune erreur)
et bonne chose avec la version de développement (0.17) la fonction symbole EU/US refonctionne comme dans la version 0.13

(PS:cette fonction n'est juste que pour la feuille A3 pour les autres formats il faut corriger les coordonnées XY du symbole)

le template français A3_Landscape_FR_Text_Complet_Without_convention sans symbole avec tous les champs à compléter
Cartouche_test00.png
Cartouche_test00.png (57.36 KiB) Viewed 2640 times
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
fmd14
Posts: 83
Joined: Tue Aug 25, 2015 3:50 pm

Re: Remplir cartouche

Post by fmd14 »

Bonjour Mario,

En changeant la page a3 il n'y plus d'erreur

est ce c'est compliqué de changer les coordonnées du symbole ?
et comment connaitre le celle-ci ?
est ce que peut le faire ?


Merci
FMD14
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Remplir cartouche

Post by mario52 »

Bonjour
content que ça fonctionne mais elle fonctionne avec les A4 Portrait et aussi A4 Landscape mais et il faut supprimer le symbole d'origine sinon ils se chevauchent

pour modifier les coordonnées :

1: sélectionnez la page
2: sélectionnez le symbole
3: modifiez les champs XY (0,0 = le point supérieur gauche de la feuille)
4: éventuellement modifier l'échelle avec Scale
CartoucheFC_Coord_00.png
CartoucheFC_Coord_00.png (25.91 KiB) Viewed 2627 times
PS: comme dit plus haut le symbole de convention fonctionne sur la version 0.17 et pas la version stable
quand j'aurai le temps j'essayerai d'adapter les distances du symbole automatiquement, plutôt que de prendre les dimension à partir de la gauche je vais prendre à partir de la droite et du cartouche, de temps en temps regardez s'il n'y a pas de mise à jour

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
Post Reply