Capannone mettallico in FreeCad

Forum per le domande e le discussioni in Italiano
Forum rules
regole del forum e le informazioni utili

Importante: PRIMA di chiedere aiuto leggete qui!
User avatar
Anam
Posts: 39
Joined: Mon Mar 20, 2017 10:22 am
Location: Teramo, Italy

Re: Capannone mettallico in FreeCad

Postby Anam » Sun Nov 19, 2017 8:18 pm

Ecco il codice che disegna un profilo a L, come si fa a implementarlo ora ?

Code: Select all

## L-shaped
import Part
import math
from FreeCAD import Vector
#
#VALUES#
H=30.0   # mm Height
B=20.0   # mm Base
s= 4.0  # mm Thickness
# Coordinate dei punti nel sistema di riferimento con origine il punto 0
p0= Vector(0,0,0)
p1= Vector(s,0,0)
p2= Vector(s,H-s,0)
p3= Vector(B,H-s,0)
p4= Vector(B,H,0)
p5= Vector(0,H,0) 
#p= Part.makePolygon([p0,p1,p2,p3,p4,p5,p0])
#p= Part.Face(p)
#Part.show(p)
# Coordinate dei punti nel sistema di riferimento con origine il baricentro
VG=Vector(-(H*s**2/2+(B-s)*s*(s+(B-s)/2))/((B-s)*s+H*s),-(H**2*s/2+(B-s)*(H-s/2)*s)/((B-s)*s+H*s),0)
P0= p0.add(VG)
P1= p1.add(VG)
P2= p2.add(VG)
P3= p3.add(VG)
P4= p4.add(VG)
P5= p5.add(VG)
P= Part.makePolygon([P0,P1,P2,P3,P4,P5,P0])
P= Part.Face(P)
Part.show(P)
renatorivo
Posts: 2034
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Capannone mettallico in FreeCad

Postby renatorivo » Mon Nov 20, 2017 11:55 am

Anam wrote:
Sun Nov 19, 2017 8:18 pm
Ecco il codice che disegna un profilo a L
Buono, ho provato nella console Python, il codice funziona
test-struttura.png
test-struttura.png (90.92 KiB) Viewed 492 times
Anam wrote:
Sun Nov 19, 2017 8:18 pm
come si fa a implementarlo ora ?
Ho provato seguire le istruzioni di Yorik, ma per ora i miei tentativi sono falliti! :cry:

Ho visto che nel codice originale si inzia da p1 invece che da p0, ma anche modificando questo mi appaiono sempre errori.
User avatar
Anam
Posts: 39
Joined: Mon Mar 20, 2017 10:22 am
Location: Teramo, Italy

Re: Capannone mettallico in FreeCad

Postby Anam » Mon Nov 20, 2017 12:19 pm

bhe lo script serve giusto per disegnare una faccia e la numerazione dei punti poco importa se è coerente con la funzione che crea la polilinea. Se non ricordo male Yorik diceva che dovevamo costruire un classe e poi popolare il file csv. Mmm forse riesco a fare una classe ma non so usare i file csv. Appena possibile provo a condividere lo script nell’altro post, magari Yorik ci aiuta
renatorivo
Posts: 2034
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Capannone mettallico in FreeCad

Postby renatorivo » Mon Nov 20, 2017 1:27 pm

Anam wrote:
Mon Nov 20, 2017 12:19 pm
Appena possibile provo a condividere lo script nell’altro post, magari Yorik ci aiuta
Ok
Anam wrote:
Mon Nov 20, 2017 12:19 pm
ma non so usare i file csv
il file csv si trova ad esempio in C:\..\FreeCAD_0.17.12595_x64_dev_win\data\Mod\Arch\Presets
è un semplice elenco dei dati del profilo (categoria, nome, classe, lato a, lato b, s ,ecc.) separati da una virgola, e ogni riga definisce un profilo.
Se si riesci a implementare la classe siamo a cavallo
renatorivo
Posts: 2034
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Capannone mettallico in FreeCad

Postby renatorivo » Mon Nov 20, 2017 10:34 pm

queste prime modifiche in ArchProfile.py

Code: Select all

    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":
        _ProfileU(obj, profile)
    else :
        print("Profile not supported")
    if FreeCAD.GuiUp:
        Draft._ViewProviderDraft(obj.ViewObject)
    return obj
e nel file csv

Code: Select all

UPE,UPE360,U,360,110,12,17
UPE,UPE400,U,400,115,13.5,18
#L-profile
#Category,Name,L,width,height,thickness
LL,L30,L,30,20,3
LL,L40,L,40,25,3
fanno apparire la categoria e i profili nei preset
structureLL.png
structureLL.png (9.74 KiB) Viewed 475 times
che ovviamente quando vengono selezionati danno errore, ma penso che ora bisogna implementare la classe L e poi aggiungere il nuovo profilo in ArchProfile.makeProfile
renatorivo
Posts: 2034
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Capannone mettallico in FreeCad

