Flamingo Workbench/fr

Introduction
L'atelier Flamingo est un ensemble de commandes et objets FreeCAD personnalisés qui permettent principalement d'accélérer la conception de charpentes et de pipelines.

L'atelier "Flamingo" est dédié aux versions utilisant la syntaxe Python >2.7 et la boîte à outils Qt4.

L'atelier "Dodo" est pour Python >3.6 et Qt5.

Par commodité, les outils Flamingo/Dodo sont groupés dans trois barres d'outils et menus + un ensemble utilitaire.


 * Outils Frame : ils visent à organiser les cadres, les structures et autres éléments similaires dans FreeCAD à l'aide des objets Structure du module Arch. .../flamingo/tutorials/tutorialFrame.pdf
 * Outils Pype : C’est la suite logique des outils Frame, car ils traitent de la création de pipelines et de structures tubulaires. Ils disposent également de ses propres classes Python pour créer les objets de tuyauterie, tels que des tubes, des coudes, des brides, etc. .../flamingo/tutorials/tutorialPype2.pdf
 * Outils Eagle : C'est essentiellement un ajout et un raccourci vers l'atelier très professionnel FreeCAD-PCB (également disponible dans le référentiel des add-ons FreeCAD) pour importer la position des objets d’un fichier Eagle .brd vers un dessin PCB dans FreeCAD avec l'atelier a.m. en relation seulement par leurs noms. C'est aussi l'origine, par extension, du nom de l'ensemble de l'atelier. .../flamingo/tutorials/tutorialEagle.pdf
 * La barre d’outils Utilitaires fournit certaines fonctionnalités permettant d’interroger les objets du modèle et leur distance, pour déplacer/pivoter le plan de travail et un petit extrait de la boîte de dialogue de création DWire du module Draft, qui permet de modifier la position du plan de travail à la volée.

Références

 * Auteur : oddtopus
 * Code source sur github :

https://github.com/oddtopus/flamingo

https://github.com/oddtopus/dodo

Installation
Cet atelier est facile à installer et à mettre à jour à partir de l'Addon Manager disponible dans FreeCAD 0.17 et supérieur. Pour les utilisateurs de FreeCAD 0.16 et les autres méthodes d'installation, reportez-vous à la section Installation de contenu additionnel. Plus précisément, la page de téléchargement de GitHub contient des instructions d’installation : téléchargez le fichier Zip, décompressez-le et placez le dossier flamingo-master dans votre répertoire. Si le répertoire n'existe pas, créez-le par  sur Ubuntu.

Outils Frame



 * 1) Placement d'une poutre sur un bord (classe frameIt)

Avec un objet poutre et une arête dans le modèle, cet outil pose la poutre sur l'arête en les sélectionnant l'une après l'autre jusqu'à ce que vous appuyiez sur ESC.


 * 2) Remplissage du cadre (classe fillFrame)

Boîte de dialogue permettant de créer sur plusieurs arêtes sélectionnées dans la fenêtre les poutres du type de celles précédemment choisies parmi celles présentes dans le modèle.

Avec le bouton Sélectionner, il est possible de changer le type de poutre.


 * 3) Insérer un chemin (classe insertPath)

Outil permettant de créer un fil DWire continu sur le chemin défini par les arêtes sélectionnées dans la fenêtre, même si celles-ci ne se touchent pas, se croisent au milieu ou appartiennent à des objets différents. La seule contrainte est qu'il existe une intersection entre deux arêtes consécutives, dans l'ordre dans lequel elles ont été sélectionnées. De plus, le DWire donne les propriétés d'affichage d'une ligne centrale, c'est-à-dire orange et pointillé.


 * 4) Insérer des Sections Std. (classe insertSection)

Boîte de dialogue permettant de créer un ensemble de profils à utiliser dans le modèle pour l'objet FrameLine. D'autres tables de profils peuvent être créées en ajoutant le fichier .csv approprié dans le dossier /tables. Les règles permettant de créer ou de personnaliser de tels tables sont similaires à celles relatives aux pipelines.
 * Liste des Sections : comprend toutes les sections définies dans le fichier .csv correspondant au type de section sélectionné.
 * Liste des types de section : types de profils définis avec les fichiers .csv inclus dans le dossier /tables
 * Bouton Insérer : crée le groupe "Profiles_set", s'il n'existe pas déjà, et y ajoute l'objet du profil sélectionné.

