Topological Naming, My Take

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Topological Naming, My Take

Post by realthunder »

freecad-heini-1 wrote: Tue Apr 24, 2018 1:46 pm I created a new video with the same stresstest for Pro-Engineer Wildfire 5.0. Please have a closer look if I change the edges in the Creo sketcher. It's needed to use the edit tool, select the old edge and replace (restore) it with the new edge. I guess this could be fundamental for you to realize that maybe this trick is needed to avoid toponaming problems in Creo. Hopefully you can implement something similar that will help Freecad.
They put one's pants on one leg at a time.
Ah-ha! I have already added that functionality in FC. I mean changing the sketch edge. In fact that's what get me started with this topo naming adventure. Originally, I wanted to to able to link to some private geometry inside sketch, then saso suggested adding Sketch export feature, and posted a video of some CAD doing the edge replacing magic. I thought it is a nice trick, so I added it to FC sketcher. Every sketcher edge now has a unique integer ID, which the user can change using Python. We may add more elegant GUI similar to what Creo does here. I meaning checking reference before delete, and ask for replacement. But that is already doable in Python. In fact, right now, in my branch, if you delete an edge first, then create another edge at the exact location, it will reuse the ID. There is some GUI problem, though. You'll need to carefully align the points, otherwise you may missed it and get a different ID. You can check the ID in selection view, and redo it if you get a different ID. If you can get back the same ID, then with my naming scheme, the topology will stay the same.

Image


As for the too many suggested element problem you showed, the cause is that I encode the extrusion element name such that some of it can be traced back to the same edge in the extruding sketch. The problem may occur when you choose the extruding face, but may not occur when you select other faces. Maybe that's why you didn't see this problem in your home PC. I'll add some more information into the element name to prevent tracing too deep into the history.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
freecad-heini-1
Veteran
Posts: 7790
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Topological Naming, My Take

Post by freecad-heini-1 »

@realthunder, please can you recommend the right way to replace an edge with a bspline or arc or something else to avoid problems.
What do think about my approach with first replace the edge into a construction element (blue) and then sketch the new element?
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Topological Naming, My Take

Post by realthunder »

freecad-heini-1 wrote: Wed Apr 25, 2018 6:10 am @realthunder, please can you recommend the right way to replace an edge with a bspline or arc or something else to avoid problems.
What do think about my approach with first replace the edge into a construction element (blue) and then sketch the new element?
First, only edges having both of their starting and ending vertex connected are considered for potential auto edge replacement. Simply delete the edge you want to replace, and then create a new one connecting to the same pair of vertices. Please bring up the selection view panel (Menu, View->Panels->Selection View) before you do this to confirm the newly created edge has the same ID as the deleted one.

The sketch geometries must all have unique IDs, and that is why you have to delete the old edge first in order for the new edge to reuse that ID. When creating the new edge, try to align the starting and ending vertex to the existing ones. If the selection view shows the new edge has the wrong ID, simply undo and try again. I'll improve the GUI handling in the future, to make it easy to align. And also add toolbar action to let user manually swap IDs (PS. I should have thought about this option earlier. It is so much easier to implement).
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
freecad-heini-1
Veteran
Posts: 7790
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Topological Naming, My Take

Post by freecad-heini-1 »

realthunder wrote: Tue Apr 24, 2018 11:15 pm As for the too many suggested element problem you showed, the cause is that I encode the extrusion element name such that some of it can be traced back to the same edge in the extruding sketch. The problem may occur when you choose the extruding face, but may not occur when you select other faces. Maybe that's why you didn't see this problem in your home PC. I'll add some more information into the element name to prevent tracing too deep into the history.
That makes sense. So the recommendation to use datum-planes or skeleton faces instead of faces from the object is the best method to avoid topo naming issues.
And this is what I tried to explain with my commend for the need to teach Freecad user concenring this problematic.
For Creo and Solidworks you can attend special top-down-design training for 1000€ per day. :mrgreen:
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Topological Naming, My Take

Post by realthunder »

freecad-heini-1 wrote: Wed Apr 25, 2018 6:10 am What do think about my approach with first replace the edge into a construction element (blue) and then sketch the new element?
I think your manually edge replacing procedure is in fact better than auto replace, at least in some use case, e.g. when the user actually wanted to preserve the original edge. Here are some quick code to add this function. I've also fixed history tracing problem. I'll do some more tests and release a new version for you to test soon.

Image
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Topological Naming, My Take

Post by Jee-Bee »

As far as i can see (my collegues us most SW I and a few Others use Creo) Creo is by far more stable SW hangs multiple times a day (specially wit big models) creo don't hang with normal use...
freecad-heini-1
Veteran
Posts: 7790
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Topological Naming, My Take

Post by freecad-heini-1 »

realthunder wrote: Wed Apr 25, 2018 9:02 am
freecad-heini-1 wrote: Wed Apr 25, 2018 6:10 am What do think about my approach with first replace the edge into a construction element (blue) and then sketch the new element?
I think your manually edge replacing procedure is in fact better than auto replace, at least in some use case, e.g. when the user actually wanted to preserve the original edge. Here are some quick code to add this function. I've also fixed history tracing problem. I'll do some more tests and release a new version for you to test soon.

Image
Whow realthunder. Very nice!!!
Thank you so much.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Topological Naming, My Take

Post by realthunder »

freecad-heini-1 wrote: Wed Apr 25, 2018 10:05 am Whow realthunder. Very nice!!!
Thank you so much.
New version is released. You can also test the PartDesign. When the PartDesign fillet/chamfer is broken, to get back old shape while in the fillet editing tool, you can either click 'Cancel' or 'Undo'.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
freecad-heini-1
Veteran
Posts: 7790
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Topological Naming, My Take

Post by freecad-heini-1 »

realthunder wrote: Thu Apr 26, 2018 10:36 am
freecad-heini-1 wrote: Wed Apr 25, 2018 10:05 am Whow realthunder. Very nice!!!
Thank you so much.
New version is released. You can also test the PartDesign. When the PartDesign fillet/chamfer is broken, to get back old shape while in the fillet editing tool, you can either click 'Cancel' or 'Undo'.
Great, your new sketcher tool "swap the id" do the same as in Creo. It solves the topo-naming issue if the user replace an edge with a dependent fillet or chamfer. Very nice and great, congratulation. 8-)
Only my hard tapper-angle minus 3° in two direction stresstest show two more edges than the two intended ones.

In some difficult cases Creo can show you the model in a status just one step before the current design change.
A small window opens and you can see the old reference (selected edges) and fillet or chamfer highlighted. You can zoom in- and out and rotate the model and use flat-lines or wireframe view to inspect the "old" model.
That can help the user to select the right edges if needed.
I have no clue / idea how complicated it will be to implement such a feature.
Saving the model before a difficult design change and open it in a new window, if needed, will do the job as well.

Very nice to see such big steps forward to solve the topo-naming problem.

Best regards
Wilfried
Last edited by freecad-heini-1 on Thu Apr 26, 2018 3:52 pm, edited 1 time in total.
freecad-heini-1
Veteran
Posts: 7790
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Topological Naming, My Take

Post by freecad-heini-1 »

I did a test with partdesign, but I see no possibility to create a taper outward angle, later in the design history.
And I didn't know how to create a feature inbetween two others. I played around with tip, but there was a sketch which lost it's face or something else. I'm not a fan from partdesign.
I know how to move an object after an other feature, but that whole linking system seems to be not really logical to me as well as the containers and its placements. PartDesign has some maniac restrictions, I hope some of them are unneeded after topo naming will be solved.
Post Reply