Is there a way to reset the error you get in OCC without the need of closing and restarting FreeCAD?
I would like to reset the OCC if something bad happens which is not abnormal for Direct Modeling or Fillet, Chamfer.
If we don't have that, is it possible to achieve?
Thanks.
<class 'Part.OCCError'> how to reset wihout restarting FreeCAD?
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
<class 'Part.OCCError'> how to reset wihout restarting FreeCAD?
Design456 Direct Modeling. Coin3D GUI Toolkit. Objects get simplified.
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
-
- Veteran
- Posts: 5505
- Joined: Thu Apr 05, 2018 1:53 am
Re: <class 'Part.OCCError'> how to reset wihout restarting FreeCAD?
You mean when FreeCAD hangs during an OCCT operation? Only 2 ways I know: 1) wait it out and hope it eventually finishes; 2) force close and restart. If you are fortunate and an autorecovery file has been recently saved you can usually recover your work. Save and save often. It could be useful if the autorecovery could be triggered from python, but I don't think it can, I think it is on a timer. Then you could trigger the save before doing something that is known to sometimes crash, like making a fillet.
Re: <class 'Part.OCCError'> how to reset wihout restarting FreeCAD?
Actually not,
When you run test code and develop something .. or even as you mentioned after an operation .. is there a way to reset the OCC engine without a hard restart .. I men maybe you unload-reload OCC?
is there any API for that?
When you run test code and develop something .. or even as you mentioned after an operation .. is there a way to reset the OCC engine without a hard restart .. I men maybe you unload-reload OCC?
is there any API for that?
Design456 Direct Modeling. Coin3D GUI Toolkit. Objects get simplified.
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
-
- Veteran
- Posts: 5505
- Joined: Thu Apr 05, 2018 1:53 am
Re: <class 'Part.OCCError'> how to reset wihout restarting FreeCAD?
I see. I don't know of a way, but there might be one. Why would this be needed? Do you have a simple example of when this would be useful?
Edit: Okay, I think I see now. You want to reset the error code.
Edit: Okay, I think I see now. You want to reset the error code.
Re: <class 'Part.OCCError'> how to reset wihout restarting FreeCAD?
During my development, I restart FreeCAD maybe hundred times due to different things.
Design456 Direct Modeling. Coin3D GUI Toolkit. Objects get simplified.
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
-
- Veteran
- Posts: 5505
- Joined: Thu Apr 05, 2018 1:53 am
Re: <class 'Part.OCCError'> how to reset wihout restarting FreeCAD?
Yes, with imported files in a workbench you must restart. There is an option to get around this:
Code: Select all
import importlib
import yourmodule #yourmodule.py
importlib.reload(yourmodule) #reloads when yourmodule.py changes without need to restart