Face numbering issue

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
jmaustpc
Posts: 9619
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Face numbering issue

Postby jmaustpc » Thu Oct 22, 2015 3:44 pm

paul18 wrote:@quick61

Interesting way of processing; however I've ever learnt that chamber/fillets must not be drawn in the sketch and at the latest stage (especially if one want to remove it) - but I did not respected it at all ... how lazy I am ! :oops:
Hi Paul
Please do not put your version data in your signature, the problem is that one day when you update it, it will update in all your old posts and hence then show all the wrong version data in your previous posts.

Please also note that 0.15 is now rather dated, there are literally hundreds of bug fixes and new features in the daily PPA (which will become 0.16). It seems a shame to have the advantages of being on Ubuntu and waste this by only running the "release" PPA.

Jim
triplus
Posts: 9136
Joined: Mon Dec 12, 2011 4:45 pm

Re: Face numbering issue

Postby triplus » Thu Oct 22, 2015 11:30 pm

paul18 wrote:I've been noticing that some basic changes in the CAD model i.e. if I simply change a radius value without adding any new edge nor surface, the surface number has been change as well
Test.png
Test.png (81.48 KiB) Viewed 915 times
Can't confirm face re-numbering due to changing mentioned radius values. The cause therefore probably would need to be found elsewhere.

P.S. The issue you experienced could still be related to face re-numbering. For example mixing modelling in production and in development release or by using different OCC/OCE ... but this is just thinking out loud and the real cause would need to be confirmed by reproducing the issue consistently.
triplus
Posts: 9136
Joined: Mon Dec 12, 2011 4:45 pm

Re: Face numbering issue

Postby triplus » Fri Oct 23, 2015 12:21 am

I never investigated this but having 2 instances of FreeCAD where on one instance auto refine options in preferences are set to ON and on another set to OFF. Opening a model like this on both location after recompute operation probably could produce different results regarding face numbering?

Opinions?

P.S. Therefore if that is correct to fix the model (assembly) the same setting would need to be set as it was set when creating the model (assembly).
paul18
Posts: 174
Joined: Sat Jul 19, 2014 7:44 pm
Location: France

Re: Face numbering issue

Postby paul18 » Fri Oct 23, 2015 7:17 am

jmaustpc wrote:
Please also note that 0.15 is now rather dated, there are literally hundreds of bug fixes and new features in the daily PPA (which will become 0.16). It seems a shame to have the advantages of being on Ubuntu and waste this by only running the "release" PPA.

Jim
Why I'm using the latest stable release: because I'm performing FreeCAD training courses in my Fablab, with people having essentially Windows OS - thus I'm using the same FreeCAD release than them.

Some time ago I compiled FreeCAD 0.1 in order to have the 2 versions, but was not under PPA (I want the 0.15 and 0.16 coexist)

Paul
User avatar
microelly2
Posts: 4560
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Face numbering issue

Postby microelly2 » Fri Oct 23, 2015 8:50 am

DeepSOIC wrote:I had this stuff happen, too, even in some very simple situations. I'm afraid the only thing that is going to resolve it is the topological naming, most of us are dreaming of.
Is there already someone working on topological naming?
My idea is:
I extend the part object with extra information - a facename-facenumber mapping
I have started some work in this direction viewtopic.php?f=22&t=12829
When a part is recomputed the part.Shape is replaced and the ordering of faces change.
But parts forked on the part depend on the old face numbering - so there must be a reconnecting procedure too.
I want to preserve the old Shape for a short time, then i compare the old shape and the new shape and update the facename-facenumber mapping.
If faces change the geometry or are extra added/deleted some sophisticated methods are need.
but at the end there is a new list where facenames mapt to the same "places" as before the change.

Can this work?
I will give it a try.
ickby
Posts: 2936
Joined: Wed Oct 05, 2011 7:36 am

Re: Face numbering issue

Postby ickby » Fri Oct 23, 2015 9:23 am

jan started a implementation of topological naming quite some time ago. There is a thread in this forum from him: viewtopic.php?f=17&t=4608

