1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0026174: Data Exchange, IGES - Loss of color after the second write of file

A copy of myface is made, where further on the copy the geometry changes. We connect the face, wire, edge of the original shape with the one whose geometry was changed. This is done in order to get the original shape in the TransferWire() and TransferEdge() methods.
This commit is contained in:
ssafarov
2021-11-15 18:15:33 +03:00
parent e463b2f685
commit 6ba81a695f
8 changed files with 187 additions and 165 deletions

View File

@@ -24,6 +24,8 @@
#include <BRepToIGES_BREntity.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
class IGESData_IGESEntity;
class TopoDS_Shape;
class TopoDS_Vertex;
@@ -90,22 +92,22 @@ public:
//! this member returns a NullEntity.
Standard_EXPORT Handle(IGESData_IGESEntity) TransferVertex (const TopoDS_Vertex& myvertex, const TopoDS_Face& myface, gp_Pnt2d& mypoint);
//! Transfert an Edge entity from TopoDS to IGES
//! If this Entity could not be converted,
//! this member returns a NullEntity.
//! isBRepMode indicates if write mode is BRep
//! (True when called from BRepToIGESBRep and False when from BRepToIGES)
//! If edge is REVERSED and isBRepMode is False 3D edge curve is reversed,
//! otherwise, not.
Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& myedge, const Standard_Boolean isBRepMode);
//! Transfert an Edge 3d entity from TopoDS to IGES
//! If edge is REVERSED and isBRepMode is False 3D edge curve is reversed
//! @param[in] theEdge input edge to transfer
//! @param[in] theOriginMap shapemap contains the original shapes. Should be empty if face is not reversed
//! @param[in] theIsBRepMode indicates if write mode is BRep
//! @return Iges entity or null if could not be converted
Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& theEdge, const TopTools_DataMapOfShapeShape& theOriginMap, const Standard_Boolean theIsBRepMode);
//! Transfert an Edge entity on a Face from TopoDS to IGES
//! If this Entity could not be converted,
//! this member returns a NullEntity.
//! isBRepMode indicates if write mode is BRep
//! (True when called from BRepToIGESBRep and False when from BRepToIGES)
//! passing into Transform2dCurve()
Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& myedge, const TopoDS_Face& myface, const Standard_Real length, const Standard_Boolean isBRepMode);
//! Transfert an Edge 2d entity on a Face from TopoDS to IGES
//! @param[in] theEdge input edge to transfer
//! @param[in] theFace input face to get the surface and UV coordinates from it
//! @param[in] theOriginMap shapemap contains the original shapes. Should be empty if face is not reversed
//! @param[in] theLength input surface length
//! @param[in] theIsBRepMode indicates if write mode is BRep
//! @return Iges entity or null if could not be converted
Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& theEdge, const TopoDS_Face& theFace, const TopTools_DataMapOfShapeShape& theOriginMap, const Standard_Real theLength, const Standard_Boolean theIsBRepMode);
//! Transfert a Wire entity from TopoDS to IGES
//! If this Entity could not be converted,
@@ -113,12 +115,14 @@ public:
Standard_EXPORT Handle(IGESData_IGESEntity) TransferWire (const TopoDS_Wire& mywire);
//! Transfert a Wire entity from TopoDS to IGES.
//! Returns the curve associated to mywire in
//! the parametric space of myface.
//! If this Entity could not be converted,
//! this member returns a NullEntity.
//! Parameter IsRevol is not used anymore
Standard_EXPORT Handle(IGESData_IGESEntity) TransferWire (const TopoDS_Wire& mywire, const TopoDS_Face& myface, Handle(IGESData_IGESEntity)& mycurve2d, const Standard_Real length);
//! @param[in] theWire input wire
//! @param[in] theFace input face
//! @param[in] theOriginMap shapemap contains the original shapes. Should be empty if face is not reversed
//! @param[in] theCurve2d input curve 2d
//! @param[in] theLength input surface length
//! @return Iges entity (the curve associated to mywire in the parametric space of myface)
//! or null if could not be converted
Standard_EXPORT Handle(IGESData_IGESEntity) TransferWire (const TopoDS_Wire& theWire, const TopoDS_Face& theFace, const TopTools_DataMapOfShapeShape& theOriginMap, Handle(IGESData_IGESEntity)& theCurve2d, const Standard_Real theLength);