Flamingo & Dodo workbench(s) discussion thread

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
regis
Posts: 655
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Flamingo (Workbench) discussion thread

Postby regis » Mon Aug 28, 2017 1:48 pm

Can someone summerize in a small paragraph what the Flamingo workbench is all about, and what it is expected to do?
thschrader
Posts: 1394
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Flamingo (Workbench) discussion thread

Postby thschrader » Mon Aug 28, 2017 2:02 pm

regis wrote:
Mon Aug 28, 2017 1:48 pm
Can someone summerize in a small paragraph what the Flamingo workbench is all about, and what it is expected to do?
With flamingo-wb you can easy generate complete frames/pipe-systems. Draw the system-axes
with draft/sketcher. Than you can "fill-in" the profile/pipes with flamingo and after that you can
trim/manipulate them. Further info see oddtopus-manuals on git:
https://github.com/oddtopus/flamingo
pics are taken from flamingo-manual
pipe.PNG
pipe.PNG (35.56 KiB) Viewed 1216 times
frame.PNG
frame.PNG (261.39 KiB) Viewed 1216 times
oddtopus
Posts: 116
Joined: Tue Sep 20, 2016 6:17 pm

Re: Flamingo (Workbench) discussion thread

Postby oddtopus » Thu Aug 31, 2017 6:13 pm

thschrader wrote:
Sun Aug 27, 2017 10:26 pm
there is an interesting approach for using flamingo:
https://forum.freecadweb.org/viewtopic. ... 13#p188413
Nice application. And that's also show how mixing the features of the different contributions it's possible to achieve complex results.
That's what I most appreciate in FreeCAD: the plurality of tools available.

Let me also suggest a different way to do it:
1) create a circle with Draft workbench of the same diameter of the bar, let's say 20 mm;
2) as you already did, create the Profile_set with Flamingo workbench and drag the circle in it;
3) with the "Frame Manager" tool, create one frame-line object, with the circle as .Profile. No need to define one Path.
4) select all the lines of the warped grid and press [Insert] again in the dialog. The name of the frame-line object just created should be already selected in the combo-box.

In this way the rebars will be created all at once and conveniently collected in one group in the model's tree.
You can also add later other rebars to the same frame-line group with the same procedure.

The only headache is that edges must be selected one by one with the cursor because if you select them dragging a box over them or selecting them in the model tree, it's the "Line" object itself that is selected, not its edge! It may sound like a joke of words but actually it's the way how this tool works.
I'll try to improve that so that creating such rebars can be even simpler.
oddtopus
Posts: 116
Joined: Tue Sep 20, 2016 6:17 pm

Re: Flamingo (Workbench) discussion thread

Postby oddtopus » Sat Sep 02, 2017 9:09 am

I did some work on the issue of creating rebars with Flamingo tools and these are the result: two new possibilities.

The first is the one already explained in the previous post, but with the addition that to create the rods it's no more necessary to create separately the profile and then drag it inside the Profile_set group, because I added to the "Insert Std. Sections" dialog the REBARS type with some of the most common diameters.
It's worth to remember that you can modify the file ../Mod/flamingo/tables/Section_REBARS.csv to add other diameters. You may also add your own customized table in a new file; for example ../tables/Section_custom-bars.csv.

The second approach deals with "PypeLine Manager". With the previous method you can only use straight bars because in FrameLines there are no curves: now it's possible to insert pipes with ID=0 (see the rating class REBARS, that is defined in the file ../tables/Pipe_REBARS.csv), so with that it's possible to create also bended rebars, as it is necessary in common jobs.
Also remember that it's possible to change the "Bend Radius" property to your needs and then [Redraw] the PypeLine to apply the change.

To use the methods above it's necessary to update the workbench to the last commit (90th) because the object pipeFeatures.Pipe had to be modified to accept ID=0; otherwise an error will be issued.

One final note: by the way I cleaned-up the workbench from 2 or 3 useless and duplicated commands. Some icons and their order have changed but it's possible to do the same operations as before with the remaining tools. Anyway, the APPENDIX in tutorialOverall.pdf is already up-to-date for reference.
thschrader
Posts: 1394
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Flamingo (Workbench) discussion thread

Postby thschrader » Sat Sep 02, 2017 1:02 pm

Hi oddtopus,
just updated flamingo.
Wire/Dwire works with the new rebars, but when I take the circle
I still get a straight one (diameter circle=100 mm, rebar length=314 mm)
thomas
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11939 (Git)
Build type: Release
Branch: master
Hash: 6e7952ec672895900eec0c2a25807b25befba818
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
flamingo_rebars.JPG
flamingo_rebars.JPG (133.9 KiB) Viewed 1126 times
oddtopus
Posts: 116
Joined: Tue Sep 20, 2016 6:17 pm

Re: Flamingo (Workbench) discussion thread

Postby oddtopus » Sat Sep 02, 2017 6:38 pm

Use the second method, i.e. the one with "pipelines". It will create the bends at intersections automatically.

Pipes and beams are not intended to lay on curved edges in flamingo. For that, use the sweep tool of Part.

Take your time to practice ;)
oddtopus
Posts: 116
Joined: Tue Sep 20, 2016 6:17 pm

Re: Flamingo (Workbench) discussion thread

Postby oddtopus » Sat Nov 11, 2017 7:22 pm

WARNING: during some experiment with new features (here) I realized that the shortcuts "ESC", "S" and "RETURN" used in Frametool's dialogs raise exceptions under Windows OS. :oops:
For this reason I will remove asap those callbacks, from next commit of the workbench until I catch the bug.
In the meantime, I apologise to Windows users and suggest to use the buttons in the dialog (to exit, select the reference or perform the command respectively) in order to avoid possible instability of the application.
oddtopus
Posts: 116
Joined: Tue Sep 20, 2016 6:17 pm

