Dissallowing cross coordinate-system links

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
wmayer
Founder
Posts: 20074
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dissallowing cross coordinate-system links

Post by wmayer »

ickby
Veteran
Posts: 3117
Joined: Wed Oct 05, 2011 7:36 am

Re: Dissallowing cross coordinate-system links

Post by ickby »

I have a look at this tomorrow.
ickby
Veteran
Posts: 3117
Joined: Wed Oct 05, 2011 7:36 am

Re: Dissallowing cross coordinate-system links

Post by ickby »

Werner, I thought a bit about the recompute and isTouched() issue https://forum.freecadweb.org/viewtopic. ... 40#p187903

My thought is that I like to revert the change and not check for isTouched, as you pointed out that it breaks the recompute logic. Now I also don't want to make any major changes to the recompute, this was enough trouble already. So my idea is to solve it within the geofeaturegroup itself. When adding somethign to a GeoFeatureGroup it could touch all link properties (deally check if it has a error and only touch those who have one). This should also enable the recompute.

Would that be an acceptible solution?
wmayer
Founder
Posts: 20074
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dissallowing cross coordinate-system links

Post by wmayer »

Would that be an acceptible solution?
It should be tested but it sounds good to me.
wmayer
Founder
Posts: 20074
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dissallowing cross coordinate-system links

Post by wmayer »

I found a new issue with the base features:
1. Create Part cylinder
2. Select cylinder and create body
3. Select the also created BaseFeature and delete it
4. Undo # there are two base features now
5. for every Undo/Redo a new base feature is created

This behaviour is caused by the implementation of Body::onChanged. I think here we can check if an Undo/Redo operation is running and just do nothing in this case. git commit 7d4eafb

One minor thing:
Assuming we have imported a STEP model and create a body but have forgotten to select the model. Now we have an empty body but cannot "move" the model into the body. Wouldn't it make sense to implement the drag and drop of the body to create a base feature on the fly that references this model?
ickby
Veteran
Posts: 3117
Joined: Wed Oct 05, 2011 7:36 am

Re: Dissallowing cross coordinate-system links

Post by ickby »

thanks for the fix, never tried undo/redo...
Assuming we have imported a STEP model and create a body but have forgotten to select the model. Now we have an empty body but cannot "move" the model into the body. Wouldn't it make sense to implement the drag and drop of the body to create a base feature on the fly that references this model?
You can set the BaseFeature property of the body, it will create the BaseFeature when set (or update it if already available). But the drag'n'drop is a good idea, it could work the same: create the base feature if not available, or update if it is already set.
wmayer
Founder
Posts: 20074
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dissallowing cross coordinate-system links

Post by wmayer »

Another little thing: the body feature must make sure that the linked base feature is a solid because otherwise following operations don't work correctly.Fixed.
User avatar
Kunda1
Veteran
Posts: 13443
Joined: Thu Jan 05, 2017 9:03 pm

Re: Dissallowing cross coordinate-system links

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply