Hilfe bei dem Acoustic Shell Projekt, u.a.Schwerpunkt

In diesem Forum Fragen und Diskussionen in Deutsch
Forum rules
Foren-Regeln und hilfreiche Informationen

WICHTIG: Bitte zuerst lesen, bevor Sie posten
uli12V
Posts: 16
Joined: Sat Apr 06, 2019 2:10 pm

Hilfe bei dem Acoustic Shell Projekt, u.a.Schwerpunkt

Post by uli12V »

Hallo in die Runde,
nun kann (oder muss) ich sagen , dass ich kein blutiger Anfänger bin, weil ich nun schon viele h mit FC verbracht habe.
Meine Arbeit ist auch ein soziales Projekt mit vielen ehrenamtlichen Stunden, daher passt das ganz gut, es geht um die Musikmuschel im
Mauerpark von Berlin, http://savemauerpark.de/
Projektbeschreibung: https://docs.google.com/document/d/1aVd ... sp=sharing
Zwar bin ich mit dem Design schon sehr weit, aber wegen dem Aufbau und dem Standsicherheitsnachweis muss ich den Schwerpunkt genau wissen,
was ich zum Teil mit https://wiki.freecadweb.org/index.php?t ... cro_FCInfo gemacht habe, das Problem:
Es ist nicht so, dass nichts funktioniert, z.B liefert es die Gesamtmasse (was auch wichtig ist) aber den Schwerpunkt kann es nur berechnen, wenn man keine Transformationen (Verschiebung in eine Richtung) oder nach dem man kein Array aus der Draft Workbench verwendet.
Nur mit letzterem habe ich aber für die Konstruktion realisiert.
Die Frage ist also: Gibt es einen Workaround? oder gibt es eine andere Möglichkeit?

Lieben Gruß und Danke in Voraus,
Uli

OS: Ubuntu 18.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Attachments
3ds.png
3ds.png (17.05 KiB) Viewed 1523 times
Bemaßung.png
Bemaßung.png (197.89 KiB) Viewed 1523 times
Br26L.FCStd
(349.75 KiB) Downloaded 38 times
chrisb
Veteran
Posts: 54303
Joined: Tue Mar 17, 2015 9:14 am

Re: Hilfe bei dem Acoustic Shell Projekt, u.a.Schwerpunkt

Post by chrisb »

Ist das ein Link-Array?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54303
Joined: Tue Mar 17, 2015 9:14 am

Re: Hilfe bei dem Acoustic Shell Projekt, u.a.Schwerpunkt

Post by chrisb »

Ich habe ein wenig rumgespielt Du kannst das Teil als Step exportieren und dann ohne Verwendung von Links wieder importieren. Dann hast Du auch CenterOfMass wieder zur Verfügung.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Hilfe bei dem Acoustic Shell Projekt, u.a.Schwerpunkt

Post by apeltauer »

Sorry Off Topic!!!!

Hallo Uli,