Re: Flamingo (Workbench) discussion thread

Postby oddtopus » Mon Nov 13, 2017 4:51 pm

The callbacks issue is patched with commit 92.
Keyboard shortcuts are disabled when running under Windows (at least until I find a more reliable mechanism of callback) but are still available in other cases.
Anyway the same functions can be accomplished with push-buttons in all OS.
renatorivo
Posts: 2096
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Flamingo (Workbench) discussion thread

Postby renatorivo » Fri Nov 24, 2017 11:14 pm

Since to implement other unified profiles in Flamingo, you must implement ArchProfile.py and profiles.csv first.
I did some tests, I implemented profiles L, Z, T, C.

OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12619 (Git)
Build type: Release
Branch: master
Hash: b3631e134be8bfade0534f2dc0ee668ae71a223f
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: Italian/Italy (it_IT)

For those who want try, here are the files.


ArchProfile.py

Code: Select all

#***************************************************************************
#*                                                                         *
#*   Copyright (c) 2011                                                    *
#*   Yorik van Havre <yorik@uncreated.net>                                 *
#*                                                                         *
#*   This program is free software; you can redistribute it and/or modify  *
#*   it under the terms of the GNU Lesser General Public License (LGPL)    *
#*   as published by the Free Software Foundation; either version 2 of     *
#*   the License, or (at your option) any later version.                   *
#*   for detail see the LICENCE text file.                                 *
#*                                                                         *
#*   This program is distributed in the hope that it will be useful,       *
#*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
#*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
#*   GNU Library General Public License for more details.                  *
#*                                                                         *
#*   You should have received a copy of the GNU Library General Public     *
#*   License along with this program; if not, write to the Free Software   *
#*   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  *
#*   USA                                                                   *
#*                                                                         *
#***************************************************************************

import FreeCAD, Draft, os
from FreeCAD import Vector
import csv

if FreeCAD.GuiUp:
    import FreeCADGui
    from PySide import QtCore, QtGui
    from DraftTools import translate
    from PySide.QtCore import QT_TRANSLATE_NOOP
else:
    # \cond
    def translate(ctxt,txt):
        return txt
    def QT_TRANSLATE_NOOP(ctxt,txt):
        return txt
    # \endcond

## @package ArchProfile
#  \ingroup ARCH
#  \brief Profile tools for ArchStructure
#
#  This module provides tools to build base profiles
#  for Arch Strucutre elements

__title__="FreeCAD Profile"
__author__ = "Yorik van Havre"
__url__ = "http://www.freecadweb.org"

# Presets in the form: Class, Name, Profile type, [profile data]
# Search for profiles.csv in data/Mod/Arch/Presets and in the same folder as this file
profilefiles = [os.path.join(FreeCAD.getResourceDir(),"Mod","Arch","Presets","profiles.csv"),
                os.path.join(os.path.dirname(__file__),"Presets","profiles.csv")]

def readPresets():
    Presets=[]
    for profilefile in profilefiles:
        if os.path.exists(profilefile):
            try:
                with open(profilefile, "r") as csvfile:
                    beamreader = csv.reader(csvfile)
                    bid=1 #Unique index
                    for row in beamreader:
                        if row[0].startswith("#"):
                            continue
                        try:
                            r=[bid, row[0], row[1], row[2]]
                            for i in range(3,len(row)):
                                r=r+[float(row[i])]
                            if not r in Presets:
                                Presets.append(r)
                            bid=bid+1
                        except ValueError:
                            print("Skipping bad line: "+str(row))
            except IOError:
                print("Could not open ",profilefile)
    return Presets

def makeProfile(profile=[0,'REC','REC100x100','R',100,100]):
    '''makeProfile(profile): returns a shape  with the face defined by the profile data'''
    obj = FreeCAD.ActiveDocument.addObject("Part::Part2DObjectPython",profile[2])
    obj.Label = translate("Arch",profile[2])
    if profile[3]=="C":
        _ProfileC(obj, profile)
    elif profile[3]=="H":
        _ProfileH(obj, profile)
    elif profile[3]=="R":
        _ProfileR(obj, profile)
    elif profile[3]=="RH":
        _ProfileRH(obj, profile)
    elif profile[3]=="U":
        _ProfileU(obj, profile)
    elif profile[3]=="L":
        _ProfileL(obj, profile)
    elif profile[3]=="T":
        _ProfileT(obj, profile)
    elif profile[3]=="Z":
        _ProfileZ(obj, profile)
    elif profile[3]=="CC":
        _ProfileCC(obj, profile)
    else :
        print("Profile not supported")
    if FreeCAD.GuiUp:
        Draft._ViewProviderDraft(obj.ViewObject)
    return obj

class _Profile(Draft._DraftObject):
    '''Superclass for Profile classes'''

    def __init__(self,obj, profile):
        self.Profile=profile
        Draft._DraftObject.__init__(self,obj,"Profile")
        
            
class _ProfileC(_Profile):
    '''A parametric circular tubeprofile. Profile data: [Outside diameter, Inside diameter]'''

    def __init__(self,obj, profile):
        obj.addProperty("App::PropertyLength","OutDiameter","Draft",QT_TRANSLATE_NOOP("App::Property","Outside Diameter")).OutDiameter = profile[4]
        obj.addProperty("App::PropertyLength","Thickness","Draft",QT_TRANSLATE_NOOP("App::Property","Wall thickness")).Thickness = profile[5]
        _Profile.__init__(self,obj,profile)

    def execute(self,obj):
        import Part
        pl = obj.Placement
        c1=Part.Circle()
        c1.Radius=obj.OutDiameter.Value
        c2=Part.Circle()
        c2.Radius=obj.OutDiameter.Value-2*obj.Thickness.Value
        cs1=c1.toShape()
        cs2=c2.toShape()
        p=Part.makeRuledSurface(cs2,cs1)
        obj.Shape = p
        obj.Placement = pl
        
