Commit Graph

4964 Commits

Author SHA1 Message Date
Przemo Firszt
29205f7f4d FEM: Fix invalid CLOAD formatting
Existing code was producing invalid results:

a = 9876543212346789864323456.9543234578986432345678
>>> print "{:.13}".format(repr(a))
9.87654321234
>>> a
9.87654321234679e+24
The new converision should work fine:
>>> print "{:.13E}".format(a)
9.8765432123468E+24

Reported & fixed by ulrich1a
2015-05-08 20:59:32 +02:00
Przemo Firszt
09921c9bb7 FEM: inp file formatting/typos
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-08 20:59:14 +02:00
Przemo Firszt
92124ac084 FEM: Add getccxVolumesByFace and write_face_load functions
getccxVolumesByFace returns std::map<int, int> with ID of volume
and a number of face as per CalculiX definition. The same function is
accessible for python and returns list with the same information, like
this: [[229, 3], [230, 3], [233, 2], [238, 2]]

write_face_load produces something like this in the .inp file:

***********************************************************
** element + CalculiX face + load in [MPa]
** written by write_face_load function
*DLOAD
** Load on face Face2
229,P3,10.0
230,P3,10.0
233,P2,10.0
238,P2,10.0

Optimised by wmayer

Signed-off-by: wmayer
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-08 20:58:59 +02:00
Przemo Firszt
6879373168 FEM: getNodesByVertex should return int not long
Suggested by wmayer

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-08 20:58:43 +02:00
Przemo Firszt
36567695d3 FEM: getNodesByEdge should return int not long
Suggested by wmayer

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-08 20:58:26 +02:00
Przemo Firszt
982976bdc5 FEM: getNodesByFace should return int not long
Suggested by wmayer

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-08 20:58:07 +02:00
wmayer
f02cec56ef + use right iterator variable 2015-05-08 12:40:57 +02:00
wmayer
c91d154842 + fix branding bug, use tr() function of class not QObject 2015-05-08 01:08:19 +02:00
wmayer
ec205c15b9 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-05-08 00:54:36 +02:00
wmayer
48f8105949 + switch between old and new offscreen renderer 2015-05-08 00:54:09 +02:00
Yorik van Havre
c6dbb55198 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-05-07 18:17:50 -03:00
Yorik van Havre
0d30572e19 Better message if qt help file is not found - fixes #2084 2015-05-07 18:17:35 -03:00
Yorik van Havre
09db645ea6 Arch: Fixed makefile 2015-05-07 18:14:52 -03:00
wmayer
15de65eb71 + before trying to write out snapshot image check if it's null 2015-05-07 23:07:20 +02:00
Yorik van Havre
c4cdfec855 Arch: moved some ui files to resource 2015-05-07 17:38:24 -03:00
Yorik van Havre
ac5efd335d Arch / Draft: reorganized preferences files 2015-05-07 17:06:56 -03:00
wmayer
23a8a9359b + handle case when workbench fails to be created, fix problem when inserting menu 2015-05-06 10:47:51 +02:00
wmayer
7090587e45 + improve doc string 2015-05-04 15:20:23 +02:00
wmayer
0343deb30a + fixes #0002085: Only one Toolbar Separator 2015-05-03 21:32:24 +02:00
wmayer
b34df5672a + show build type 2015-05-02 17:56:44 +02:00
wmayer
440dd257a4 + fixes #0002064: Editable text changes in drawing template not restored. 2015-05-02 13:14:38 +02:00
wmayer
34ecfa1799 + show build type 2015-05-02 02:13:13 +02:00
wmayer
cf61793c2f + code cleanup: remove deprecated class ViewProviderPartBase 2015-05-02 00:37:05 +02:00
wmayer
f638da6281 + code cleanup: remove NO_USE_QT_MDI_AREA 2015-05-01 23:27:20 +02:00
wmayer
69b8257f21 + whitespace fixes, add curly braces to outer loop 2015-05-01 18:49:20 +02:00
DeepSOIC
ac1237f121 Sketcher: allow mass selection for Point-on-object constraint 2015-05-01 18:31:18 +02:00
Przemo Firszt
d683cba624 FEM: Add comments to .inp file about functions
Adding detailed information which function is responsible for
creating a proticular section of the .inp file should save
some guesswork. An example from the .inp file:

