Prescribed Displacement Testing and Advice

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Prescribed Displacement Testing and Advice

Post by makkemal »

I have managed to get a displacement constraint working using only python. (My first attempt so I expect I still have some work)
I am not committing it to git-hub yet since some of the coding only made sense for me to get the features working.
That and I am not sure I know how to do this correctly yet.
For instance is update in InitGui.py does not make sense for the global project but was necessary for me to do to get a displacement icon in without compiling.

The coding is based on development version 0.16.5560
Just copy the code (attached) below into the /MOD/FEM directory and you will have a displacement Icon and a UI for selecting it.
This constraint although only in global coordinates make it possible to model symmetry, rolling constraints etc.

Can someone please advise me how to get this code into the main repository without damaging the original code ?

Regards
Michael

[img]
disp.jpg
disp.jpg (181.74 KiB) Viewed 3757 times
[/img]
FEM_prescribed.zip
(41.03 KiB) Downloaded 101 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Prescribed Displacement Testing and Advice

Post by bernd »

Cool. I'll give it a try.

It is a pitty you did not commit it to a git hub account. It would make live for us much easier if you would create an own github account and commit it to that account.

Would you copy your FreeCAD help info. Just to know on which FreeCAD commit version the code should work.
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Prescribed Displacement Testing and Advice

Post by makkemal »

It is a pitty you did not commit it to a git hub account. It would make live for us much easier if you would create an own github account and commit it to that account.
I have created an account but its a whole new learning curve of how to get code committed, I will do it but for now I have no idea of what I am doing on github
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Prescribed Displacement Testing and Advice

Post by bernd »

Ahh I see, I had the same problem when I started FreeCAD development one and a half year ago. Gave your code a short try. Yeah cool. We should for sure some how integrate this in FEMWB.

Regarding github, we could gide you if you want ?

Do you compile FreeCAD yourself or did you make all the changes in the installation path off FreeCAD (FreeCAD.ConfigGet("AppHomePath") + 'Mod/Fem') ?

Which FreeCAD commit is your code based on?
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Prescribed Displacement Testing and Advice

Post by makkemal »

I did not compile anything. I gave up on compiling a few weeks ago, a way to steep learning curve.
I downloaded and used the windows 64 pre release 0.16.5560
I then did all the updates in the Mod/FEM dir

The problem I see with the commit is that I did override some C++ with python like the InitGui.py
This is to be able to test without compiling.

So yes please guide me on howto commit this code
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Prescribed Displacement Testing and Advice

Post by bernd »

makkemal wrote:So yes please guide me on howto commit this code
Would you post your FreeCAD --> help --> about

What's your github username?

Do you have git installed on windows?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Prescribed Displacement Testing and Advice

Post by wmayer »

bernd wrote:Would you post your FreeCAD --> help --> about
makkemal wrote:The coding is based on development version 0.16.5560
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Prescribed Displacement Testing and Advice

Post by bernd »

wmayer wrote:
bernd wrote:Would you post your FreeCAD --> help --> about
makkemal wrote:The coding is based on development version 0.16.5560
and viewtopic.php?t=5308 the other way around, but I do not know this ?!
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Prescribed Displacement Testing and Advice

Post by wmayer »

The hash number to 5560 must be 32367b1744c5939027a9ed97a7231fe38eeb919b.

I am on 5759 which is 337a36ceb89ce29dcbcc288257c37f34546a534e. With

Code: Select all

git rev-list 337a36ceb89ce29dcbcc288257c37f34546a534e > test.log
I get a text file with all commits. Since the order of chronology is from bottom to top you have to go to line (5759 - 5560) + 1 = 200 which then is the above hash number.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Prescribed Displacement Testing and Advice

Post by bernd »

Thanks werner !

Code: Select all

git rev-list 32367b| wc -l 
gives 5558

It is bb05d1759614b55a2e8832f8628bce6add609ad4

Code: Select all

git rev-list  bb05d1| wc -l 
gives 5560

EDIT: https://github.com/FreeCAD/FreeCAD/tree/bb05d1
Last edited by bernd on Mon Oct 19, 2015 11:41 am, edited 1 time in total.
Post Reply