class _ProfileH(_Profile):
    '''A parametric H or I beam profile. Profile data: [width, height, web thickness, flange thickness] (see http://en.wikipedia.org/wiki/I-beam for reference)'''

    def __init__(self,obj, profile):
        obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4]
        obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5]
        obj.addProperty("App::PropertyLength","WebThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the web")).WebThickness = profile[6]
        obj.addProperty("App::PropertyLength","FlangeThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the flanges")).FlangeThickness = profile[7]
        _Profile.__init__(self,obj,profile)

    def execute(self,obj):
        import Part
        pl = obj.Placement
        p1 = Vector(-obj.Width.Value/2,-obj.Height.Value/2,0)
        p2 = Vector(obj.Width.Value/2,-obj.Height.Value/2,0)
        p3 = Vector(obj.Width.Value/2,(-obj.Height.Value/2)+obj.FlangeThickness.Value,0)
        p4 = Vector(obj.WebThickness.Value/2,(-obj.Height.Value/2)+obj.FlangeThickness.Value,0)
        p5 = Vector(obj.WebThickness.Value/2,obj.Height.Value/2-obj.FlangeThickness.Value,0)
        p6 = Vector(obj.Width.Value/2,obj.Height.Value/2-obj.FlangeThickness.Value,0)
        p7 = Vector(obj.Width.Value/2,obj.Height.Value/2,0)
        p8 = Vector(-obj.Width.Value/2,obj.Height.Value/2,0)
        p9 = Vector(-obj.Width.Value/2,obj.Height.Value/2-obj.FlangeThickness.Value,0)
        p10 = Vector(-obj.WebThickness.Value/2,obj.Height.Value/2-obj.FlangeThickness.Value,0)
        p11 = Vector(-obj.WebThickness.Value/2,(-obj.Height.Value/2)+obj.FlangeThickness.Value,0)
        p12 = Vector(-obj.Width.Value/2,(-obj.Height.Value/2)+obj.FlangeThickness.Value,0)
        p = Part.makePolygon([p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p1])
        p = Part.Face(p)
        #p.reverse()
        obj.Shape = p
        obj.Placement = pl

class _ProfileR(_Profile):
    '''A parametric rectangular beam profile based on [Width, Height]'''

    def __init__(self,obj, profile):
        obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4]
        obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5]
        _Profile.__init__(self,obj,profile)

    def execute(self,obj):
        import Part
        pl = obj.Placement
        p1 = Vector(-obj.Width.Value/2,-obj.Height.Value/2,0)
        p2 = Vector(obj.Width.Value/2,-obj.Height.Value/2,0)
        p3 = Vector(obj.Width.Value/2,obj.Height.Value/2,0)
        p4 = Vector(-obj.Width.Value/2,obj.Height.Value/2,0)
        p = Part.makePolygon([p1,p2,p3,p4,p1])
        p = Part.Face(p)
        #p.reverse()
        obj.Shape = p
        obj.Placement = pl

class _ProfileRH(_Profile):
    '''A parametric Rectangular hollow beam profile. Profile data: [width, height, thickness]'''

    def __init__(self,obj, profile):
        obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4]
        obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5]
        obj.addProperty("App::PropertyLength","Thickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the sides")).Thickness = profile[6]
        _Profile.__init__(self,obj,profile)

    def execute(self,obj):
        import Part
        pl = obj.Placement
        p1 = Vector(-obj.Width.Value/2,-obj.Height.Value/2,0)
        p2 = Vector(obj.Width.Value/2,-obj.Height.Value/2,0)
        p3 = Vector(obj.Width.Value/2,obj.Height.Value/2,0)
        p4 = Vector(-obj.Width.Value/2,obj.Height.Value/2,0)
        q1 = Vector(-obj.Width.Value/2+obj.Thickness.Value,-obj.Height.Value/2+obj.Thickness.Value,0)
        q2 = Vector(obj.Width.Value/2-obj.Thickness.Value,-obj.Height.Value/2+obj.Thickness.Value,0)
        q3 = Vector(obj.Width.Value/2-obj.Thickness.Value,obj.Height.Value/2-obj.Thickness.Value,0)
        q4 = Vector(-obj.Width.Value/2+obj.Thickness.Value,obj.Height.Value/2-obj.Thickness.Value,0)
        p = Part.makePolygon([p1,p2,p3,p4,p1])
        q = Part.makePolygon([q1,q2,q3,q4,q1])
        r = Part.Face([p,q])
        #r.reverse()
        obj.Shape = r
        obj.Placement = pl
        