D'autres profils peuvent être dessinés dans le modèle et glissés dans le groupe "Profiles_set".

L'orientation des fils DWires peut influer sur le rendu des poutres.


 * 5) Gestionnaire FrameLine (classe FrameLineManager)

Comme pour les objets "pype-line", il s'agit d'une boîte de dialogue permettant de créer et de modifier les propriétés des objets "frame-line".

De même que ce qui a été vu ci-dessus, les FrameLine sont des objets qui collectent des propriétés communes à un ensemble de poutres (à savoir la section de la poutre), qui sont incluses dans un groupe commun de l'arborescence du modèle. Elles ont également une propriété facultative ".Base", définie par défaut sur Aucune, qui est la ligne médiane des poutres du cadre. Une fois qu'un chemin, alias .Base, est défini (un DWire ou un Sketch), d'autres poutres peuvent être ajoutées à la FrameLine, mais elles seront supprimés sur demande de Redessiner. La boîte de dialogue offre les fonctionnalités suivantes : Si le nom d'un objet FrameLine est modifié, le nom du groupe approprié changera automatiquement, mais pas l'inverse.
 * une liste des profils de poutres précédemment inclus dans le modèle par la boîte de dialogue "Insérer des sections standard" (lire plus loin) ;
 * une liste déroulante pour sélectionner la FrameLine active parmi celles déjà créées ou pour en créer une nouvelle ;
 * une zone de texte où écrire le nom de la FrameLine à créer ; si rien ou " ", la FrameLine sera nommée par défaut "Telaio00n" ;
 * Bouton Insérer : crée un nouvel objet FrameLine ou ajoute de nouveaux membres à celui sélectionné dans la liste déroulante si des arêtes sont sélectionnées dans la fenêtre active.
 * Bouton Redessiner : crée de nouvelles poutres et les place sur le chemin sélectionné. De nouvelles poutres seront collectés à l'intérieur du groupe FrameLine. Ne crée pas et ne met pas à jour les poutres ajoutées à FrameLine en dehors de son chemin défini.
 * Bouton Effacer : supprime toutes les poutres du groupe FrameLine. Cela s'applique également aux poutres ajoutées à la FrameLine en dehors de son chemin défini.
 * Bouton Obtenir Path : assigne le Dwire sélectionné à l'attribut Path de l'objet FrameLine.
 * Bouton Obtenir profil : modifie l'attribut Profil de l'objet FrameLine par celui de la poutre sélectionnée dans la fenêtre ou celle sélectionnée dans la liste.
 * Case à cocher Copier le profil : si cette case est cochée, un nouvel objet de profil est généré pour chaque poutre afin d’éviter les références multiples dans le modèle.
 * Case Déplacer vers l'origine : si cochée, déplace le centre de gravité du profil vers le système d'origine des coordonnées : le centre de la poutre coïncide avec le centre de gravité du profil.


 * 6) Gestionnaire FrameBranch

Semblable à la fonction analogue du menu Pype, il s’agit d’un conteneur pour les poutres structurées sur une .Base. La base peut être un DWire, une esquisse ou aussi les bords d’une forme solide.

7) Tourner poutres par 45 deg. (classe spinSect)

Outil pour faire tourner un objet de 45 degrés autour de l’axe "Z" de sa forme.


 * 8) Inversion d'orientation (classe reverseBeam)

Outil permettant de faire pivoter un objet de 180 degrés autour de l’axe "X" de sa forme. Notes : si un bord de l'objet est sélectionné, il est utilisé comme pivot de rotation.


 * 9) Shift the beam (class shiftBeam)

Dialog to translate and copy objects.

X, Y and Z textboxes for direct input the amount of translation in each direction.

Multiple textbox is the multiple coefficient of the translation amount.

Steps textbox is the denominator of the translation amount. It's used when the amount of translation is to be covered in some steps.