[..]
***********************************************************
** node sets for loads
** written by write_load_node_sets function
*NSET,NSET=FemConstraintForce
1,
3,
[..]

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-01 17:30:53 +02:00
Przemo Firszt
eb6a163049 FEM: Use local variable to avoid long strings in write_constraints_force
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-01 17:30:35 +02:00
Przemo Firszt
3f1a566d97 FEM: Use local variable to avoid long strings in write_constraints_fixed
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-01 17:30:20 +02:00
Przemo Firszt
c35223858f FEM: Use local variable to avoid long strings in write_materials
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-01 17:30:05 +02:00
Przemo Firszt
078b1ff9b3 FEM: Use local variable to avoid long strings in write_load_node_sets
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-01 17:29:48 +02:00
Przemo Firszt
5d2d386689 FEM: Material name has to be limited to 80 characters for ccx
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-01 17:29:30 +02:00
Przemo Firszt
0e61a56082 FEM: Use local variable to avoid long strings in write_fixed_node_sets
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-01 17:29:14 +02:00
Przemo Firszt
4170eeba41 FEM: Use local variable to avoid long strings in write_material_element_sets
print material_object['Object'].Name, ':  ', material_object['Object'].Material['Name']

becomes this:

print mat_obj_name, ':  ', mat_name

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-01 17:28:57 +02:00
Przemo Firszt
888ad7591c FEM: Rename variables f->elem, inpfile->f
The reason behind that change is that auxiliary variables,
like a file handle, should not be too visible. inpfile was
a good description, but we're handling only one file and there
is no need to use a descriptive variable name for it in every function.
It's enough that is used in write_calculix_input_file

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-01 17:28:39 +02:00
wmayer
859d76faf8 + fixes #0002075: Analysis of FreeCAD by PVS-Studio static analyzer 2015-05-01 16:56:31 +02:00
wmayer
5699fd911b + fix broken brush selection 2015-05-01 02:08:06 +02:00
wmayer
c1492bf5a0 + whitespacee/typo fixes 2015-04-30 23:16:57 +02:00
wmayer
79aa9574b5 + always keep digits at end when using copyObject, remove deprecated third parameter 2015-04-29 16:33:20 +02:00
wmayer
d03daf3773 + fix build failure for zipios++ from Fedora 2015-04-29 10:31:10 +02:00
Przemo Firszt
af7071adb4 FEM: Split inp write_calculix_input_file into functions
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-04-27 21:33:19 +02:00
Przemo Firszt
b59138d784 FEM: Make sure Young's modulus is written in MPa
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-04-27 21:33:18 +02:00
Przemo Firszt
9b5301a004 FEM: Replace invalid General_description with Description
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-04-27 21:33:17 +02:00
Przemo Firszt
bf69358097 FEM: ccxInpWriter shouldn't do any validation or guessing
Also, there is no need to print material parameters to the console.
User can see that info in dialog box, in .inp file and it's also printed
to console after material has been set.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-04-27 21:33:17 +02:00
Przemo Firszt
27cf3628b7 FEM: Make sure Edit/Run buttons stay disabled if ccxInpWriter didn't generate .inp file
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-04-27 21:33:16 +02:00
Przemo Firszt
617a9c84a4 FEM: Cleaning ccxInpWriter
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-04-27 21:33:15 +02:00
Przemo Firszt
9e43233bfc FEM: General_name is invalid since f96f319986
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-04-27 21:33:14 +02:00
Przemo Firszt
b254e123d1 FEM: Reduce femConsole noise
Showing ccx output during short colculations doesn't make any sense.
During long calculations user is flooded with messages, that ccx
produced empty output.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-04-27 21:33:14 +02:00
Przemo Firszt
7772322720 FEM: Remove multiple empty lines produced by ccx before sending to FEM console
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-04-27 21:33:13 +02:00
Przemo Firszt
ecdf822536 FEM: Always scroll FEM console to the bottom after adding new message
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-04-27 21:33:12 +02:00