FreeCAD Logo FreeCAD 1.0
  • Anglais Afrikaans Arabe Biélorusse Catalan Tchèque Allemand Grec Espagnol Espagnol Basque Finnois Philippin Français Galicien Croate Hongrois Indonésien Italien Japonais Kabyle Coréen Lituanien Néerlandais Norvégien classique Polonais Portugais Portugais Roumain Russe Slovaque Slovène Serbe Suédois Turc Ukrainien Valencien Vietnamien Chinois Chinois
  • Fonctions
  • Télécharger
  • Blog
  • Documentation
    Index de la documentation Premiers pas Documentation pour les utilisateurs Manuel de FreeCAD Documentation des ateliers Documentation sur le codage en Python Documentation pour les développeurs Tutoriels Foire aux questions Politique de confidentialité À propos de FreeCAD
  • Contribuer
    Comment aider Sponsor Signaler un bogue Faire une demande de modification (PR) Emplois et financements Guide pour les contributions Manuel pour les développeurs Traductions
  • Communauté
    Code de conduite Forum The FPA GitHub GitLab Codeberg Mastodon Matrix IRC IRC via Webchat Gitter Discord Reddit Twitter Facebook LinkedIn Calendrier
  • ♥ Donate

Donate

$
Informations SEPA
Veuillez configurer votre virement bancaire SEPA pour:
Beneficiary: The FreeCAD project association
IBAN: BE04 0019 2896 4531
BIC/SWIFT: GEBABEBBXXX
Agence bancaire: BNP Paribas Fortis
Adresse: Rue de la Station 64, 1360 Perwez, Belgium

While Stripe doesn't support monthly donations, you can still become a sponsor! Simply make a one-time donation equivalent to 12 months of support, and you'll gain access to the corresponding sponsoring tier. It's an easy and flexible way to contribute.

If you are not sure or not able to commit to a regular donation, but still want to help the project, you can do a one-time donation, of any amount.

Choose freely the amount you wish to donate one time only.

You can support FreeCAD by sponsoring it as an individual or organization through various platforms. Sponsorship provides a steady income for developers, allowing the FPA to plan ahead and enabling greater investment in FreeCAD. To encourage sponsorship, we offer different tiers, and unless you choose to remain anonymous, your name or company logo will be featured on our website accordingly.

from 1 USD / 1 EUR per month. You will not have your name displayed here, but you will have helped the project a lot anyway. Together, normal sponsors maintain the project on its feet as much as the bigger sponsors.

from 25 USD / 25 EUR per month. Your name or company name is displayed on this page.

from 100 USD / 100 EUR per month. Your name or company name is displayed on this page, with a link to your website, and a one-line description text.

from 200 USD / 200 EUR per month. Your name or company name and logo displayed on this page, with a link to your website and a custom description text. Companies that have helped FreeCAD early on also appear under Gold sponsors.

Instead of donating each month, you might find it more comfortable to make a one-time donation that, when divided by twelve, would give you right to enter a sponsoring tier. Don't hesitate to do so!

Choose freely the amount you wish to donate each month.

Please inform your forum name or twitter handle as a notein your transfer, or reach to us, so we can give you proper credits!

Generic macro icon Wiki List Generator of Object Properties

Description
Cette macro génère la liste des propriétés de l'objet sélectionné. Liste présentée au format wiki dans la vue du rapport Python.

Version macro : 0.1
Date dernière modification : 2021-09
Auteur: Evgeniy
Auteur
Evgeniy
Téléchargement
None
Liens
Page des macros
Comment installer une macro
Comment créer une barre d'outils
Version Macro
0.1
Dernière modification
2021-09
Version(s) FreeCAD
None
Raccourci clavier
None
Voir aussi
Macro Wiki Object Properties List Generator

Description

Cette simple macro génère la liste des propriétés de l'objet sélectionné. La liste des paramètres est imprimée dans la Vue rapport de FreeCAD. Cet exemple est de nature plus pédagogique et n'est pas applicable pour une utilisation sans édition après génération, puisqu'il inclut absolument tous les paramètres de l'objet. Les listes de propriétés qui sont publiées dans ce wiki ne contiennent, en règle générale, que des paramètres uniques. Les paramètres hérités des objets parents ne sont pas publiés.

