View Issue Details

IDProjectCategoryView StatusLast Update
0033765CommunityOCCT:Data Exchangepublic2024-08-08 21:22
Reportergalbramc Assigned Todpasukhi  
PrioritynormalSeveritymajor 
Status assignedResolutionopen 
PlatformLinuxOSUbuntu 20.04 
Product Version7.8.0 
Summary0033765: Data Exchange, IGES Export - Missing Model Curves in transfer cache
DescriptionIGESControl_Writer with mode=1 missing Model Curves in Transfer_FinderProcess
I'm trying to set name and color attributes for Curves when exporting to BRep IGES files, but the Curve IGES entities are missing the Curve entities in the Transfer_FinderProcess. The attached example produces the following output:

Line DNum should !=0: DNum=0
Line DNum should !=0: DNum=0
Line DNum should !=0: DNum=0
Line DNum should !=0: DNum=0
Line DNum should !=0: DNum=0
Line DNum should !=0: DNum=0
Line DNum should !=0: DNum=0
Line DNum should !=0: DNum=0
Line DNum should !=0: DNum=0
Line DNum should !=0: DNum=0
Line DNum should !=0: DNum=0
Line DNum should !=0: DNum=0

With the proposed fix below I get:

Line DNum should !=0: DNum=19
Line DNum should !=0: DNum=23
Line DNum should !=0: DNum=25
Line DNum should !=0: DNum=27
Line DNum should !=0: DNum=29
Line DNum should !=0: DNum=31
Line DNum should !=0: DNum=33
Line DNum should !=0: DNum=35
Line DNum should !=0: DNum=37
Line DNum should !=0: DNum=39
Line DNum should !=0: DNum=41
Line DNum should !=0: DNum=43

Steps To ReproduceCompile and execute the attached code snippet.
Additional information
and documentation updates
This change to BRepToIGESBRep_Entity seems to resolve the issue:
Standard_Integer BRepToIGESBRep_Entity::AddEdge(const TopoDS_Edge& myedge,
                        const Handle(IGESData_IGESEntity)& mycurve3d)
{
  if ( myedge.IsNull()) return 0;
  
  const TopoDS_Shape& E = myedge;
  Handle(IGESData_IGESEntity) C = mycurve3d;
  Standard_Integer index = myEdges.FindIndex(E);
  if (index == 0) {
    index = myEdges.Add(E);
    myCurves.Add(C);
  } else {
    myCurves.Substitute(index,C);  // Fix: The most recent curve must be stored
  }
  
  return index;
}
TagsNo tags attached.
Test case number

Attached Files

  • BRepToIGESBRep_Entity.cpp (1,263 bytes)
  • Makefile (907 bytes)

Activities

galbramc

2024-07-13 21:41

reporter  

BRepToIGESBRep_Entity.cpp (1,263 bytes)
Makefile (907 bytes)

dpasukhi

2024-07-14 09:42

administrator   ~0116172

Dear @galbramc thank you for your. It is very helpful.
I will process your bug in the next week. But at least I will try to do that.
In case, if there will be no any notes or news, please send a new note to remind.

I found a possible more clear fix, let me check and process it :)
If you would like to became a contributor, please check https://dev.opencascade.org/content/occt-github-new-way-collaborate

dpasukhi

2024-07-14 09:43

administrator   ~0116173

Last edited: 2024-07-14 09:44

@galbramc but to prepare more correct fix, could you please share file sample?
And prepared test case :)

galbramc

2024-07-14 18:26

reporter   ~0116174

Thank you for the prompt response!

Unfortunately getting the CLA signed by my employer is too much of a hassle for me to become a contributor.

I'm not sure what sample file you would like me to share? The problem is with the export (I believe the import is ok). I provided the attached BRepToIGESBRep_Entity.cpp file that reproduces the problem. Could you be more specific about what you would like? I also, unfortunately, am not familiar with the testing framework used by OCC to provide a test case... I regularly use other unit testing frameworks.

I'd be glad to test out your clearer fix.

dpasukhi

2024-07-14 20:24

administrator   ~0116175

Thank you, sorry, i didn't check the cpp file.
I thought that that filed contained fix. But it is a sample to reproduce. That even more helpful.

galbramc

2024-07-14 20:29

reporter   ~0116176

I should point out that what I put together was minimal to demonstrate this specific problem. I think a more rigorous test would be to loop over all the sub-shapes and make sure they are found in the cache.

Please let me know if I can help in any other way.

galbramc

2024-07-22 19:49

reporter   ~0116279

@dpasukhi I was curious if you had an update on the cleaner fix for this bug? I believe your first message asked me to ping you around this time.

dpasukhi

2024-07-22 20:05

administrator   ~0116280

@galbrams thank you.
Yes, I was asking to ping me. My apologies, there is no update for now. I will try to prepare changes in ongoing days.

Issue History

Date Modified Username Field Change
2024-07-13 21:41 galbramc New Issue
2024-07-13 21:41 galbramc Assigned To => ika
2024-07-13 21:41 galbramc File Added: BRepToIGESBRep_Entity.cpp
2024-07-13 21:41 galbramc File Added: Makefile
2024-07-14 09:39 dpasukhi Assigned To ika => dpasukhi
2024-07-14 09:39 dpasukhi Summary IGESControl_Writer with mode=1 missing Model Curves in Transfer_FinderProcess => Data Exchange, IGES Import - Missing Model Curves in transfer cache
2024-07-14 09:39 dpasukhi Description Updated
2024-07-14 09:39 dpasukhi Additional Information Updated
2024-07-14 09:42 dpasukhi Note Added: 0116172
2024-07-14 09:43 dpasukhi Note Added: 0116173
2024-07-14 09:44 dpasukhi Note Edited: 0116173
2024-07-14 18:26 galbramc Note Added: 0116174
2024-07-14 20:22 dpasukhi Summary Data Exchange, IGES Import - Missing Model Curves in transfer cache => Data Exchange, IGES Export- Missing Model Curves in transfer cache
2024-07-14 20:24 dpasukhi Note Added: 0116175
2024-07-14 20:25 dpasukhi Summary Data Exchange, IGES Export- Missing Model Curves in transfer cache => Data Exchange, IGES Export - Missing Model Curves in transfer cache
2024-07-14 20:29 galbramc Note Added: 0116176
2024-07-22 19:49 galbramc Note Added: 0116279
2024-07-22 20:05 dpasukhi Note Added: 0116280
2024-07-22 20:05 dpasukhi Status new => assigned