class _ProfileU(_Profile):
    '''A parametric H or I beam profile. Profile data: [width, height, web thickness, flange thickness] (see  http://en.wikipedia.org/wiki/I-beam forreference)'''

    def __init__(self,obj, profile):
        obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4]
        obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5]
        obj.addProperty("App::PropertyLength","WebThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the webs")).WebThickness = profile[6]
        obj.addProperty("App::PropertyLength","FlangeThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the flange")).FlangeThickness = profile[7]
        _Profile.__init__(self,obj,profile)

    def execute(self,obj):
        import Part
        pl = obj.Placement
        p1 = Vector(-obj.Width.Value/2,-obj.Height.Value/2,0)
        p2 = Vector(obj.Width.Value/2,-obj.Height.Value/2,0)
        p3 = Vector(obj.Width.Value/2,obj.Height.Value/2,0)
        p4 = Vector(obj.Width.Value/2-obj.FlangeThickness.Value,obj.Height.Value/2,0)
        p5 = Vector(obj.Width.Value/2-obj.FlangeThickness.Value,obj.WebThickness.Value-obj.Height.Value/2,0)
        p6 = Vector(-obj.Width.Value/2+obj.FlangeThickness.Value,obj.WebThickness.Value-obj.Height.Value/2,0)
        p7 = Vector(-obj.Width.Value/2+obj.FlangeThickness.Value,obj.Height.Value/2,0)
        p8 = Vector(-obj.Width.Value/2,obj.Height.Value/2,0)
        p = Part.makePolygon([p1,p2,p3,p4,p5,p6,p7,p8,p1])
        p = Part.Face(p)
        #p.reverse()
        obj.Shape = p
        obj.Placement = pl

class _ProfileL(_Profile):
    '''A parametric L beam profile. Profile data: [width, height, web thickness]'''

    def __init__(self,obj, profile):
        obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4]
        obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5]
        obj.addProperty("App::PropertyLength","WebThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the webs")).WebThickness = profile[6]
        _Profile.__init__(self,obj,profile)

    def execute(self,obj):
        import Part
        pl = obj.Placement
        p1 = Vector(-obj.Width.Value/2,-obj.Height.Value/2,0)
        p2 = Vector(obj.Width.Value/2,-obj.Height.Value/2,0)
        p3 = Vector(obj.Width.Value/2,obj.Height.Value/2,0)
        p4 = Vector(obj.Width.Value/2-obj.WebThickness.Value,obj.Height.Value/2,0)
        p5 = Vector(obj.Width.Value/2-obj.WebThickness.Value,obj.WebThickness.Value-obj.Height.Value/2,0)
        p6 = Vector(-obj.Width.Value/2,obj.WebThickness.Value-obj.Height.Value/2,0)        
        p = Part.makePolygon([p1,p2,p3,p4,p5,p6,p1])
        p = Part.Face(p)
        #p.reverse()
        obj.Shape = p
        obj.Placement = pl
		
class _ProfileT(_Profile):
    '''A parametric T beam profile. Profile data: [width, height, web thickness]'''

    def __init__(self,obj, profile):
        obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4]
        obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5]
        obj.addProperty("App::PropertyLength","WebThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the web")).WebThickness = profile[6]
        _Profile.__init__(self,obj,profile)

    def execute(self,obj):
        import Part
        pl = obj.Placement
        p1 = Vector(-obj.Width.Value/2,-obj.Height.Value/2,0)
        p2 = Vector(obj.Width.Value/2,-obj.Height.Value/2,0)
        p3 = Vector(obj.Width.Value/2,(-obj.Height.Value/2)+obj.WebThickness.Value,0)
        p4 = Vector(obj.WebThickness.Value/2,(-obj.Height.Value/2)+obj.WebThickness.Value,0)
        p5 = Vector(obj.WebThickness.Value/2,obj.Height.Value/2,0)
        p6 = Vector(-obj.WebThickness.Value/2,obj.Height.Value/2,0)
        p7 = Vector(-obj.WebThickness.Value/2,(-obj.Height.Value/2)+obj.WebThickness.Value,0)
        p8 = Vector(-obj.Width.Value/2,(-obj.Height.Value/2)+obj.WebThickness.Value,0)
        p = Part.makePolygon([p1,p2,p3,p4,p5,p6,p7,p8,p1])
        p = Part.Face(p)
        #p.reverse()
        obj.Shape = p
        obj.Placement = pl
		
class _ProfileZ(_Profile):
    '''A parametric Z beam profile. Profile data: [width, height, web thickness, flange thickness]'''

    def __init__(self,obj, profile):
        obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4]
        obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5]
        obj.addProperty("App::PropertyLength","WebThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the web")).WebThickness = profile[6]
        obj.addProperty("App::PropertyLength","FlangeThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the flanges")).FlangeThickness = profile[7]
        _Profile.__init__(self,obj,profile)

    def execute(self,obj):
        import Part
        pl = obj.Placement
        p1 = Vector(-obj.WebThickness.Value/2,-obj.Width.Value/2,0)
        p2 = Vector(-obj.WebThickness.Value/2,(obj.Width.Value/2)-obj.FlangeThickness.Value,0)
        p3 = Vector(obj.WebThickness.Value/2-obj.Height.Value,(obj.Width.Value/2)-obj.FlangeThickness.Value,0)
        p4 = Vector(obj.WebThickness.Value/2-obj.Height.Value,obj.Width.Value/2,0)
        p5 = Vector(obj.WebThickness.Value/2,obj.Width.Value/2,0)
        p6 = Vector(obj.WebThickness.Value/2,obj.FlangeThickness.Value-obj.Width.Value/2,0)
        p7 = Vector(obj.Height.Value-obj.WebThickness.Value/2,obj.FlangeThickness.Value-obj.Width.Value/2,0)
        p8 = Vector(obj.Height.Value-obj.WebThickness.Value/2,-obj.Width.Value/2,0)
        p = Part.makePolygon([p1,p2,p3,p4,p5,p6,p7,p8,p1])
        p = Part.Face(p)
        #p.reverse()
        obj.Shape = p
        obj.Placement = pl		
		
