]> OCCT Git - occt.git/commitdiff
Data Exchange, IGES Export - Missing Model Curves in transfer cache #483
authorikochetkova <irina.kochetkova@opencascade.com>
Tue, 22 Apr 2025 17:01:06 +0000 (18:01 +0100)
committerdpasukhi <dpasukhi@opencascade.com>
Mon, 19 May 2025 21:21:05 +0000 (22:21 +0100)
Check if the curve was already created and use it. Works for shared edges cases.

src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx

index 586f67291ffdb57d091f2fe183fd3a50eb75ce4b..266abaf2fbb288481fcb3a6edf5b80811c48b06f 100644 (file)
@@ -317,6 +317,13 @@ Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferShape(
 
 Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferEdge(const TopoDS_Edge& myedge)
 {
+  Standard_Integer anInd = IndexEdge(myedge);
+  if (anInd != 0)
+  {
+    Handle(IGESData_IGESEntity) ICurve3d = Handle(IGESData_IGESEntity)::DownCast(myCurves(anInd));
+    if (!ICurve3d.IsNull())
+      return ICurve3d;
+  }
   BRepToIGES_BRWire BR(*this);
   BR.SetModel(GetModel());
   TopTools_DataMapOfShapeShape anEmptyMap;