He also keeps a map between shape and name and tries to update it whenever a shape is modified. He uses the occ functionality which provides topological naming for this, which makes sense as the algorithm itself know best what was changed. A pure comparing algorithm as you describe it may be possible, but also seems very complicated. The problem are the many many cases that can occure which need to be handled. there are quite a few papers out there which describe the problem quite well, so I think a study of the issue would be the first needed thing when one is going for a completely custom implementation.
jmaustpc
Posts: 9619
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Face numbering issue

Postby jmaustpc » Sat Oct 24, 2015 2:32 am

paul18 wrote:because I'm performing FreeCAD training courses in my Fablab
Its important then, to tell them to all run the auto refine options at the default "off", if they need a refine they can use an OpenSCAD refine or Part WB Refine, where needed. A recompute (often triggered automatically) will often corrupt a model that was created with the settings the opposite way to that which they are when you view the file in your FreeCAD. Therefore the safest option is to leave it at the default, "auto refine off".

This is because a refine removes unneeded edges/faces etc. hence changes all the numbering, sketches end up mapped to different faces or no longer have a face to be mapped to as the face numbers change in a solid.
tom
Posts: 69
Joined: Sun Mar 29, 2015 9:20 pm

Re: Face numbering issue

Postby tom » Sat Oct 24, 2015 8:24 am

I never was aware of the auto-refine making the missing topology naming situation even worse. All my models suffer from face/edge renumbering even when small dimension changes occur. Now I know that turning off the auto refine may improve the situation a bit. But here come two ideas in my mind:
  • There was a statement that turning of the auto refine breaks models which were created with auto refine. So there is no practical way back from the auto refine, because one has to remember which model was created with auto refine and then has to set the auto refine to that original value. Would it help to store the auto refine setting within the document so that it can be re-applied automatically when the document is opened on another machine with a different auto refine setting?
  • Many user love the auto refine setting because the model looks much nicer without an extra manual step. Would it be possible to have a auto refine only for visual purposes without touching the underlaying model?
User avatar
bejant
Posts: 6059
Joined: Thu Jul 11, 2013 3:06 pm

Re: Face numbering issue

Postby bejant » Sat Oct 24, 2015 2:34 pm

tom wrote:here was a statement that turning of the auto refine breaks models which were created with auto refine. So there is no practical way back from the auto refine, because one has to remember which model was created with auto refine and then has to set the auto refine to that original value
It's easy enough though, if a good model doesn't appear correctly after it has been opened I just change my Preferences and run the ForceRecompute macro. (No need to open the FreeCAD document again.)
tom wrote:Would it help to store the auto refine setting within the document so that it can be re-applied automatically when the document is opened on another machine with a different auto refine setting?
This would be a good feature request for the bug tracker if it's not there already. (I think it was discussed before in the forum but don't remember if there's a ticket)
tom wrote:Many user love the auto refine setting because the model looks much nicer without an extra manual step. Would it be possible to have a auto refine only for visual purposes without touching the underlaying model?
To create a separate refined copy that doesn't update if the model changes, use the Part WB > Refine Shape. To create a copy that does update if the model is changed, use the OpenSCAD WB > Refine Shape.
tom
Posts: 69
Joined: Sun Mar 29, 2015 9:20 pm

Re: Face numbering issue

Postby tom » Sun Oct 25, 2015 3:36 pm

bejant wrote:
tom wrote:Many user love the auto refine setting because the model looks much nicer without an extra manual step. Would it be possible to have a auto refine only for visual purposes without touching the underlaying model?
To create a separate refined copy that doesn't update if the model changes, use the Part WB > Refine Shape. To create a copy that does update if the model is changed, use the OpenSCAD WB > Refine Shape.
Thanks for your reply. But the OpenSCAD WB > Refine Shape would help only if the model is already complete (i.e. the model tree does not change anymore) and only some parameter changes have to be applied. If you want to add a new feature then you must delete the refined shape, add the new feature and then recreate the refined shape. This means you have two extra manual steps per added feature. Since IMO we all use computers in order to work more efficiently it would be better to avoid these additional manual steps. Thats why I suggested to let FreeCAD automatically create a refined shape only for visual purposes, i.e. this refined shape is only a temporary one and it is replaced/updated always when the model changes. It is just an idea to improve the visual experience of FreeCAD (that's why many of the users love the auto refine). Of course there are some points to be considered like the performance impact and the behavior when interactively working with the model through the visual refined model.