Postby renatorivo » Tue Nov 21, 2017 5:38 pm

Qualche progresso.
Aggiungendo questo codice in ArchProfile.py (oltre le modifiche indicate prima)

Code: Select all

class _ProfileU(_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
si ottiene il profilo a L, però la struttura non è centrata sul profilo
test L30.png
test L30.png (22.15 KiB) Viewed 438 times
Serve qualche modifica allle coordinate dei vertici
renatorivo
Posts: 2034
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Capannone mettallico in FreeCad

Postby renatorivo » Tue Nov 21, 2017 5:56 pm

Codice completo

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)
    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
        

Errore di posizione. Nessun errore nella finestra Report
test-L30-2.png
test-L30-2.png (36.88 KiB) Viewed 436 times
renatorivo
Posts: 2034
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Capannone mettallico in FreeCad

Postby renatorivo » Tue Nov 21, 2017 9:48 pm

Devo ancora risolvere la posizione , ma ho creato due categorie L, lati uguali e diseguali.
Nel nome del profilo appaiono i dati
test-L-3.png
test-L-3.png (8.52 KiB) Viewed 418 times
csv provvisorio per le prove, da incollare alla fine del csv esistente

Code: Select all

#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
La,L10x2,L,10,10,2
La,L12x2,L,12,12,2
La,L12x3,L,12,12,3
La,L15x2,L,15,15,2
La,L15x3,L,15,15,3
La,L15x4,L,15,15,4
La,L20x2,L,20,20,2
La,L20x3,L,20,20,3
La,L20x4,L,20,20,4
La,L20x5,L,20,20,5
Ora si dovrebbe creare la classe L con angoli arrotondati,
e poi almeno la classse T
User avatar
Anam
Posts: 39
Joined: Mon Mar 20, 2017 10:22 am
Location: Teramo, Italy

Re: Capannone mettallico in FreeCad

Postby Anam » Tue Nov 21, 2017 10:25 pm

Grand Renato! sei quasi sul punto di implementare i profili di Arch e quindi di Flamingos e :D !! Io sto ancora cercando ArchProfile.py :oops: , dove lo trovo ?? La cosa che non capisco, in tutte le classi la posizionone pl = obj.Placement e obj.Placement = pl sembra una cosa ridondante, da dove la prende la posizione ? chi risulta spostata, la sezione o l'oggetto structure ?
renatorivo
Posts: 2034
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Capannone mettallico in FreeCad

Postby renatorivo » Wed Nov 22, 2017 10:41 am

Anam wrote:
Tue Nov 21, 2017 10:25 pm
Io sto ancora cercando ArchProfile.py :oops: , dove lo trovo ??
Forse ho dimenticato di ricordarlo, ma per provare senza rischiare di rovinare la versione installata ho usato una versione dev0.17.
Scaricare e estrarre l'ultima versione. Nel mio caso ho estratto direttamente in C:\Users\User\Downloads\FreeCAD_0.17.12595_x64_dev_win
quindi il file ArchProfile.py si trova in C:\Users\User\Downloads\FreeCAD_0.17.12595_x64_dev_win\Mod\Arch della cartella estratta
e il file .csv dei dati in C:\Users\User\Downloads\FreeCAD_0.17.12595_x64_dev_win\data\Mod\Arch\Presets
Anam wrote:
Tue Nov 21, 2017 10:25 pm
La cosa che non capisco, in tutte le classi la posizionone pl = obj.Placement e obj.Placement = pl sembra una cosa ridondante,
Ho preso per buono quanto si riferisce alle altre classi. Forse una è la posizione del poligono e l'altra la posizione della faccia, o della struttura?
Anam wrote:
Tue Nov 21, 2017 10:25 pm
chi risulta spostata, la sezione o l'oggetto structure ?
Non ho ancora approfondito completamente, ma mi sembra proprio che il profilo venga creato sulle coordinate impostate (p1,p2,ecc..), e che invece la struttura sia creata sul centro di massa. Selezionando un vertice del profilo la barra di stato mostra che la sua posizione è esattamente Width/2 e Heicht/2, mentre invece la struttura è traslata. Questo non succede con i profili H o RH dato che sono simmetrici sia in x che in y.
vertice-profilo.png
vertice-profilo.png (17.28 KiB) Viewed 384 times
vertice-struttura.png
vertice-struttura.png (27.19 KiB) Viewed 384 times