How do I use TNaming with a face that moves?

The attached screenshot shows a simple 10x10x10 box and a 10x10x15 box. I have offset the second box from the first, but they are both created at the 'origin'. In other words:

Box1 = BRepPrimAPI_MakeBox(10., 10., 10.);

Box2 = BRepPrimAPI_MakeBox(10., 10., 15.);

As you can see, I have  filleted Box1. The idea here is I want to fillet Box1, then grow it 15 in the z-direction and re-fillet the same edge. I am trying to use the TNaming package to retain a constant reference to the filleted edge. After the fillet operation, and then increasing the size of the box, my TDF_Data tree looks something like this

0:1 Name: Selection Root Node
--0:1:1 Name: A selected edge. Sub-node is the context Shape, Evolution = ???
----0:1:1:1 , Evolution = N/A, this is the Context Shape for the Selected Edge
0:2 Name: BaseShapes
--0:2:1 Name: Generated Base Shape, Evolution = PRIMITIVE
----0:2:1:1 Name: Generated Faces
------0:2:1:1:1 , Evolution = PRIMITIVE
------0:2:1:1:2 , Evolution = PRIMITIVE
------0:2:1:1:3 , Evolution = PRIMITIVE
------0:2:1:1:4 , Evolution = PRIMITIVE
------0:2:1:1:5 , Evolution = PRIMITIVE
------0:2:1:1:6 , Evolution = PRIMITIVE

--0:2:2 Name: Modified Box Node, Evolution = MODIFY
----0:2:2:1 Name: Modified faces
------0:2:2:1:1 , Evolution = MODIFY
------0:2:2:1:2 , Evolution = MODIFY
------0:2:2:1:3 , Evolution = MODIFY
------0:2:2:1:4 , Evolution = MODIFY
------0:2:2:1:5 , Evolution = MODIFY

0:3 Name: FilletShapes
--0:3:1 Name: Filleted Shape, Evolution = PRIMITIVE
----0:3:1:1 Name: Generated Faces
----0:3:1:2 Name: Faces Generated from Edges
------0:3:1:2:1 , Evolution = GENERATED
----0:3:1:3 Name: Faces generated from Vertexes

 

I've added 5 of the 6 faces from the original box as a "MODIFY" evolution. The Bottom face has not changed. The problem I have is that when I run "TNaming_Selector::Solve" on the label at tag "0:1:1", it fails. If instead of changing the height I change both the depth and the height, the Solve does not fail.

 

My guess is that this has something to do with the fact that the topology of the Top face does not change, only its location changes. But how do I track that properly for TNaming? I've tried using "TNaming::Displace", but this doesn't seem to add any information to the TDF_Data tree and the "TNaming_Selector::Solve" still fails.

 

Wolfgang Sanyer's picture

Figured this out: since I was not really 'moving' the face, but rather creating an entirely new Box, I needed to track the topological evolution of all six faces, not just those that changed. If, instead of creating a new Box, I had transformed the original box, I could probably have gotten away with only tracking the togolocigal evolution on the changed faces.

Forum supervisor's picture

Dear Wolfgang,

As announced in OCCT 7.0.0 Release Notes a section about topological naming mechanism has been added in OCAF documentation. 

Please read the chapter “4 OCAF Shape Attributes” of OCAF User's Guide (occt_ocaf.pdf available with the official OCCT version) describing both basics of NamedShape usage and basics of topological naming mechanism (4.6 Topological naming).

For efficient resolving of your actual tasks you can consider using our support services (https://www.opencascade.com/content/technology-support).

Best Regards,

FSR

Wolfgang Sanyer's picture

Dear Forum Supervisor,

I have read the aforementioned chapter in the official documentation multiple times. While helpful, it is still rather sparse and spartan in the information it offers.

Sincerely,

Wolfgang