Skip to content
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

Switch on and off parametric behaviour of document objects #5545

Closed
FreeCAD-Bug-Importer opened this issue Feb 7, 2022 · 3 comments
Closed
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Feature FR for improvements or new features

Comments

@FreeCAD-Bug-Importer
Copy link
Collaborator

Issue imported from https://tracker.freecad.org/view.php?id=402

  • Reporter: wmayer
  • Date submitted: 7/18/2011
  • FreeCAD version:
  • Category: Feature
  • Status: acknowledged
  • Tags:

Original report text

According to the thread [1] we need a way to switch on and off the parametric of document objects. Since this should be serialized we have to use a PropertyBool member. If this flags is off we simply have to skip the execute() method inside the recompute() of DocumentObject.

[1] http://forum.freecadweb.org/viewtopic.php?f=8&t=1070&p=8654#p8652

Other bug information

  • Priority: normal
  • Severity: major
  • Category: Feature
  • Updated: 2/6/2021

Discussion from Mantis ticket

Comment by bejant 2015-05-28 14:01

Here's a new link to the topic, after the FreeCAD forum moved from SourceForge:
http://forum.freecadweb.org/viewtopic.php??f=8&t=1070&p=8654#p8652


Comment by Kunda1 2018-06-13 13:27

Unassigning Jriegel


Comment by Kunda1 2018-08-26 11:20

Updated URL in ticket summary from old sourceforge URL


Comment by Kunda1 2019-01-01 13:13

New discussion at https://forum.freecadweb.org/viewtopic.php?f=8&t=33101

@FreeCAD-Bug-Importer FreeCAD-Bug-Importer added Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Feature FR for improvements or new features labels Feb 7, 2022
@adrianinsaval
Copy link
Member

I this relevant? I think this use case is now covered well by the simple copy command, consider closing this issue

@FlachyJoe
Copy link
Contributor

@wwmayer you tell me about this issue, do you think a Freezed state is needed for DocumentObject in order to prevent re-computation?
I had a look on the code and I think it's easy to implement.
A freezed object will always return false to mustRecompute() and it's properties will be readonly.

@wwmayer
Copy link
Contributor

wwmayer commented Feb 24, 2024

you tell me about this issue, do you think a Freezed state is needed for DocumentObject in order to prevent re-computation?

Unlike to my suggestion at that time I wouldn't use a PropertyBool any more because this has an extra cost of additional memory for every object type which is unused in 99% of all cases. I prefer to extend the ObjectStatus enum with a further value e.g. "NonParametric" or "Frozen" or whatever.

A frozen object will always return false to mustRecompute()

Yes.

and it's properties will be readonly

This will be a bit tricky because the flag can be reverted and there is no easy way to restore the original status of all properties. I would just leave the properties untouched. It should be checked if doing nothing inside DocumentObject::onChanged is sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Feature FR for improvements or new features
Projects
None yet
Development

No branches or pull requests

5 participants