Search found 929 matches
- Sun Jan 29, 2023 12:52 pm
- Forum: FEM
- Topic: [solved] Uniaxial Stress in cylinder using TRANSFORM
- Replies: 7
- Views: 1687
Re: Uniaxial Stress in cylinder using TRANSFORM
But should the BOUNDARY not be set then on the CylinConstraintTransform nodeset? Or does calculix checks that both CylinConstraintTransform and ConstraintDisplacement003 nodeset are the same nodes and correctly applies the BC? As long as the same nodes are included in both node sets, it’s not a pro...
- Sat Jan 28, 2023 2:35 pm
- Forum: FEM
- Topic: [solved] Uniaxial Stress in cylinder using TRANSFORM
- Replies: 7
- Views: 1687
Re: Uniaxial Stress in cylinder using TRANSFORM
Three years later, just wanted to model something really quick, and I think I have still not understood how the transform GUI tool works :? I followed the Wiki page (https://wiki.freecadweb.org/FEM_ConstraintTransform) for the constraint transform and wanted to apply a radial constraint. Therefore, ...
- Wed May 04, 2022 5:33 pm
- Forum: Python scripting and macros
- Topic: f string syntax issue. Commenting out generator call
- Replies: 3
- Views: 674
Re: f string syntax issue. Commenting out generator call
If you are using an f-string, you must not end the string before the braces:
If you want literal '' in the string, use "" for the string, then you can simply use '' inside.
Code: Select all
world = "world"
f'hello '{world}'' # wrong
f'hello {world}' # correct
- Tue Apr 19, 2022 7:44 am
- Forum: Python scripting and macros
- Topic: [solved] GUI Script works line by line, but not when I press play
- Replies: 10
- Views: 1696
Re: [solved] GUI Script works line by line, but not when I press play
Even though this is marked as solved, here are my 2¢: If the issue is really that the script only works when "throttled", you are probably using some sort of concurrency in the script (which I doubt) and in that case simply adding some sleeps will only make the problem go away under certai...
- Sat Apr 09, 2022 9:59 am
- Forum: Python scripting and macros
- Topic: Correct way to access arguments in python script started with freecadcmd
- Replies: 23
- Views: 3978
- Sat Apr 09, 2022 9:18 am
- Forum: Python scripting and macros
- Topic: Correct way to access arguments in python script started with freecadcmd
- Replies: 23
- Views: 3978
Re: Correct way to access arguments in python script started with freecadcmd
Is this the same as invoking FreeCAD AppImage with the -c flag? No, I think there are three different things: FreeCAD.AppImage -c # calls the FreeCAD executable with the -c option FreeCAD.AppImage freecad -c # same as above, but explicit FreeCAD.AppImage freecadcmd # calls /usr/bin/freecadcmd FreeC...
- Fri Apr 08, 2022 9:16 am
- Forum: Python scripting and macros
- Topic: Correct way to access arguments in python script started with freecadcmd
- Replies: 23
- Views: 3978
Re: Correct way to access arguments in python script started with freecadcmd
sure it is not like a std c-python, but pretty predictable and repeatable imho. until you have the first edge case where it does not work :lol: No, joking aside: it will probably work just fine but the actual issue is something else. freecadcmd is not aware that a script might have arguments. That ...
- Tue Apr 05, 2022 7:36 pm
- Forum: Python scripting and macros
- Topic: Correct way to access arguments in python script started with freecadcmd
- Replies: 23
- Views: 3978
Re: Correct way to access arguments in python script started with freecadcmd
right, freecad is not a python application, it is a c-application which happens to have parts of it exposed to python along with an embedded interpreter, meaning that there is no direct promise that python in fc behaves like a standard c-python installation, most of the time it does, but there are ...
- Tue Apr 05, 2022 6:32 pm
- Forum: Python scripting and macros
- Topic: Correct way to access arguments in python script started with freecadcmd
- Replies: 23
- Views: 3978
Re: Correct way to access arguments in python script started with freecadcmd
myargs = sys.argv[sys.argv.index(__file__) + 1:] Yes, also an option. However, still requires some thinking as it works counterintuitive to the standard python. And for me I get the absolute path when accessing __file__, which might lead to other headaches and edge cases: $ freecadcmd sargs.py Free...
- Tue Apr 05, 2022 4:48 pm
- Forum: Python scripting and macros
- Topic: Correct way to access arguments in python script started with freecadcmd
- Replies: 23
- Views: 3978
Re: Correct way to access arguments in python script started with freecadcmd
I think you misunderstand my question, maybe it wasnt formulated properly, sorry. I'll try again. I have this script: import sys if len(sys.argv) != 2: print(f"usage: {sys.argv[0]} input_file") sys.exit(1) argument = sys.argv[1] print(f"starting to process input from {argument!r}"...