Ich finde das Projekt richtig gut! Ich habe erst letztens eine Doku im ZDF über den Mauerpark gesehen (ich glaube hier https://www.zdf.de/dokumentation/dokume ... k-104.html). Da wurde u.a. das Thema Lärm behandelt.

Ich finde es richtig gut, dass FC bei solchen Projekten Helfen kann...
Mach weiter so....
freecad-heini-1
Veteran
Posts: 7791
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Hilfe bei dem Acoustic Shell Projekt, u.a.Schwerpunkt

Post by freecad-heini-1 »

apeltauer wrote: Thu Jul 02, 2020 6:06 am Ich finde das Projekt richtig gut!
+1
uli12V
Posts: 16
Joined: Sat Apr 06, 2019 2:10 pm

Re: Hilfe bei dem Acoustic Shell Projekt, u.a.Schwerpunkt

Post by uli12V »

chrisb wrote: Wed Jul 01, 2020 10:33 pm Ist das ein Link-Array?
Link-Array? hm, es ist das Array aus dem Draftarbeitsbereich: https://wiki.freecadweb.org/Draft_Array
mit dem drehe ich alles um 6 x 26° (ich meinte du hattest das auch so vorgeschlagen)
und...
chrisb wrote: Wed Jul 01, 2020 10:49 pm Ich habe ein wenig rumgespielt Du kannst das Teil als Step exportieren und dann ohne Verwendung von Links wieder importieren. Dann hast Du auch CenterOfMass wieder zur Verfügung.
habe ich nun auch probiert, bin mir aber nicht sicher , was du mit den Links meinst. Bei mir hat es ähnliche Fehler: es ist alles symmetrisch zur y Achse, zwar zeigt die boundbox fast 0 als x wert an aber der schwerpunkt kann nicht 2 m außer 0 sein. Der Y Wert ist (ca. 1m) auch ein anderer als ich mit xls berechnet habe, nämlich 1,7 m.
Attachments
Import.FCStd
(104.45 KiB) Downloaded 29 times
uli12V
Posts: 16
Joined: Sat Apr 06, 2019 2:10 pm

Re: Hilfe bei dem Acoustic Shell Projekt, u.a.Schwerpunkt

Post by uli12V »

apeltauer wrote: Thu Jul 02, 2020 6:06 am Sorry Off Topic!!!!

Hallo Uli,

Ich finde das Projekt richtig gut! Ich habe erst letztens eine Doku im ZDF über den Mauerpark gesehen (ich glaube hier https://www.zdf.de/dokumentation/dokume ... k-104.html). Da wurde u.a. das Thema Lärm behandelt.

Ich finde es richtig gut, dass FC bei solchen Projekten Helfen kann...
Mach weiter so....
Ja Danke, die beiden vom ZDF (Stephanie Paersch und Stephan Merseburger) haben uns Savemauerpark auch interviewt , hatten letztes Jahr auch gut politische Erfolge im Bezirk, der auch für die Shells war , allerdings erst nicht zahlen wollte , aber jetzt bekommen wir immerhin 7000 € was sehr knapp wird.
mario52
Veteran
Posts: 4701
Joined: Wed May 16, 2012 2:13 pm

Re: Hilfe bei dem Acoustic Shell Projekt, u.a.Schwerpunkt

Post by mario52 »

hi

my cent for your project (may be useless)
Sans titre.gif
Sans titre.gif (81.76 KiB) Viewed 1321 times
Br26L_Ray02.FCStd
(482.5 KiB) Downloaded 49 times


the macro for create the the line in directon of the face
(select one face and run the macro)

Code: Select all

import Draft, Part
#https://forum.freecadweb.org/viewtopic.php?f=22&t=46690&sid=18c0765424496ef734ce5b78914f7197
#https://forum.freecadweb.org/viewtopic.php?f=13&t=48276&p=413611#p413611
#https://forum.freecadweb.org/viewtopic.php?f=13&t=48276&p=414467#p414467
#https://forum.freecadweb.org/viewtopic.php?f=22&t=48425
#https://forum.freecadweb.org/viewtopic.php?f=12&t=49299&start=10
# mario52
# 25/05/2020 03/07/2020 07/07/2020 15/07/2020 26/02/2021 
#
selectedEdge   = FreeCADGui.Selection.getSelectionEx()[0].SubObjects[0]   # select one element
SubElementName = FreeCADGui.Selection.getSelectionEx()[0].SubElementNames[0]
sel            = FreeCADGui.Selection.getSelection()
try:
    colorFace = App.ActiveDocument.getObject(sel[0].Name).ViewObject.DiffuseColor[int(SubElementName[4:])-1] # color face selected
    ##App.ActiveDocument.getObject(sel[0].Name).ViewObject.DiffuseColor[int(SubElementName[4:])-1] = colorFace# give color on face
except Exception:
    colorFace = App.ActiveDocument.getObject(sel[0].Name).ViewObject.DiffuseColor[0] # color face selected [0]

#### configuration ####
ValueLenght = -1000     # value lenght loft if is negatif " - " reverse the loft
####
ValueScaleX  = 1.000   # value scale 1.0 by default
ValueScaleY  = 1.000   # value scale 1.0 by default
ValueScaleZ  = 1.000   # value scale 1.0 by default
####
createAxis  = 0        # 0 = not Axis, other = Axis
createLoft  = 1        # 0 = not loft, other = loft
onlyShape   = 1        # if createLoft  = 0 : 0 = with all construction, other = single copy
#### configuration ####

if hasattr(selectedEdge,'Surface'):
    plr = plDirection = FreeCAD.Placement()

    ########## section direction
    yL = selectedEdge.CenterOfMass
    uv = selectedEdge.Surface.parameter(yL)
    nv = selectedEdge.normalAt(uv[0], uv[1])
    direction = yL.sub(nv + yL)
    r = App.Rotation(App.Vector(0,0,1),direction)
    plDirection.Rotation.Q = r.Q
    plDirection.Base = yL
    plr = plDirection
    print( "surface : ", sel[0].Name, " ", SubElementName, " ",colorFace, " ",direction)
    ########## section direction

    ########## section axis
    if createAxis != 0:
        ########## section axis
        points=[FreeCAD.Vector(0.0,0.0,0.0),FreeCAD.Vector(0.0,0.0,(ValueLenght) )]
        centerX = Draft.makeWire(points,closed=False,face=False,support=None)
        centerX.Placement = plr
        centerX.Label = "Axis_" + SubElementName
        ########## section axis

    #### section scale ####
    if createLoft != 0:
        #### section scale ####
        Part.show(selectedEdge.copy())
        firsFace = App.ActiveDocument.ActiveObject
        objClone = Draft.scale(App.ActiveDocument.ActiveObject,App.Vector(ValueScaleX, ValueScaleY, ValueScaleZ),center=App.Vector(plr.Base),copy=True)#False
    
        #### section placement face in length and direction
        objClone.Placement.Base = objClone.Placement.Base + App.Vector(direction).scale(ValueLenght, ValueLenght, ValueLenght)

        #### section loft
        objectLoft = App.activeDocument().addObject('Part::Loft','Loft')
        objectLoft.Sections=[App.activeDocument().getObject(firsFace.Name), App.activeDocument().getObject(objClone.Name), ]
        objectLoft.Solid = True
        objectLoft.ViewObject.DiffuseColor = colorFace
        objectLoft.Label = sel[0].Label + "_" + SubElementName
        FreeCAD.ActiveDocument.recompute()
        #### section loft
        
        #### section hidden faces work
        firsFace.ViewObject.Visibility = False
        objClone.ViewObject.Visibility = False
        #### section hidden faces work
        
        #### section single object ####
        if onlyShape != 0:
            try:
                # single object
                Part.show(objectLoft.Shape.copy())
                App.ActiveDocument.ActiveObject.ViewObject.DiffuseColor = colorFace    # give face color on object
                App.ActiveDocument.ActiveObject.Label = sel[0].Label + "_" + SubElementName
                #### removeObject work
                App.ActiveDocument.removeObject(firsFace.Name)
                App.ActiveDocument.removeObject(objClone.Name)
                App.ActiveDocument.removeObject(objectLoft.Name)
            except Exception:
                None
    #### section scale ####



EDIT:03/07/2020 21h16 Paris : modify the code accept the loft without error
EDIT:26/02/2021 19h53 Paris : correct if coordinate not 0,0,0 add create Single Object, color object same color to face selected

mario
Last edited by mario52 on Fri Feb 26, 2021 6:58 pm, edited 1 time in total.
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
uli12V
Posts: 16
Joined: Sat Apr 06, 2019 2:10 pm

Re: Hilfe bei dem Acoustic Shell Projekt, u.a.Schwerpunkt

Post by uli12V »

mario52 wrote: Fri Jul 03, 2020 2:11 pm the macro for create the the line in directon of the face
Oh nice thanks, i will post that on our facebook page, if you dont mind...
i used the sketcher (acoustic) to "simulate" the acoustics, where I took a certain position of sound source (like my bass drum) and drew some lines to the middle of the area, and drew the "reflected" line, with input-angle = output-angle. Without constrains of the source I could play around with the position, looking how the sound will be distributed.

But this was 2D only, in topview and YZ layer.

But havent you written the FCinfo macro?, have your read, or do you understand german, the issue what I had above?
was about the center of gravity.
cheers
Uli
Attachments
acoustic2.FCStd
(48.83 KiB) Downloaded 24 times
parbAkust.png
parbAkust.png (54.92 KiB) Viewed 1253 times
mario52
Veteran
Posts: 4701
Joined: Wed May 16, 2012 2:13 pm

Re: Hilfe bei dem Acoustic Shell Projekt, u.a.Schwerpunkt

Post by mario52 »

hi
uli12V wrote: Tue Jul 07, 2020 12:37 am Oh nice thanks, i will post that on our facebook page, if you dont mind...
no problem you are authorized thanks (give my the links)
uli12V wrote: Tue Jul 07, 2020 12:37 am was about the center of gravity.
my macro display just the FreeCAD result, maybe error if the object is in one body and : the object with one placement different on placement of the body (more complicate for my see Wrong placement on simple copy of object inside parts in v 0.17)

the second section inertia are modified and calculated by other user,

try also Macro to compute center of mass
uli12V wrote: Tue Jul 07, 2020 12:37 am and drew the "reflected" line, with input-angle = output-angle.
if you have the formule maybe i calculate it ...

ps: in the Users Showcase there is a user who has worked on light ray reflection here Small solar tracking powerplant

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