Get displacement button to take the amount and direction of translation from the distance of selected entities (points, edges, faces) or even from a single edge. In the latter case, a green arrow is displayed to show the direction.

OK to perform the action and Cancel to close the dialog.


 * 13) Rotate + mate the edges (class rotJoin)

Tool to translate and rotate the beams to mate two edges. Same as above but it also makes the edges co-linear.


 * 10) Pivoter la poutre (classe pivotBeam)

Boîte de dialogue permettant de faire pivoter une poutre ou un autre objet sur l’un de ses bords.

Zone de texte Angle pour insérer l'angle de rotation.

Bouton Inverser pour tourner dans le sens opposé, si nécessaire.

OK pour effectuer l'action et sur Annuler pour fermer la boîte de dialogue.


 * 11) Affleurer les surfaces (class levelBeam)

Outil pour affleurer les faces parallèles de deux objets. Actuellement la commande prend ce qui est au même niveau, respecte la position et l'orientation de la première face sélectionnée, le centre de gravité de toutes les faces sélectionnées. Ainsi, elle translate les objets même si les faces ne sont pas parallèles.


 * 12) fusionner les arêtes (class alignEdge)

Tool to mate two parallel edges. Actually the command moves the objects along the minimum distance of their selected edge to the first one. Thus it translates the object even if edges are not parallel and it's a good way to place objects in desired position. It is also possible to select two edges of the same objects. With this method is possible to move quickly one object by steps defined on its own geometry.


 * 14) alignFlange (classe alignFlange)

Boîte de dialogue pour faire pivoter les poutres de sorte que leurs surfaces soient parallèles à un plan de référence.

Il est possible de présélectionner la face de référence avant d'appeler la commande.

Les trois boutons XY, XZ et YZ permettent de choisir directement l’orientation des plans principaux comme référence.

Enfin, il est possible d'entrer directement la nouvelle orientation des faces à l'aide des trois coordonnées du repère cartésien et du bouton Régler repère cartésien.


 * 15) Stretch the beam (class stretchBeam)

Dialog to change the length of beams.

In the textbox write the new length that will be applied to selected beams or pipes. Otherwise Get Length button takes the new length from the selected geometry (either the length of a beam or edge or the distance between geometric entities).

With the slider it's possible to change the length wirtten in the text-box from -100% to +100%.

Radio buttons Head and Tail allow to choose the side of the beam that will be changed.


 * 16) Extend the beam (class extend)

Dialog to extend one beam to one selected target.

If entities are preselected before calling this command, the first entity is automatically taken as target and the object attached to it is removed from the selection set. In any case it's possible to change the target object with the push-button Select.


 * 17) Adjust frames' angle (class adjustFrameAngle)

Tool to adjust the beams at square angles of frames. To understand at best how it works, refer to the previous tutorial.

Outils Tuyauteries



 * 1) Ajouter un tube

Opens a dialog to insert tubes.

The top-right combo is a common feature for all "Insert ..." dialogs: it lists the pype-line objects defined in the current document: with this it's possible to select to which pype-line to assign the newly created pipes. You can also leave it to so that the object is created on the root line of the part model. In the top-left corner is printed the currently selected pipe rating, taken from the listbox in the right column. Pipes dimensions for each pipe-rating are defined in .csv files, which is possible to add or modify, with few simple naming rules, according needs. Curves, reductions etc. have the same rules for definition of their tables of dimensions: see files in ../Mod/flamingo/Tables. Read also "tutorialPype.pdf" to know how to customize or create them.

To define position and orientation of pipes, following selections are possible: If no length is specified, the default is 200 units (just a convenient length, in mm).
 * one or more straight edges
 * one or more curved edges
 * one or more vertexes
 * nothing; in this case the tube will be placed at origin.

Reverse button allow to rotate by 180° the last tube created or those currently selected.

Apply button allow to apply a different lenght or Nominal diameter to the tubes currently selected.


 * 2) Ajouter un coude

Opens a dialog to insert one elbow.