class _ProfileCC(_Profile):
    '''A parametric C beam profile. Profile data: [width, height, web thickness, flange thickness]'''

    def __init__(self,obj, profile):
        obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4]
        obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5]
        obj.addProperty("App::PropertyLength","Thickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the web")).Thickness = profile[6]
        obj.addProperty("App::PropertyLength","FlangeThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the flanges")).FlangeThickness = profile[7]
        _Profile.__init__(self,obj,profile)

    def execute(self,obj):
        import Part
        pl = obj.Placement
        p1 = Vector(-obj.Height.Value/2,-obj.Width.Value/2,0)
    	p2 = Vector(-obj.Height.Value/2,obj.Width.Value/2,0)
        p3 = Vector(obj.Height.Value/2,obj.Width.Value/2,0) 
    	p4 = Vector(obj.Height.Value/2,obj.Width.Value/2-obj.Thickness.Value,0)
        p5 = Vector(obj.Height.Value/2-obj.FlangeThickness.Value,obj.Width.Value/2-obj.Thickness.Value,0)
    	p6 = Vector(obj.Height.Value/2-obj.FlangeThickness.Value,obj.Width.Value/2-obj.FlangeThickness.Value,0)
        p7 = Vector(obj.FlangeThickness.Value-obj.Height.Value/2,obj.Width.Value/2-obj.FlangeThickness.Value,0)
        p8 = Vector(obj.FlangeThickness.Value-obj.Height.Value/2,obj.FlangeThickness.Value-obj.Width.Value/2,0)
        p9 = Vector(obj.Height.Value/2-obj.FlangeThickness.Value,obj.FlangeThickness.Value-obj.Width.Value/2,0)
        p10 = Vector(obj.Height.Value/2-obj.FlangeThickness.Value,obj.Thickness.Value-obj.Width.Value/2,0)
        p11 = Vector(obj.Height.Value/2,obj.Thickness.Value-obj.Width.Value/2,0)
    	p12 = Vector(obj.Height.Value/2,-obj.Width.Value/2,0)
        p = Part.makePolygon([p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p1])
        p = Part.Face(p)
        #p.reverse()
        obj.Shape = p
        obj.Placement = pl
		
        
        

Freecad->Arch profiles.csv

Code: Select all

