Rigid body constraint

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: Rigid body constraint

Post by jnxd »

bernd wrote: Wed Nov 02, 2022 9:30 pm cool ... the python method to create the object and the unit test for the new object is missing ... See git commit 27f50ad13188faff changes in files
- src/Mod/Fem/femtest/app/test_object.py
- src/Mod/Fem/ObjectsFem.py (but for a C++ object the code is different, look at the file)
Sorry for the late reply. And thanks, I didn't really account for tests, an specifically didn't know of these. My thought was to make tests after a few iterations of the rigid body constraint.

EDIT: I see that I had already made the changes in src/Mod/Fem/ObjectsFem.py, and these were same as those for Fixed constraint. Am I missing something?
Last edited by jnxd on Sat Nov 05, 2022 11:11 am, edited 1 time in total.
My latest (or last) project: B-spline Construction Project.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Rigid body constraint

Post by bernd »

jnxd wrote: Sat Nov 05, 2022 10:58 am
bernd wrote: Wed Nov 02, 2022 9:30 pm cool ... the python method to create the object and the unit test for the new object is missing ... See git commit 27f50ad13188faff changes in files
- src/Mod/Fem/femtest/app/test_object.py
- src/Mod/Fem/ObjectsFem.py (but for a C++ object the code is different, look at the file)
Sorry for the late reply. And thanks, I didn't really account for tests, an specifically didn't know of these. My thought was to make tests after a few iterations of the rigid body constraint.
I just wanted to give the information. Use the FreeCAD-CI whenever you like.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: Rigid body constraint

Post by jnxd »

bernd wrote: Sat Nov 05, 2022 11:10 am I just wanted to give the information. Use the FreeCAD-CI whenever you like.
Oops. I just edited the previous comment, maybe shortly before you replied. Could you check if my changes to ObjectFem.py are correct?
My latest (or last) project: B-spline Construction Project.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Rigid body constraint

Post by bernd »

https://github.com/AjinkyaDahale/FreeCA ... d25a8f4b21

it seams right to me. I missed this somehow. Sorry for the noise in this regard.

bernd
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: Rigid body constraint

Post by jnxd »

bernd wrote: Sat Nov 05, 2022 11:31 am https://github.com/AjinkyaDahale/FreeCA ... d25a8f4b21

it seams right to me. I missed this somehow. Sorry for the noise in this regard.

bernd
OK, thanks for this. The tests are failing, but not in the location where I added them. Something about a count being off by one. Could you take a look?
My latest (or last) project: B-spline Construction Project.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Rigid body constraint

Post by bernd »

Seams you have found it yourself. Am i right. There is no error anymore on FreeCAD-CI.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: Rigid body constraint

Post by jnxd »

bernd wrote: Sun Nov 06, 2022 7:47 am Seams you have found it yourself. Am i right. There is no error anymore on FreeCAD-CI.
More like you actually already helped out by commenting in Github. Thanks for that.
My latest (or last) project: B-spline Construction Project.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Rigid body constraint

Post by bernd »

jnxd wrote: Mon Nov 07, 2022 6:58 am
bernd wrote: Sun Nov 06, 2022 7:47 am Seams you have found it yourself. Am i right. There is no error anymore on FreeCAD-CI.
More like you actually already helped out by commenting in Github. Thanks for that.
Ahh that one, :geek:
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Rigid body constraint

Post by bernd »

What I normally do If I create a new object is to create a example as well. Since I do start with object and writer and at last do the gui I need some python to create the object anyway. Some more python and the example is ready. See for example this git commit 94c0522c38
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Rigid body constraint

Post by bernd »

To make all your writer code safe you could add the just added example to the unit test as well. See for example git commit 4fcf01991a92
Post Reply