Beside the common widgets with other "Insert..." dialogs, the Trim/Extend button allow to adjust the length of selected pipes to the selected edge of the curve. To define position and orientation following selections are possible: If no angle is specified the default is 90 degrees.
 * one vertex,
 * one circular edge
 * one pipe at one of its ends; in this case the curve's diameter and thickness will automatically fit those of the selected pipe
 * a pair of edges or pipes or beams, also not contiguous but intersecting; in this case curve's properties will automatically fit to connect the two selected objects; also selected pipes will be automatically trimmed or extended to the curve's edges
 * nothing; in this case the curve will be placed at origin.


 * 3) Ajouter une réduction

Opens a dialog to insert concentric reductions.

To define position and orientation following selections are possible: two pipes parallel (possibly co-linear) In case one pipe is selected, its properties are applied to the reduction.
 * one pipe at one of its ends
 * one pipe
 * one circular edge
 * one straight edge
 * one vertex
 * nothing (created at origin)

In case two pipes are selected, the tool will try automatically to connect them with the right major and minor diameter.


 * 4) Ajouter une tape

Opens dialog to insert caps.

To define position and orientation following selections are possible: one or more curved edges (axis and origin across the center) one or more vertexes nothing If a pipe edge is selected the caps' properties will automatically fit to those of the pipe.


 * 5) Ajouter une vanne

Create a "placeholder" of a valve from a .csv table like above. Beside the offset dimension, it's important because it defines also the Kv coefficient that will be used to calculate pressure losses with the relevant tool in "Utils" menu. Note that the symbol of the placeholder changes according the type of the valve, if in its name is found one keyword among "ball", "butterfly" or "globe".


 * 6) Ajouter une bride

Opens dialog to insert flanges. To define position and orientation following selections are possible: In case one pipe is selected, its properties are applied to the flange.
 * one or more circular edges,
 * one or more vertexes,
 * nothing.


 * 7) Ajouter un boulon-U

Opens dialog to insert U-bolts.

To define position and orientation following selections are possible: In case one pipe is selected, its properties are aplied to the U-bolt. Moreover it's possible to choose to place the U-bolt at the Head or Tail ends or in the Middle of the pipes by checking the relevant box.
 * one or more circular edges
 * one or more pipes
 * nothing.

With '''Ref. face''' button it's possible to select the face of the support to which to orient the U-bolt axis.

Only in dodo: the above piping components can be inserted also wfrom the dedicated pie-menu.


 * 8) PypeLine Manager

Before talking about the dialog it's worth to recall what the pype-line object is in the context of Flamingo workbench.

This object represent a collection of objects "PType" that are updated with the methods defined in the Python class itself. At present time it creates, with the method "obj.Proxy.update(obj,[edges])", pipes and curves over the given edges and collect them in a group named according the object's obj.Label. A standard bending radius "3D" (i.e. 1.5xO.D.) is applied for curves. The Bend Radius is a common property of object pype-line, thus it can be changed and then redrawn. When the Label of the object pype-line is renamed, the name of its group is changed accordingly.

The class PypeLine2 has also the optional attribute ".Base", which namely represent the centerline of the piping:
 * If Base is None, PypeLine2 behaves like a bare container of objects, with possibility to group them automatically, assign one color and extract the part-list.
 * .Base can be a Wire or a Sketch or any object which has edges in its Shape.
 * Running "obj.Proxy.update(obj)", without any [edges], the class attempts to render the pypeline (Pipe and Elbow objects) on the "obj.Base" edges: for well defined geometries this usually leads to the desired result. If [edges] are given, pipes and curves will be drawn along them.
 * Running "obj.Proxy.purge(obj)" deletes from the model all Pipes and Elbows that belongs to the pype-line.
 * Remember that the object created outside the .Base won't be updated when the .Base is changed and the pypeline is redrawn and (except pipe and curves) won't be deleted if the pype-line is purged.

This understood, the command opens the dialog to create or modify one pype-line.

The dialog is very similar to those for insert other objects seen before.

The pipe ratings tables, where the O.D. and thickness are defined, are the same of those for tubes (e.g. Pipe_SCH-STD.csv).

When is in the combo and Insert is pressed, a new pype-line object is created in the document with the relevant group.

