Search found 929 matches
- Tue Apr 05, 2022 4:36 pm
- Forum: Python scripting and macros
- Topic: Correct way to access arguments in python script started with freecadcmd
- Replies: 23
- Views: 4094
Re: Correct way to access arguments in python script started with freecadcmd
import sys print(f"sys.argv = {sys.argv}") my_arg = sys.argv[2] my_arg2 = sys.argv[3] print(f"my_arg = {my_arg}, my_arg2 = {my_arg2}") sure ... if you always know how many arguments are passed to freecadcmd, that works. But that is my point all along: from the perspective of the...
- Tue Apr 05, 2022 4:03 pm
- Forum: Python scripting and macros
- Topic: Correct way to access arguments in python script started with freecadcmd
- Replies: 23
- Views: 4094
Re: Correct way to access arguments in python script started with freecadcmd
If you read bash argument expansion, you will see that arg[0] usually is the "name of the executable", so in: yes, however my expected behavior would be that the "name of the executable" is myscript.py - as it is, so to say, the executable. That would mean if I call freecad like...
- Tue Apr 05, 2022 2:13 pm
- Forum: Python scripting and macros
- Topic: Correct way to access arguments in python script started with freecadcmd
- Replies: 23
- Views: 4094
Correct way to access arguments in python script started with freecadcmd
I'm pretty sure this is a standard question, but I looked around and could not find an answer... I wrote a small script to convert some meshes with freecadcmd (right now, I only have the Appimage at hand, but I believe it is the same when using a native freecadcmd), and I call it like this: $ freeca...
- Thu Nov 04, 2021 11:47 am
- Forum: Forum in Deutsch
- Topic: (gelöst) Vollständige FreeCAD-Python Befehlsübersicht mit Erläuterungen?
- Replies: 7
- Views: 1699
Re: Vollständige FreeCAD-Python Befehlsübersicht mit Erläuterungen?
Wie gesagt, FreeCAD.FreeCAD gibts bei mir nicht - das schaut eher aus wie ein bug? FreeCAD._PartDesign gibts bei mir in der Doku schon. die __xxx__ member werden vermutlich nicht aufgeführt weil es spezielle variablen/funktionen des objekts/moduls sind, die sehr wahrscheinlich auch gar nicht explizi...
- Thu Nov 04, 2021 11:23 am
- Forum: Forum in Deutsch
- Topic: (gelöst) Vollständige FreeCAD-Python Befehlsübersicht mit Erläuterungen?
- Replies: 7
- Views: 1699
Re: Vollständige FreeCAD-Python Befehlsübersicht mit Erläuterungen?
uhhm, wo genau hast du dann geklickt? Wenn ich auf das Package "FreeCAD" gehe, dann komme ich auf http://localhost:7465/FreeCAD.html und dort seh ich kein unterpackage FreeCAD. Hab aber glaube ich auch eine etwas ältere Version hier grad zum testen offen gehabt: OS: Windows 10 Version 2009...
- Thu Nov 04, 2021 11:00 am
- Forum: Forum in Deutsch
- Topic: (gelöst) Vollständige FreeCAD-Python Befehlsübersicht mit Erläuterungen?
- Replies: 7
- Views: 1699
Re: Vollständige FreeCAD-Python Befehlsübersicht mit Erläuterungen?
Help -> Automatic python modules documentation
hilft dir das?
hilft dir das?
- Wed Sep 29, 2021 10:56 am
- Forum: Python scripting and macros
- Topic: [solved] makeBooleanFragments fails with <class 'Part.OCCError'>: Base shape is null
- Replies: 10
- Views: 2459
Re: [solved] makeBooleanFragments fails with <class 'Part.OCCError'>: Base shape is null
yes: error_fc.png although, it seems to work for the meshing, in the FEM subforum, other methods were discussed already. My mistake. Didn't apply the correct Mode for the Slice in my snippet. It's fixed above in my previous message. Could you test again ? ahh okay, yes that seems to work as well! T...
- Wed Sep 29, 2021 9:39 am
- Forum: Python scripting and macros
- Topic: [solved] makeBooleanFragments fails with <class 'Part.OCCError'>: Base shape is null
- Replies: 10
- Views: 2459
Re: [solved] makeBooleanFragments fails with <class 'Part.OCCError'>: Base shape is null
yes:
although, it seems to work for the meshing, in the FEM subforum, other methods were discussed already.- Wed Sep 29, 2021 9:35 am
- Forum: Python scripting and macros
- Topic: [solved] makeBooleanFragments fails with <class 'Part.OCCError'>: Base shape is null
- Replies: 10
- Views: 2459
Re: makeBooleanFragments fails with <class 'Part.OCCError'>: Base shape is null
Because otherwise I can not use the circular face as a mesh region. Or is there another, simpler way to do that?
So far, the BooleanFragment -> CompoundFilter -> MeshRegion seemed to be the only way to achieve that.
- Wed Sep 29, 2021 9:16 am
- Forum: Python scripting and macros
- Topic: [solved] makeBooleanFragments fails with <class 'Part.OCCError'>: Base shape is null
- Replies: 10
- Views: 2459