Utilisation

  • Préparation :
    • Copiez le code de la macro de cette page et placez-le dans un nouveau fichier *.FCMacro.
    • Enregistrez le fichier FCMacro. Et placez-le dans le dossier Macros de FreeCAD.
    • Désactiver la case à cocher Inclure un timecode pour chaque entrée dans Préférences -> Général -> Fenêtre de sortie (onglet).
  • Première utilisation :
    • Sélectionnez (ou créez et sélectionnez) l'objet dont vous avez besoin dans l'arborescence.
    • Sélectionnez l'élément Macro -> Macros... dans le menu principal.
    • Dans la fenêtre ouverte, trouvez le fichier *.FCMacro que vous avez sauvegardé et appuyez sur le bouton Lancer.
  • Comment l'utiliser à nouveau :
    • Pour exécuter rapidement cette macro à nouveau, vous pouvez utiliser le raccourci clavier Shift+Ctrl+1 (sous Windows) qui lancera la dernière macro exécutée.

Recommendations

Ne supprimez pas les espaces entre les lignes. Cela est nécessaire pour simplifier la traduction. Chaque ligne séparée par un espace sera considérée comme une partie distincte pour la traduction. Lorsque vous créez des textes, n'oubliez jamais que les grands fragments monolithiques de texte sont difficiles à traduire pour les traducteurs.

Exemples d'utilisation

  • Par exemple, ouvrez l'atelier Arch.
  • Créez un objet Structure.
  • Sélectionnez l'objet Structure créé.
  • Exécutez la macro.
  • Copiez le texte de la vue du rapport et collez-le dans une page wiki et vérifiez le résultat.

Résultats de l'utilisation

Les résultats peuvent ressembler à ceci :

Properties

View

  • VueProxy (PythonObject):

Component

  • VueUseMaterialColor (Bool): Use the material color as this object's shape color, if available

Display Options

  • VueBoundingBox (Bool): Display object bounding box
  • VueDisplayMode (Enumeration): Set the display mode
  • VueShowInTree (Bool): Show the object in the tree view
  • VueVisibility (Bool): Show the object in the 3d view

Nodes

  • VueNodeColor (Color): The color of the nodes line
  • VueNodeLine (Float): The width of the nodes line
  • VueNodeSize (Float): The size of the node points
  • VueNodeType (Enumeration): The type of structural node
  • VueShowNodes (Bool): If the nodes are visible or not

Object Style

  • VueAngularDeflection (Angle): Specify how finely to generate the mesh for rendering on screen or when exporting.

The default value is 28.5 degrees, or 0.5 radians. The smaller the value the smoother the appearance in the 3D view, and the finer the mesh that will be exported.

  • VueDeviation (FloatConstraint): Sets the accuracy of the polygonal representation of the model

in the 3D view (tessellation). Lower values indicate better quality. The value is in percent of object's size.

  • VueDiffuseColor (ColorList): Object diffuse color.
  • VueDrawStyle (Enumeration): Defines the style of the edges in the 3D view.
  • VueLighting (Enumeration): Set object lighting.
  • VueLineColor (Color): Set object line color.
  • VueLineColorArray (ColorList): Object line color array.
  • VueLineMaterial (Material): Object line material.
  • VueLineWidth (FloatConstraint): Set object line width.
  • VuePointColor (Color): Set object point color
  • VuePointColorArray (ColorList): Object point color array.
  • VuePointMaterial (Material): Object point material.
  • VuePointSize (FloatConstraint): Set object point size.
  • VueShapeColor (Color): Set shape color
  • VueShapeMaterial (Material): Shape material
  • VueTransparency (Percent): Set object transparency

Selection

  • VueOnTopWhenSelected (Enumeration): Enabled: Display the object on top of any other object when selected

Object: On top only if the whole object is selected Element: On top only if some sub-element of the object is selected

  • VueSelectable (Bool): Set if the object is selectable in the 3d view
  • VueSelectionStyle (Enumeration): Set the object selection style

Data

  • DonnéesPlacement (Placement):
  • DonnéesProxy (PythonObject):
  • DonnéesShape (Part::PropertyPartShape):
  • DonnéesVisibility (Bool):

Base

  • Données (Hidden)ExpressionEngine (ExpressionEngine): Property expressions
  • DonnéesLabel (String): User name of the object (UTF8)
  • Données (Hidden)Label2 (String): User description of the object (UTF8)