It is possible to create one pypeline in three ways, according to the objects selected in the viewport when Insert is pushed: After that it's still possible to add other objects (such as Flange, Reduct...) using the relevant insertion commands described above. When objects are created within a pype-line they are automatically included in the relevant group of the model and the common properties (i.e. O.D., thickness, color, bending radius etc.) are applied.
 * nothing is selected. One pype-line is created with property .Base = None and included in its group with the specified name and color (or default values). The piping objects to populate it can be created one-by-one with the commands seen above or alternatively a centerline can be selected afterwards with Get Profile and Redraw buttons.
 * one DWire object is selected. It is automatically taken as Base and converted in a Path (orange, dash-dotted) and pipes and curves are drawn along it.
 * a set of edges are selected (even not contiguous but anyway having intersections extending their ends). One Path is created connecting all the edges (see the Path tool in the Frame toolbar) and assigned as .Base to the newly created pype-line. Then pipes and curves are drawn on it as above.

If at least one pype-line is already in the model, that can be selected from the combo-box: in this case, pushing Insert creates the pipes and curves like described above but, instead of creating a new pype-line object, it adds them to the selected existing pype-line. Beware that the piping created in this way will be deleted at next Redraw.

Get Path, Get Profile and Color allow to change the .Base property, the nominal size and color of the object respectively.

Redraw re-create tubes and curves along the .Base (if defined) after any modification to the path or the properties of the pype-line.

Part list generates a .csv file with the bill of material of the piping object included in the pype-line selected in the combo.


 * 9) Insert a PypeBranch

This pype object behave like a PypeLine except it automatically updates whenever the Base (a DWire or a SketchObject) is modified: that includes changing the placement, stretching, moving, adding or deleting edges. It is mainly intended to represent the secondary branches of the PypeLine (see the dedicated tutorial) but it can also act as a stand-alone object. This is an important task that allow to change quickly the layout of pipes but, as a drawback, its geometry is more rigidly defined. In other words, pipes can not be splitted or resized independently because they will be eventually redrawn on the Base. Changin the OD, thk or BendRadius of the PypeBranch, instead, will apply on all tubes and curves of it.


 * 10) Insert a tank

See tutorial Part 4 (1/2)


 * 11) Insert a piperoute

See tutorial Part 4 (2/2)


 * 12) Break the pipe

Opens a dialog to break one pipe at a defined point, optionally making a gap between the ends of the two parts. Multiple selection is possible.

Insert in the Point text-box the length where the pipe or pipes are going to break: this can be an absolute value or just a percentage of the length (a numeral followed by %). In some case it's quicker to use the slide-bar at the bottom to change this value.

The Length button allow to measure the length of the selected pipe and use that as the reference of the slide-bar scale.

If it's needed just to break pipes in two, leave the Gap text-box to 0; otherwise define the length of the gap. If a reference length is choosen, also the gap can be defined as a percentage. As seen in the tutorial, it's possible to measure the gap from geometries in the model with the Get gap button: that's the distance between any geometric entity or even the length of a single edge.

Pushing on Break performs the action.

The Pypeline combo, as usual, allow to choose the group to which to assign the new objects created.


 * 13) Mate pipes edges.

When two circular edges belonging to different objects are selected, pressing this button will make the second object move to make the edges concentric and coplanar.

This works not only with pipes.


 * 14) Join the pypes

Joins the Ports of different objects in a graphical way. It works only among pype-objects, also from different workbenches, where the Ports[] property is defined congruently.


 * 15) Fit one elbow

Select 2 intersecting pipes + 1 elbow: executing this command, they will be joined. It works only among pype-objects, also from different workbenches.


 * 16) Extend pipes to intersection

By selecting two pipes, this command extend them both to their intersection point, if exists.


 * 17) Extend pipe to intersection

By selecting two pipes, this command extend the first to the intersection with the other, if exists.


 * 18) Lay-down the pipes

By selecting one face and multiple pipes, this command translates the pipe along the normal of the face in order to make them lie on its plane.


 * 19) Raise-up the support

Similar to the tool above but in this case is the support that is raised or lowered, so that the face is tangent to the pipe.
 * 20) Attach to tube

