-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the scripts with CADquery 1.2.0 and FreeCAD 0.18.4 #322
Comments
@nitrousnrg |
Ah, thanks. I tried CP_Radial_THT, LED_SMD and C_Chip_SMD. I'll try to switch the system to python2 if that's the problem. |
The best would be to fix the generator accordingly to the new ones, to be py3 ready 😄 |
I tried the changes in your link, thanks! Didn't work for me though so I went for a debian VM with pyhon2 freecad package and now its working for me |
Hi Maurice, it sadly seems that the scripts are really not working anymore with latest versions of FreeCAD and CADquery. I've been fighting with that for hours, but almost with no result. I though managed to bring the Capacitor_THT script to work by commenting the line 114 (# reload(cq_cad_tools)), I'd very appreciate if you spend some minutes to get it back to work with actual software versions. I think your work is great, your instrument is important and the users should be able to use it for themselves and to contribute. Please. God bless. |
@ugolevant |
I'm getting the same error with FreeCAD 0.18.4 and CQ 1.2.0 and I'm using a script that was recently updated and includes the changes shown above (https://github.com/easyw/kicad-3d-models-in-freecad/pull/292/files and 474ab85) as far as I can see. I didn't find anything else in the issues or PRs which gave me more direction and I'm a newbie to FC. I'm on Win 10 x64 and trying to run I'm not sure what the issue is. Sorry for resurrecting this comment but hopefully I'm doing something dumb or this script is broken and it needs to be fixed for everyone and not just me. Here is the console output:
|
Note that |
@evanshultz |
Thanks for the replies! I didn't mention that there is no output. The above is all that is shown on the console. No models are created. For me, at least.
I snagged FreeCAD_0.19.22670-Win-Conda_vc14.x-x86_64.7z from https://github.com/FreeCAD/FreeCAD/releases/tag/0.19_pre and... nope! Same console output and no models generated:
Could somebody else check if the Resistor_THT script works for them? Maybe it's just me, but I got a bunch of other scripts working just fine so my feeling is that the script is at fault and I'm not familiar with CQ and FC (yet.). |
Doesn't work for me either (on Linux), but I'm mainly getting Py3 syntax errors. Could this be a module search path issue? It looks like the actual file |
Maybe. That seems strange, though. The THT resistor script was recently updated with the Python 3 stuff I see mentioned above by @Franck78 . So why doesn't it run without Python 3 issues for you? This is not getting any more clear and I was hoping it just ran without any effort. |
True. My local repo isn't even with upstream although git keeps telling me it is. |
"c:\program files\freecad 0.18\bin\freecad.exe" main_generator.py all => python3 main_generator.py all but the real one to call is the "create_model.sh" that adds some path yes (I have never opened the .bat version). Under some linux distro , freecad is 'FreeCAD' and under others 'freecad' meaning you have to fix them for you. |
Neither of those works for me (the last one does nothing): But even if it did, that's unlike the other generators I used and against the instructions at https://github.com/easyw/kicad-3d-models-in-freecad/tree/master/cadquery/FCAD_script_generator/Resistor_THT, so perhaps both ways should work? Or that doesn't work under Windows? At any rate, since @Franck78 made the script updates I gotta assume everything works there. I'm still hoping to get confirmation from somebody else if an update-to-date repo runs per the instructions or not. @easyw maybe you have time to check? Or @chschlue if you can get things updated. or anybody else. |
I have FreeCAD 0.18 only. Forget the 'python main_generator' thing. I was saying wrong. I think noboby cared for the . bat launcher since a long time. Not python gourou, but cq_parameter.py being there and valid, it's just search path for python's modules that need adjust. look the linux laucher: it creates a SCRIPTPATH variable with value = the dir containing cq_parameters.py and probably Freecad use that to extend the 'python path'
|
I've got the repo issues sorted out and am now getting the same error ( |
try the scripts in WIP directory It have extra lines not present in the resistor script that modify the script path
|
I have added the two lines in the script and I can directly run FreeCad main_generator.py whitout the SCRIPTPATH variable#
|
@easyw |
scriptdir=os.path.dirname(os.path.realpath(file)) |
for me the scripts are running both on Linux ... Would you mind to post your full FC info? Are you with AppImage? |
@Franck78 |
My version of Python (3.6.10), under linux, (or is it Freecad 0.18 doing something) does not need the 2 lines. Patch ready for Resistor_THT and DCDC_Converters which is identical |
Confirmed with FC 0.18.4 on Win 10. Adding those two lines to above to main_generator.py works. I put them on lines 69 and 70 bit it shouldn't matter too much. Thanks all! There's no final 'Done' message and no preview of the models as they're built like the CP_Radial_THT script, but working is always better than broken. |
@evanshultz , It's about power resistors Vishay CPCX CPCC series So, i added all the two series in the 3d generator but not in the footprint generator. https://www.vishay.com/docs/30116/cpcc.pdf |
Hi Maurice, I'm having troubles getting the script to work in this new computer. I think I was using freecad 17 last time but I couldnt find that version so I'm stuck with fc18.
I'm getting this eError string: "CQ 030 doesn't open example file"
(sorry, can't figure out the shared clipboard on this VM)
I have the latest cadquery from the addon manager, a fresh ubuntu install, yaml is installed from pip3.
Not sure what else I can try...
Thanks!
The text was updated successfully, but these errors were encountered: