Topological Naming, My Take

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
freecad-heini-1
Posts: 6920
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Topological Naming, My Take

Postby freecad-heini-1 » Wed Apr 11, 2018 11:51 am

realthunder wrote:
Wed Apr 11, 2018 11:37 am
freecad-heini-1 wrote:
Wed Apr 11, 2018 11:34 am
Whow! Very nice - Alpha Channel for set colors!
Is that integrated in your new appimage (Ubuntu), as well as all the new topo naming improvements?
Not yet, but new release is coming soon.
I can feel it, it's hot, because it's in your frypan. :lol:
Mhhh, it smells tasty ... 8-)
Rene
Posts: 24
Joined: Sun Mar 08, 2015 6:32 pm

Re: Topological Naming, My Take

Postby Rene » Wed Apr 11, 2018 2:38 pm

I try to read almost everything here, another matter is how much I understand. I do comprehend that the topological naming issue is with 3D objects and my current issue is with a sketch. Since they look kinda similar I thought to ask anyway.

My problem is with the green dimension in screenshot (filename:FCD_green_dim.jpg). My sketches in the beginning have 90deg corners and later add radii or chamfers if I decide so. But if i do that the (6.1mm) dimension disappears. For me the point (rightmost point of the previous green 6.1 mm dimension) just moved little downwards, but FreeCAD deletes that dimension. I have had the same experience with some commercial 3D software in the past.

I will accept that only I have this problem, not drawing the correct sketch first place, and I should learn-to-CAD. I will also accept that this is a problem, but not a part of solving the topological naming issue.

Thanks

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13509 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 0258808ccb6ba3bd5ea9312f79cd023f1a8671b7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Estonian/Estonia (et_EE)
Attachments
FCD_green_dim_gone.jpg
FCD_green_dim_gone.jpg (96.36 KiB) Viewed 784 times
FCD_green_dim.jpg
FCD_green_dim.jpg (132.05 KiB) Viewed 784 times
Last edited by Rene on Wed Apr 11, 2018 9:25 pm, edited 1 time in total.
stuff
chrisb
Posts: 24281
Joined: Tue Mar 17, 2015 9:14 am

Re: Topological Naming, My Take

Postby chrisb » Wed Apr 11, 2018 5:02 pm

The dimension disappears as soon as the point is removed. You could remove the coincidence pull the two line ends apart and add the chamfer yourself, then you can keep it. It still might be in the wrong place (at the left of the two points).
Another possibility is to use the general distance point/line. But the problem will reoccur as soon as you chamfer the corner of the point.

You should avoid it by applying the dimensional constraints later. Which is good advice anyway, because you should always prefer geometry constraints over dimensional ones.
realthunder
Posts: 1538
Joined: Tue Jan 03, 2017 10:55 am

Re: Topological Naming, My Take

Postby realthunder » Mon Apr 16, 2018 1:13 am

Rene wrote:
Wed Apr 11, 2018 2:38 pm
I will accept that only I have this problem, not drawing the correct sketch first place, and I should learn-to-CAD. I will also accept that this is a problem, but not a part of solving the topological naming issue.
This is somewhat related to topological naming. However, it is out of the scope of my take here, which only applies to modeling using OCCT. This problem is more specific, and can only be solved inside Sketcher itself. The chamfer essentially split the points into to two. Sketcher can, for example, check which point's horizontal coordinates remains the same, and move the horizontal dimension constraint there, same for vertical one.
Try Assembly3 (latest version 0.11) along 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
realthunder
Posts: 1538
Joined: Tue Jan 03, 2017 10:55 am

Re: Topological Naming, My Take

Postby realthunder » Mon Apr 16, 2018 1:18 am

PartDesign is getting colorful, too. Cheers!

Image
Try Assembly3 (latest version 0.11) along 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
User avatar
DeepSOIC
Posts: 7600
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Topological Naming, My Take

Postby DeepSOIC » Mon Apr 16, 2018 8:26 pm

I've been reading through OCC 7.2.0 release notes, and picked this:
Summary: Create a mechanism to serve shape history in a common way for algorithms accepting and producing shapes.
Shape history mechanism has been implemented in the new class BRepTools_History. It supports history for shapes with types 'vertex', 'edge', 'face' and 'solid' and allows defining relations 'generated', 'modified' and 'removed' between the accepted and the produced shapes. It provides algorithm to merge two histories of sequentially applied algorithms. It is positioned as a replacement of widely used history methods Generated, Modified, IsDeleted.
Type BRepTools_ReShape has been extended to support the BRepTools_History and correctly merge history of several shapes merged to a single one.
BRepTools_History history has been implemented for algorithm ShapeUpgrade_UnifySameDomain. The history of changes in the initial shape now considers all shapes created by the algorithm as modified instead of generated shapes.
▪ to get the modified shapes, use History()->Modified()
▪ to check whether the shape has been deleted, use History()>IsRemoved().
I thought it might be interesting for you, one of the two who messes with toponaming. If you already know this, then sorry for the noise ;)
realthunder
Posts: 1538
Joined: Tue Jan 03, 2017 10:55 am

Re: Topological Naming, My Take

Postby realthunder » Mon Apr 16, 2018 10:30 pm

DeepSOIC wrote:
Mon Apr 16, 2018 8:26 pm
I thought it might be interesting for you, one of the two who messes with toponaming. If you already know this, then sorry for the noise ;)
Thanks for the reference. Looks a lot like FC ShapeHistory class, but can be across different type of shapes I presume.
Try Assembly3 (latest version 0.11) along 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
Matael
Posts: 82
Joined: Tue Mar 01, 2016 10:50 pm
Location: France

Re: Topological Naming, My Take

Postby Matael » Tue Apr 17, 2018 1:27 pm

Hi!
It sounds like the topological naming is included in the freecad version where the assembly 3 is. (If I understood it right)

So I can give you a case where the topological naming algorithme don't work

To reproduce :
Select pad001 and check reverse direction.

The difference between with and without topological naming solution :
with => an error appear on Sketch002 (for Pocket)
without => Holes generated by pocket move to an other face

OS: Ubuntu 16.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.5235 (Git shallow) AppImage
Build type: None
Branch: LinkStage3
Hash: ccaa87e12aaadbd3106607fc503542a863b742da
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
Attachments
did_i_broke_topologicalnaming.fcstd
(24.17 KiB) Downloaded 18 times
chrisb
Posts: 24281
Joined: Tue Mar 17, 2015 9:14 am

Re: Topological Naming, My Take

Postby chrisb » Tue Apr 17, 2018 9:44 pm

Matael wrote:
Tue Apr 17, 2018 1:27 pm
Version: 0.17.5235 (Git shallow) AppImage
I checked it here and works perfectly. I'm not sure with realthunder's numbering scheme but is it possible that you have a completely outdated version?

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13743 (Git)
Build type: Release
Branch: LinkStage3
Hash: 18bd442c38df803b154f63f7ab3c70bd3f0cc432
Python version: 2.7.14
Qt version: 5.10.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
realthunder
Posts: 1538
Joined: Tue Jan 03, 2017 10:55 am

Re: Topological Naming, My Take

Postby realthunder » Tue Apr 17, 2018 10:41 pm

Matael wrote:
Tue Apr 17, 2018 1:27 pm
Hi!
It sounds like the topological naming is included in the freecad version where the assembly 3 is. (If I understood it right)

So I can give you a case where the topological naming algorithme don't work

To reproduce :
Select pad001 and check reverse direction.

The difference between with and without topological naming solution :
with => an error appear on Sketch002 (for Pocket)
without => Holes generated by pocket move to an other face
That's how topological naming works. In case of topological changes, the geometry element name is not reused. And an explicit error will be shown to the user in order for him to fix it. In your case, after the pad change, the face attached by the sketch is changed, causing its element name to change.

The new topological naming here does not mean it can (or even should) automatically fix any reference changes due to model changes. It is like the fillet example I showed here. If the edge is changed, you'll see an error. I added element reference guessing logic in the fillet editing tools, so you may see the correct edge selected when you double clicking the fillet. But it is still guessing here. It may auto select too many edges. In case of sketch, there is only one face to select, so I didn't add the guessing logic. The user just need to select the face again.
Try Assembly3 (latest version 0.11) along 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