Attaches a pype object (2, 3, 4, 5 or 6) rigidly to the nearest end of a pipe (1). To detach, click on the button while the attached object is selected alone.
 * 21) Create pipes point-to-point

Opens a dialog similar to "Draw a DWire" together with the dialog of "Insert a pipe": this allows to draw a sequence of pipes, connected by curves, just selecting one point after the other. It is also allowed to change properties of the pipe and/or the pype-line on the fly.
 * 22) Insert Any Shape

This is a tool to create a "pype" object from a .STEP or .IGES or .BREP file. It loads the imported file into the Shape property of a FeaturePython.

Utilitaires



 * 1) Make a polygon

The first two tools of utils are part of a separate project which aims to create an automatic scanner of rooms with a stepper motor and an ultrasonic distance meter. This tool creates one regular polygon inside a sketch.


 * 2) Polygon from file

Tool to create any polygon inside a sketch taking vertexes from a .csv file, where they are stored in polar coordinates.
 * 3) Query the model

Tool to get various informations according to the object or objects selected. Beside length or distances, it is specifically suited to give informations related to beams and pipes (length, section, angle-between).


 * 4) Align workplane

Tool to set the position and rotation of working plane according to the selected existing geometry.

The normal of WP is defined scanning the elements in the following order:
 * 1) the normal of a face
 * 2) the normal of the plane of a curve
 * 3) the normal of the plane containing two segments

The origin of WP is defined (in order) by
 * 1) one vertex
 * 2) the center of curvature of a line
 * 3) the intersection of two lines
 * 4) the center of an edge


 * 5) Offset workplane

Shifts the WP along its normal vector. To show the direction of offset, a temporary green arrow is displayed on the screen. Clearly also negative values are allowed.


 * 6) Rotate workplane

Rotates the WP around one of its axis. Also in this case a green arrow is displayed in the viewport to identify the present orientation of the WP: the arrow is pointed in the Z direction and the long base of the arrow is layed over the X direction.


 * 7) Draw a DWire

This tool works exactly like the corresponding tool of Draft workbench but with few additional options at the end of the dialog. As default, the origin of WP is redefined at each point added because this makes simpler to draw segments of known length and orientation using the snap-to-grid option. Then two push-buttons, invoked also with the short-key Ctrl+Shift+, allow to rotate and offset the WP as seen above without breaking the DWire object. The last three buttons allow to quickly change the rotation of WP to be parallel to the principal planes.


 * 8) Quick move objects

To move quickly any part, to access the underlying objects for instance, this tool provides a graphic handle (green arrow) by clicking on which it's possible to displace and rotate the selected objects.


 * 9) Pressure loss calculator

Opens one dialog to calculate the pressure losses across the pype-parts selected in the viewport or across one PypeBranch. The friction coefficient is calculated for each straight tube and elbow. For other objects the concentrated pressure loss is calculated through the flow factor, provided that the attribute Kv is available and set to a positive value.

Liens

 * FreeCAD Forum: (Announcement thread)
 * Tutorials: https://github.com/oddtopus/flamingo/tree/master/tutorials
 * Videos:
 * Simple video tutorial for frame creation with pipes
 * How to lay down pipe lines
 * How to create a parametric base-frame
 * PART 3 Create a building with 4 sketches
 * PART 4 (1/2) Pump room layout
 * PART 4 (2/2) Pump room import in building and pipe-route


 * Files:
 * Reporting bugs: please report bugs to the Flamingo GH issue queue

Autres liens intéressants

 * DevWorkbenches: List of workbenches in development.
 * Macros recipes
 * OSE-Piping-Workbench: to create extra pipe fittings

Ateliers externes
Les ateliers FreeCAD sont faciles à programmer en Python, de ce fait de nombreuses personnes développent des ateliers supplémentaires en dehors des développeurs principaux de FreeCAD.

La page ateliers externes contient des informations et des tutoriels sur certains d’entre eux, et le projet FreeCAD Addons vise à les rassembler et à les rendre facilement installables depuis FreeCAD.

De nouveaux ateliers sont en développement, restez à l'écoute !