Component

  • DonnéesAdditions (LinkList): Other shapes that are appended to this object
  • DonnéesAxis (Link): An optional axis or axis system on which this object should be duplicated
  • DonnéesBase (Link): The base object this component is built upon
  • DonnéesCloneOf (Link): The object this component is cloning
  • DonnéesHiRes (Link): An optional higher-resolution mesh or shape for this object
  • DonnéesHorizontalArea (Area): The area of the projection of this object onto the XY plane
  • DonnéesMaterial (Link): A material for this object
  • DonnéesMoveBase (Bool): Specifies if moving this object moves its base instead
  • DonnéesMoveWithHost (Bool): Specifies if this object must move together when its host is moved
  • DonnéesPerimeterLength (Length): The perimeter length of the horizontal area
  • DonnéesStandardCode (String): An optional standard (OmniClass, etc...) code for this component
  • DonnéesSubtractions (LinkList): Other shapes that are subtracted from this object
  • DonnéesVerticalArea (Area): The area of all vertical faces of this object

IFC

  • DonnéesIfcData (Map): IFC data
  • DonnéesIfcProperties (Map): IFC properties of this object
  • DonnéesIfcType (Enumeration): The type of this object

IFC Attributes

  • DonnéesDescription (String): Description of IFC attributes are not yet implemented
  • DonnéesGlobalId (String): Description of IFC attributes are not yet implemented
  • DonnéesObjectType (String): Description of IFC attributes are not yet implemented
  • DonnéesPredefinedType (Enumeration): Description of IFC attributes are not yet implemented
  • DonnéesTag (String): Description of IFC attributes are not yet implemented

Structure

  • DonnéesFaceMaker (Enumeration): The facemaker type to use to build the profile of this object
  • DonnéesHeight (Length): The height or extrusion depth of this element. Keep 0 for automatic
  • DonnéesLength (Length): The length of this element, if not based on a profile
  • DonnéesNodes (VectorList): The structural nodes of this element
  • DonnéesNodesOffset (Distance): Offset distance between the centerline and the nodes line
  • DonnéesNormal (Vector): The normal extrusion direction of this object (keep (0,0,0) for automatic normal)
  • DonnéesProfile (String): A description of the standard profile this element is based upon
  • DonnéesTool (Link): An optional extrusion path for this element
  • DonnéesWidth (Length): The width of this element, if not based on a profile

Script

#! python
# -*- coding: utf-8 -*-
# (c) 2021 <Evgeniy> LG
from FreeCAD import Qt

def print_obj_properties(obj,typ):
   prop={}
   i=1
   for pr in obj.PropertiesList:
      tp = obj.getTypeIdOfProperty(pr) or ""
      atr = obj.getTypeOfProperty(pr) or ("")
      # Wiki template supports only Hidden type of property. But it can be as: Hidden,Output,Readonly etc...
      if atr != "" and atr[0] == "Hidden":
         atr = "|"+atr[0]
      else:
         atr = ""      
      prop[str(i)] = pr,obj.getGroupOfProperty(pr),tp.replace("App::Property",""),obj.getDocumentationOfProperty(pr),atr
      i+=1
   sorted_prop = sorted(prop.items(), key=lambda x: x[1][1])

   title=""
   for pr in sorted_prop:
      if title != pr[1][1]:
         title = pr[1][1]
         print("\n"+"{{TitleProperty{"+title+"}}")
      print("\n"+"* {{Property"+typ+"{"+pr[1][0]+"{"+pr[1][2]+pr[1][4]+"}}: "+pr[1][3])

print("\n"+"==Properties==")
print("\n"+"===View===")
obj = Gui.activeDocument().ActiveObject
print_obj_properties(obj,"View")
print("\n"+"===Data===")
obj = FreeCAD.activeDocument().ActiveObject
print_obj_properties(obj,"Data")

Liens

La discussion sur le forum : https://forum.freecad.org/viewtopic.php?f=21&t=61998

Cette page est extraite de https://wiki.freecad.org/Macro_Wiki_Object_Properties_List_Generator_Basic_Version

Contactez-nous !
Forum GitHub Mastodon Matrix IRC Gitter.im Discord Reddit Twitter Facebook LinkedIn

© L'équipe FreeCAD. Crédits des images de la page d'accueil (de haut en bas) : ppemawm, r-frank, epileftric, regis, rider_mortagnais, bejant.

Ce projet est soutenu par : , KiCad Services Corp. et autres parrains

GitHubAméliorer cette page sur GitHub