#Data structure:
#Category, Name, Profile class, geometric data...
#Possible profile classes are: 
#C=Circular tube
#H= H- or I-profile
#R= Rectangular
#RH= Rectangular hollow
#U= U-profile
#L= L-profile
#T= T-profile
#Z= Z-profile
#CC= CC-profile
###########################################
#Circular tube
#Category,Name,H,Outside diameter,Thickness
CTH,CTH423,C,42.4,3.2
#H- or I-profile
#Category,Name,H,width,height,web thickness,flange thickness
HEA,HEA100,H,100,96,5,8
HEA,HEA120,H,120,114,5,8
HEA,HEA140,H,140,133,5.5,8.5
HEA,HEA160,H,160,152,6,9
HEA,HEA180,H,180,171,6,9.5
HEA,HEA200,H,200,190,6.5,10
HEA,HEA220,H,220,210,7,11
HEA,HEA240,H,240,230,7.5,12
HEA,HEA260,H,260,250,7.5,12.5
HEA,HEA280,H,280,270,8,13
HEA,HEA300,H,300,290,8.5,14
HEA,HEA320,H,300,310,9,15.5
HEA,HEA340,H,300,330,9.5,16.5
HEA,HEA360,H,300,350,10,17.5
HEA,HEA400,H,300,390,11,19
HEA,HEA450,H,300,440,11.5,21
HEA,HEA500,H,300,490,12,23
HEA,HEA550,H,300,540,12.5,24
HEA,HEA600,H,300,590,13,25
HEA,HEA650,H,300,640,13.5,26
HEA,HEA700,H,300,690,14.5,27
HEA,HEA800,H,300,790,15,28
HEA,HEA900,H,300,890,16,30
HEA,HEA1000,H,300,990,16.5,31
HEA,HEAA100,H,100,91,4.2,5.5
HEA,HEAA120,H,120,109,4.2,5.5
HEA,HEAA140,H,140,128,4.3,6
HEA,HEAA160,H,160,148,4.5,7
HEA,HEAA180,H,180,167,5,7.5
HEA,HEAA200,H,200,186,5.5,8
HEA,HEAA220,H,220,205,6,8.5
HEA,HEAA240,H,240,224,6.5,9
HEA,HEAA260,H,260,244,6.5,9.5
HEA,HEAA280,H,280,264,7,10
HEA,HEAA300,H,300,283,7.5,10.5
HEA,HEAA320,H,300,301,8,11
HEA,HEAA340,H,300,320,8.5,11.5
HEA,HEAA360,H,300,339,9,12
HEA,HEAA400,H,300,378,9.5,13
HEA,HEAA450,H,300,425,10,13.5
HEA,HEAA500,H,300,472,10.5,14
HEA,HEAA550,H,300,522,11.5,15
HEA,HEAA600,H,300,571,12,15.5
HEA,HEAA650,H,300,620,12.5,16
HEA,HEAA700,H,300,670,13,17
HEA,HEAA800,H,300,770,14,18
HEA,HEAA900,H,300,870,15,20
HEA,HEAA1000,H,300,970,16,21
HEB,HEB100,H,100,100,6,10
HEB,HEB120,H,120,120,6.5,11
HEB,HEB140,H,140,140,7,12
HEB,HEB160,H,160,160,8,13
HEB,HEB180,H,180,180,8.5,14
HEB,HEB200,H,200,200,9,15
HEB,HEB220,H,220,220,9.5,16
HEB,HEB240,H,240,240,10,17
HEB,HEB260,H,260,260,10,17.5
HEB,HEB280,H,280,280,10.5,18
HEB,HEB300,H,300,300,11,19
HEB,HEB320,H,300,320,11.5,20.5
HEB,HEB340,H,300,340,12,21.5
HEB,HEB360,H,300,360,12.5,22.5
HEB,HEB400,H,300,400,13.5,24
HEB,HEB450,H,300,450,14,26
HEB,HEB500,H,300,500,14.5,28
HEB,HEB550,H,300,550,15,29
HEB,HEB600,H,300,600,15.5,30
HEB,HEB650,H,300,650,16,31
HEB,HEB700,H,300,700,17,32
HEB,HEB800,H,300,800,17.5,33
HEB,HEB900,H,300,900,18.5,35
HEB,HEB1000,H,300,1000,19,36
HEM,HEM160,H,166,180,14,23
HEM,HEM180,H,186,200,14.5,24
HEM,HEM200,H,206,220,15,25
HEM,HEM220,H,226,240,15.5,26
HEM,HEM240,H,248,270,18,32
HEM,HEM260,H,268,290,18,32.5
HEM,HEM280,H,288,310,18.5,33
HEM,HEM300,H,310,340,21,39
HEM,HEM320,H,309,359,21,40
HEM,HEM340,H,309,377,21,40
HEM,HEM360,H,308,395,21,40
HEM,HEM400,H,307,432,21,40
HEM,HEM450,H,307,478,21,40
HEM,HEM500,H,306,524,21,40
HEM,HEM550,H,306,572,21,40
HEM,HEM600,H,305,620,21,40
HEM,HEM650,H,305,668,21,40
HEM,HEM700,H,304,716,21,40
HEM,HEM800,H,303,814,21,40
HEM,HEM900,H,302,910,21,40
HEM,HEM1000,H,302,1008,21,40
INP,INP80,H,42,80,3.9,5.9
INP,INP100,H,50,100,4.5,6.8
INP,INP120,H,58,120,5.1,7.7
INP,INP140,H,66,140,5.7,8.6
INP,INP160,H,74,160,6.3,9.5
INP,INP180,H,82,180,6.9,10.4
INP,INP200,H,90,200,7.5,11.3
INP,INP220,H,98,220,8.1,12.2
INP,INP240,H,106,240,8.7,13.1
INP,INP260,H,113,260,9.4,14.1
INP,INP280,H,119,280,10.1,15.2
INP,INP300,H,125,300,10.8,16.2
INP,INP320,H,131,320,11.5,17.3
INP,INP340,H,137,340,12.2,18.3
INP,INP360,H,143,360,13,19.5
INP,INP380,H,149,380,13.7,20.5
INP,INP400,H,155,400,14.4,21.6
IPE,IPE100,H,55,100,4.1,5.7
IPE,IPE120,H,64,120,4.4,6.3
IPE,IPE140,H,73,140,4.7,6.9
IPE,IPE160,H,82,160,5,7.4
IPE,IPE180,H,91,180,5.3,8
IPE,IPE200,H,100,200,5.6,8.5
IPE,IPE220,H,110,220,5.9,9.2
IPE,IPE240,H,120,240,6.2,9.8
IPE,IPE270,H,135,270,6.6,10.2
IPE,IPE300,H,150,300,7.1,10.7
IPE,IPE330,H,160,330,7.5,11.5
IPE,IPE360,H,170,360,8,12.7
IPE,IPE400,H,180,400,8.6,13.5
IPE,IPE450,H,190,450,9.4,14.6
IPE,IPE500,H,200,500,10.2,16
IPE,IPE550,H,210,550,11.1,17.2
IPE,IPE600,H,220,600,12,19
IPE,IPEA100,H,55,98,3.6,4.7
IPE,IPEA120,H,64,118,3.8,5.1
IPE,IPEA140,H,73,138,3.8,5.6
IPE,IPEA160,H,82,157,4,5.9
IPE,IPEA180,H,91,177,4.3,6.5
IPE,IPEA200,H,100,197,4.5,7
IPE,IPEA220,H,110,217,5,7.7
IPE,IPEA240,H,120,237,5.2,8.3
IPE,IPEA270,H,135,267,5.5,8.7
IPE,IPEA300,H,150,297,6.1,9.2
IPE,IPEA330,H,160,327,6.5,10
IPE,IPEA360,H,170,357.6,6.6,11.5
IPE,IPEA400,H,180,397,7,12
IPE,IPEA450,H,190,447,7.6,13.1
IPE,IPEA500,H,200,497,8.4,14.5
IPE,IPEA550,H,210,547,9,15.7
IPE,IPEA600,H,220,597,9.8,17.5
IPE,IPEO180,H,89,182,6.4,9.5
IPE,IPEO200,H,102,202,6.2,9.5
IPE,IPEO220,H,112,222,6.6,10.2
IPE,IPEO240,H,122,242,7,10.8
IPE,IPEO270,H,136,274,7.5,12.2
IPE,IPEO300,H,152,304,8,12.7
IPE,IPEO330,H,162,334,8.5,13.5
IPE,IPEO360,H,172,364,9.2,14.7
IPE,IPEO400,H,182,404,9.7,15.5
IPE,IPEO450,H,192,456,11,17.6
IPE,IPEO500,H,202,506,12,19
IPE,IPEO550,H,212,556,12.7,20.2
IPE,IPEO600,H,224,610,15,24
IPE,IPER140,H,72,142,5.3,7.8
IPE,IPER160,H,81,162,5.6,8.5
IPE,IPER180,H,92,183,6,9
IPE,IPER200,H,98,204,6.6,10.5
IPE,IPER220,H,108,225,6.7,11.8
IPE,IPER240,H,118,245,7.5,12.3
IPE,IPER270,H,133,276,7.1,13.1
IPE,IPER300,H,147,306,8.5,13.7
IPE,IPER330,H,158,336,9.2,14.5
IPE,IPER360,H,168,366,9.9,16
IPE,IPER400,H,178,407,10.6,17
IPE,IPER450,H,188,458,11.3,18.6
IPE,IPER500,H,198,508,12.6,20
IPE,IPER550,H,210,560,14,22.2
IPE,IPER600,H,218,608,14,23
IPE,IPEV400,H,182,408,10.6,17.5
IPE,IPEV450,H,194,460,12.4,19.6
IPE,IPEV500,H,204,514,14.2,23
IPE,IPEV550,H,216,566,17.1,25.2
IPE,IPEV600,H,228,618,18,28
IPE,IPE750x137,H,263,753,11.5,17
IPE,IPE750x147,H,265,753,13.2,17
IPE,IPE750x161,H,266,758,13.8,19.3
IPE,IPE750x173,H,267,762,14.4,21.6
IPE,IPE750x185,H,267,766,14.9,23.6
IPE,IPE750x196,H,268,770,15.6,25.4
IPE,IPE750x210,H,268,775,16,28
IPE,IPE750x222,H,269,778,17,29.5
#Rectangular
#Category,Name,R,width,height
REC,1x2in,R,19,28
REC,1x3in,R,19,64
REC,1x4in,R,19,89
REC,1x6in,R,19,89
REC,1x8in,R,19,140
REC,1x10in,R,19,184
REC,1x12in,R,19,286
REC,2x2in,R,38,38
REC,2x3in,R,38,64
REC,2x4in,R,38,89
REC,2x6in,R,38,140
REC,2x8in,R,38,184
REC,2x10in,R,38,235
REC,2x12in,R,38,286
REC,4x4in,R,89,89
REC,4x6in,R,89,140
REC,6x6in,R,140,140
REC,8x8in,R,184,184
#RH-profile
#Category,Name,RH,width,height,thickness
RHS,RHS120x90x3,RH,120,80,3
RHS,RHS120x80x5,RH,120,80,5
RHS,RHS120x80x8,RH,120,80,8
RHS,RHS120x100x4,RH,120,100,4
RHS,RHS120x100x5,RH,120,100,5
RHS,RHS140x80x5,RH,140,80,5
RHS,RHS150x100x5,RH,150,100,5
RHS,RHS150x100x10,RH,150,100,10
RHS,RHS160x80x5,RH,160,80,5
RHS,RHS180x100x6,RH,180,100,6
RHS,RHS180x120x6,RH,180,120,6
RHS,RHS200x80x6,RH,200,80,6
RHS,RHS200x100x10,RH,200,100,10
#U-profile
#Category,Name,U,width,height,web thickness,flange thickness
UPE,UPE80,U,80,50,4,7
UPE,UPE100,U,100,55,4.5,7.5
UPE,UPE120,U,120,60,5,8
UPE,UPE140,U,140,65,5,9
UPE,UPE160,U,160,70,5.5,9.5
UPE,UPE180,U,180,75,5.5,10.5
UPE,UPE200,U,200,80,6,11
UPE,UPE220,U,220,85,6.5,12
UPE,UPE240,U,240,90,7,12.5
UPE,UPE270,U,270,95,7.5,13.5
UPE,UPE300,U,300,100,9.5,15
UPE,UPE330,U,330,105,11,16
UPE,UPE360,U,360,110,12,17
UPE,UPE400,U,400,115,13.5,18
#L-profile
#Category,Name,L,width,height,thickness
L,L25x15x3,L,25,15,3
L,L25x15x4,L,25,15,4
L,L25x15x5,L,25,15,5
L,L30x20x3,L,30,20,3
L,L30x20x4,L,30,20,4
L,L30x20x5,L,30,20,5
L,L40x20x4,L,40,20,4
L,L40x20x5,L,40,20,5
L,L45x30x4,L,45,30,4
L,L45x30x5,L,45,30,5
L,L45x30x6,L,45,30,6
L,L50x30x5,L,50,30,5
L,L50x30x6,L,50,30,6
L,L60x30x5,L,60,30,5
L,L60x30x6,L,60,30,6
L,L60x40x5,L,60,40,5
L,L60x40x6,L,60,40,6
L,L60x50x8,L,60,50,8
L,L80x40x6,L,80,40,6
L,L80x40x8,L,80,40,8
L,L100x50x10,L,100,50,10
L1,L10x2,L,10,10,2
L1,L12x2,L,12,12,2
L1,L12x3,L,12,12,3
L1,L15x2,L,15,15,2
L1,L15x3,L,15,15,3
L1,L15x4,L,15,15,4
L1,L20x2,L,20,20,2
L1,L20x3,L,20,20,3
L1,L20x4,L,20,20,4
L1,L20x5,L,20,20,5
#T-profile
#Category,Name,T,width,height,thickness
T,T15x3,T,15,15,3
T,T20x3,T,20,20,3
T,T20x4,T,20,20,4
T,T25x3.5,T,25,25,3.5
T,T25x4.5,T,25,25,4.5
T,T30x3,T,30,30,3
T,T30x4,T,30,30,4
T,T30x5,T,30,30,5
T,T35x3.5,T,35,35,3.5
T,T35x4,T,35,35,4
T,T35x4.5,T,35,35,4.5
T,T40x4,T,40,40,4
T,T40x5,T,40,40,5
T,T40x6,T,40,40,6
T,T50x6,T,50,50,6
T,T50x7,T,50,50,7
T,T60x7,T,60,60,7
T,T60x8,T,60,60,8
T,T70x8,T,70,70,8
T,T70x9,T,70,70,9
T,T80x9,T,80,80,9
T,T80x10,T,80,80,10
T,T100x11,T,100,100,11
T1,T30x4,T,30,30,4
T1,T35x4.5,T,35,35,4.5
T1,T40x5,T,40,40,5
T1,T50x6,T,50,50,6
T1,T60x7,T,60,60,7
T1,T70x8,T,70,70,8
T1,T80x9,T,80,80,9
#Z-profile
#Category,Name,Z,width,height,web thickness,flange thickness
ZNP,ZNP3,Z,30,38,4,4.5
ZNP,ZNP4,Z,40,40,4.5,5
ZNP,ZNP5,Z,50,43,5,5.5
ZNP,ZNP6,Z,60,45,5,6
ZNP,ZNP8,Z,80,50,6,7
ZNP,ZNP10,Z,100,55,6.5,8
ZNP,ZNP12,Z,120,60,7,9
ZNP,ZNP14,Z,140,65,8,10
#CC-profile
#Category,Name,Z,width,height,web thickness,flange thickness
CC,C40,CC,40,20,10,1.5
CC,C40,CC,40,20,10,2
CC,C30,CC,30,30,10,1.5
CC,C30,CC,30,30,10,2
CC,C30,CC,30,30,10,2.5
CC,C30,CC,30,30,10,3
CC,C40,CC,40,40,15,1.5
CC,C40,CC,40,40,15,2.5
CC,C40,CC,40,40,15,3
CC,C60,CC,60,40,20,2
CC,C60,CC,60,40,20,2.5
CC,C60,CC,60,40,20,3
Flamingo section

