controling shear punching of Foundation

Show off your FreeCAD projects here!
User avatar
amrit3701
Posts: 233
Joined: Mon Jun 13, 2016 5:37 pm

Re: controling shear punching of Foundation

Postby amrit3701 » Tue Nov 13, 2018 12:15 pm

ebrahim raeyat wrote:
Fri Nov 09, 2018 1:42 am
Hello. I loaded source codes to github .

excuse me, it's not so clean.
Hi Ebrahim,

Nice work so far. :) One thing I noticed that before using FreeCAD GUI first make sure that it is up. This enables the user to run your code even in FreeCADCmd mode.

Code: Select all

if FreeCAD.GuiUp:
	import FreeCADGui
Are you also think to add reinforcement in structural elements?

Thanks,
User avatar
ebrahim raeyat
Posts: 140
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: controling shear punching of Foundation

Postby ebrahim raeyat » Tue Nov 13, 2018 8:55 pm

amrit3701 wrote:
Tue Nov 13, 2018 12:15 pm

Hi Ebrahim,

Nice work so far. :) One thing I noticed that before using FreeCAD GUI first make sure that it is up. This enables the user to run your code even in FreeCADCmd mode.

Code: Select all

if FreeCAD.GuiUp:
	import FreeCADGui
very thanks for your hint.

amrit3701 wrote:
Tue Nov 13, 2018 12:15 pm
Are you also think to add reinforcement in structural elements?

Thanks,
yes, but probaply for foundation at first!
User avatar
ebrahim raeyat
Posts: 140
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: controling shear punching of Foundation

Postby ebrahim raeyat » Tue Nov 13, 2018 9:36 pm

I also give it a try with python3 in command line, for oblique foundation this happen appeard:
rebar.png
rebar.png (51.37 KiB) Viewed 540 times
I had been want to produce two version of foundation:
1) as above for drawing section that all rebars are present
2) one rebar as representative of all for drawing plan and then for text that must include size and number of rebars, i read those from step 1

but it was heavy and time consuming for adding section cuts to drawing those on techdraw WB.
User avatar
ebrahim raeyat
Posts: 140
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: controling shear punching of Foundation

Postby ebrahim raeyat » Sun Jun 23, 2019 12:31 pm

I develop punch software and convert it to "punch" object. I want to add punch faces to punch object as a property, but i don't know what kind of property i must to use for it. my faces are type of "Part.Face"

this is output error:

Code: Select all

AttributeError: Attribute (Name: facess) error: 'type in list must be 'DocumentObject', not Part.Face'
what means this properties ?!! i searched about those, it seems those are magical !!

App::PropertyLink
App::PropertyLinkChild
App::PropertyLinkGlobal
App::PropertyLinkSub
App::PropertyLinkSubChild
App::PropertyLinkSubGlobal
App::PropertyLinkList
App::PropertyLinkListChild
App::PropertyLinkListGlobal
App::PropertyLinkSubList
App::PropertyLinkSubListChild
App::PropertyLinkSubListGlobal

when the program load, i able to add faces to punch object by click on faces property and select them. thanks
User avatar
ebrahim raeyat
Posts: 140
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: controling shear punching of Foundation

Postby ebrahim raeyat » Sun Jun 23, 2019 12:34 pm

punch.jpg
punch.jpg (24.73 KiB) Viewed 316 times
User avatar
ebrahim raeyat
Posts: 140
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: controling shear punching of Foundation

Postby ebrahim raeyat » Sun Jun 23, 2019 12:39 pm

i can add those by this code, but this way when i want to use them, i must to obtain them by name from the ActiveDocument. i want to know is there an easier way to do this?

Code: Select all

faces = []
for f in intersection_faces:
    face = App.ActiveDocument.addObject("Part::Feature", "face")
    face.Shape = f
    faces.append(face.Name)
punch.faces = faces
when i want to use them:

Code: Select all

for face_name in obj.faces:
    f = FreeCAD.ActiveDocument.getObject(face_name)
intersection_faces are type of Part.Face
Last edited by ebrahim raeyat on Sun Jun 23, 2019 12:44 pm, edited 1 time in total.
User avatar
Kunda1
Posts: 4812
Joined: Thu Jan 05, 2017 9:03 pm

Re: controling shear punching of Foundation

Postby Kunda1 » Sun Jun 23, 2019 12:44 pm

I suggest we keep the technical developing discussions confined to a separate thread as this is the Users Showcase subforum where people show their final products. Is that Ok with you @ebrahim raeyat ?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
ebrahim raeyat
Posts: 140
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: controling shear punching of Foundation

Postby ebrahim raeyat » Sun Jun 23, 2019 12:47 pm

Kunda1 wrote:
Sun Jun 23, 2019 12:44 pm
I suggest we keep the technical developing discussions confined to a separate thread as this is the Users Showcase subforum where people show their final products. Is that Ok with you @ebrahim raeyat ?
yes, I wanted, but i think that it may be more understand to be continued. ok, i continue it from separate forum. thanks
User avatar
Kunda1
Posts: 4812
Joined: Thu Jan 05, 2017 9:03 pm

Re: controling shear punching of Foundation

Postby Kunda1 » Sun Jun 23, 2019 5:57 pm

ebrahim raeyat wrote:
Sun Jun 23, 2019 12:47 pm
yes, I wanted, but i think that it may be more understand to be continued. ok, i continue it from separate forum. thanks
So, what do you think about linking to the discussion thread from in here. And every so often you can update this thread with new news? But the main discussion makes sense to happen on a different thread, is that Ok?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
ebrahim raeyat
Posts: 140
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: controling shear punching of Foundation

Postby ebrahim raeyat » Sun Jun 23, 2019 9:41 pm

Kunda1 wrote:
Sun Jun 23, 2019 5:57 pm
ebrahim raeyat wrote:
Sun Jun 23, 2019 12:47 pm
yes, I wanted, but i think that it may be more understand to be continued. ok, i continue it from separate forum. thanks
So, what do you think about linking to the discussion thread from in here. And every so often you can update this thread with new news? But the main discussion makes sense to happen on a different thread, is that Ok?
yes. i got it. thanks