Section_L.csv

Code: Select all

SSize;stype;H;W;ta;tf
L25x15x3;L;25;15;3;3
L25x15x4;L;25;15;4;4
L25x15x5;L;25;15;5;5
L30x20x3;L;30;20;3;3
L30x20x4;L;30;20;4;4
L30x20x5;L;30;20;5;5
L40x20x4;L;40;20;4;4
L40x20x5;L;40;20;5;5
L45x30x4;L;45;30;4;4
L45x30x5;L;45;30;5;5
L45x30x6;L;45;30;6;6
L50x30x5;L;50;30;5;5
L50x30x6;L;50;30;6;6
L60x30x5;L;60;30;5;5
L60x30x6;L;60;30;6;6
L60x40x5;L;60;40;5;5
L60x40x6;L;60;40;6;6
L60x50x8;L;60;50;8;8
L80x40x6;L;80;40;6;6
L80x40x8;L;80;40;8;8
L100x50x10;L;100;50;10;10
Section_T.csv

Code: Select all

SSize;stype;H;W;ta;tf
T15x3;T;15;15;3;3
T20x3;T;20;20;3;3
T20x4;T;20;20;4;4
T25x3.5;T;25;25;3.5;3.5
T25x4.5;T;25;25;4.5;4.5
T30x3;T;30;30;3;3
T30x4;T;30;30;4;4
T30x5;T;30;30;5;5
T35x3.5;T;35;35;3.5;3.5
T35x4;T;35;35;4;4
T35x4.5;T;35;35;4.5;4.5
T40x4;T;40;40;4;4
T40x5;T;40;40;5;5
T40x6;T;40;40;6;6
T50x6;T;50;50;6;6
T50x7;T;50;50;7;7
T60x7;T;60;60;7;7
T60x8;T;60;60;8;8
T70x8;T;70;70;8;8
T70x9;T;70;70;9;9
T80x9;T;80;80;9;9
T80x10;T;80;80;10;10
T100x11;T;100;100;11;11
Section_Z.csv

Code: Select all

SSize;stype;H;W;ta;tf
ZNP3;Z;30;38;4;4.5
ZNP4;Z;40;40;4.5;5
ZNP5;Z;50;43;5;5.5
ZNP6;Z;60;45;5;6
ZNP8;Z;80;50;6;7
ZNP10;Z;100;55;6.5;8
ZNP12;Z;120;60;7;9
ZNP14;Z;140;65;8;10
Section_CC.csv

Code: Select all

SSize;stype;H;W;ta;tf
C40x20x10x1.5;CC;20;40;10;1.5
C40x20x10x2;CC;20;40;10;2
C30x30x10x1.5;CC;30;30;10;1.5
C30x30x10x2;CC;30;30;10;2
C30x30x30x2.5;CC;30;30;10;2.5
C30x30x10x3;CC;30;30;10;3
C40x40x15x1.5;CC;40;40;15;1.5
C40x40x15x2.5;CC;40;40;15;2.5
C40x40x15x3;CC;40;40;15;3
C60x40x20x2;CC;40;60;20;2
C60x40x20x2.5;CC;40;60;20;2.5
C60x40x20x3;CC;40;60;20;3
struttureL.png
struttureL.png (19.86 KiB) Viewed 863 times
struttureT.png
struttureT.png (25.53 KiB) Viewed 863 times
struttureC.png
struttureC.png (27.93 KiB) Viewed 863 times
Renato
thschrader
Posts: 1394
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Flamingo (Workbench) discussion thread

Postby thschrader » Sat Nov 25, 2017 12:26 pm

Hi Renato,
thank you very much for the new profile-tables.
I have no experience with python-coding. Is there a chance
to get the new data via addon-manager/flamingo?
Thomas