mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 18:20:35 +05:00
Rollback EMV(08.11.2013) & JFA(17.09.2013) integrations because 'GetSharedShapes' can't find anything in this
case (for details see INTPAL0052193: TC7.3.0: Get Shared Shapes does not work).
This commit is contained in:
parent
ea7637619b
commit
c1483ed91e
@ -18,6 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
|
//
|
||||||
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
@ -38,7 +39,6 @@
|
|||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
#include <TDataStd_IntegerArray.hxx>
|
#include <TDataStd_IntegerArray.hxx>
|
||||||
#include <TNaming_CopyShape.hxx>
|
|
||||||
|
|
||||||
#include <TopExp.hxx>
|
#include <TopExp.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
@ -47,8 +47,6 @@
|
|||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
|
|
||||||
#include <TColStd_IndexedDataMapOfTransientTransient.hxx>
|
|
||||||
|
|
||||||
#include <ShapeFix_Shape.hxx>
|
#include <ShapeFix_Shape.hxx>
|
||||||
|
|
||||||
#include <Standard_NullObject.hxx>
|
#include <Standard_NullObject.hxx>
|
||||||
@ -423,8 +421,7 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueWithWarnings (const TopoDS_Shape& theShape
|
|||||||
const Standard_Real theTolerance,
|
const Standard_Real theTolerance,
|
||||||
const TopAbs_ShapeEnum theShapeType,
|
const TopAbs_ShapeEnum theShapeType,
|
||||||
const Standard_Boolean doKeepNonSolids,
|
const Standard_Boolean doKeepNonSolids,
|
||||||
TCollection_AsciiString& theWarning,
|
TCollection_AsciiString& theWarning) const
|
||||||
const TopTools_DataMapOfShapeShape& aCopyMap) const
|
|
||||||
{
|
{
|
||||||
TopoDS_Shape aRes;
|
TopoDS_Shape aRes;
|
||||||
|
|
||||||
@ -554,18 +551,10 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueWithWarnings (const TopoDS_Shape& theShape
|
|||||||
TDF_Label anArgumentHistoryLabel =
|
TDF_Label anArgumentHistoryLabel =
|
||||||
aFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_True);
|
aFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_True);
|
||||||
|
|
||||||
TopTools_ListOfShape aModified;
|
|
||||||
for (Standard_Integer ie = 1; ie <= nbArgumentEntities; ie++) {
|
for (Standard_Integer ie = 1; ie <= nbArgumentEntities; ie++) {
|
||||||
TopoDS_Shape anEntity = anArgumentIndices.FindKey(ie);
|
TopoDS_Shape anEntity = anArgumentIndices.FindKey(ie);
|
||||||
if (aCopyMap.IsBound(anEntity)) {
|
const TopTools_ListOfShape& aModified = aGA.Modified(anEntity);
|
||||||
anEntity = aCopyMap.Find(anEntity);
|
|
||||||
}
|
|
||||||
aModified = aGA.Modified(anEntity);
|
|
||||||
Standard_Integer nbModified = aModified.Extent();
|
Standard_Integer nbModified = aModified.Extent();
|
||||||
if (!nbModified && aResIndices.Contains(anEntity)) {
|
|
||||||
aModified.Append(anEntity);
|
|
||||||
nbModified = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nbModified > 0) {
|
if (nbModified > 0) {
|
||||||
TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(ie, Standard_True);
|
TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(ie, Standard_True);
|
||||||
@ -754,35 +743,18 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const
|
|||||||
|
|
||||||
Standard_Boolean aKeepNonSolids = aCI.GetKeepNonSolids();
|
Standard_Boolean aKeepNonSolids = aCI.GetKeepNonSolids();
|
||||||
|
|
||||||
// Copy initial shape to prevent its modification by gluing algorithm
|
|
||||||
TopoDS_Shape aShapeCopy;
|
|
||||||
TColStd_IndexedDataMapOfTransientTransient aMapTShapes;
|
|
||||||
TNaming_CopyShape::CopyTool(aShapeBase, aMapTShapes, aShapeCopy);
|
|
||||||
//
|
|
||||||
// map sub-shapes
|
|
||||||
TopTools_IndexedMapOfShape aShapeBase_inds, aShapeCopy_inds;
|
|
||||||
TopTools_DataMapOfShapeShape aCopyMap;
|
|
||||||
Standard_Integer aNbInd, i;
|
|
||||||
//
|
|
||||||
TopExp::MapShapes(aShapeBase, aShapeBase_inds);
|
|
||||||
TopExp::MapShapes(aShapeCopy, aShapeCopy_inds);
|
|
||||||
//
|
|
||||||
aNbInd = aShapeBase_inds.Extent();
|
|
||||||
for (i = 1; i <= aNbInd; ++i) {
|
|
||||||
aCopyMap.Bind(aShapeBase_inds(i), aShapeCopy_inds(i));
|
|
||||||
}
|
|
||||||
//
|
|
||||||
if (aType == GLUE_FACES) {
|
if (aType == GLUE_FACES) {
|
||||||
aShape = GlueWithWarnings(aShapeCopy, tol3d, TopAbs_FACE, aKeepNonSolids, aWrn, aCopyMap);
|
//aShape = GlueFacesWithWarnings(aShapeBase, tol3d, aKeepNonSolids, aWrn);
|
||||||
|
aShape = GlueWithWarnings(aShapeBase, tol3d, TopAbs_FACE, aKeepNonSolids, aWrn);
|
||||||
}
|
}
|
||||||
else if (aType == GLUE_EDGES) {
|
else if (aType == GLUE_EDGES) {
|
||||||
aShape = GlueWithWarnings(aShapeCopy, tol3d, TopAbs_EDGE, aKeepNonSolids, aWrn, aCopyMap);
|
aShape = GlueWithWarnings(aShapeBase, tol3d, TopAbs_EDGE, aKeepNonSolids, aWrn);
|
||||||
}
|
}
|
||||||
else if (aType == GLUE_FACES_BY_LIST || aType == GLUE_EDGES_BY_LIST) {
|
else if (aType == GLUE_FACES_BY_LIST || aType == GLUE_EDGES_BY_LIST) {
|
||||||
Handle(TColStd_HSequenceOfTransient) SF = aCI.GetFaces();
|
Handle(TColStd_HSequenceOfTransient) SF = aCI.GetFaces();
|
||||||
TopTools_MapOfShape aFaces;
|
TopTools_MapOfShape aFaces;
|
||||||
|
int i = 1;
|
||||||
for (i = 1; i <= SF->Length(); i++) {
|
for (; i <= SF->Length(); i++) {
|
||||||
Handle(Standard_Transient) anItem = SF->Value(i);
|
Handle(Standard_Transient) anItem = SF->Value(i);
|
||||||
if (anItem.IsNull())
|
if (anItem.IsNull())
|
||||||
continue;
|
continue;
|
||||||
@ -792,14 +764,7 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const
|
|||||||
TopoDS_Shape aFace = aRefSh->GetValue();
|
TopoDS_Shape aFace = aRefSh->GetValue();
|
||||||
if (aFace.IsNull())
|
if (aFace.IsNull())
|
||||||
continue;
|
continue;
|
||||||
|
aFaces.Add(aFace);
|
||||||
// get copy of face to correspond to aShapeCopy
|
|
||||||
if (aShapeBase_inds.Contains(aFace)) {
|
|
||||||
int ind = aShapeBase_inds.FindIndex(aFace);
|
|
||||||
aFace = aShapeCopy_inds.FindKey(ind);
|
|
||||||
|
|
||||||
aFaces.Add(aFace);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Standard_Boolean aGlueAllEdges = Standard_False;
|
Standard_Boolean aGlueAllEdges = Standard_False;
|
||||||
@ -807,7 +772,7 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const
|
|||||||
aGlueAllEdges = aCI.GetGlueAllEdges();
|
aGlueAllEdges = aCI.GetGlueAllEdges();
|
||||||
|
|
||||||
//aShape = GlueFacesByList(aShapeBase, tol3d, aKeepNonSolids, aFaces);
|
//aShape = GlueFacesByList(aShapeBase, tol3d, aKeepNonSolids, aFaces);
|
||||||
aShape = GlueByList(aShapeCopy, tol3d, aKeepNonSolids, aFaces, aGlueAllEdges);
|
aShape = GlueByList(aShapeBase, tol3d, aKeepNonSolids, aFaces, aGlueAllEdges);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aShape.IsNull()) return 0;
|
if (aShape.IsNull()) return 0;
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <TopTools_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
|
||||||
|
|
||||||
#ifndef _TFunction_Driver_HeaderFile
|
#ifndef _TFunction_Driver_HeaderFile
|
||||||
#include <TFunction_Driver.hxx>
|
#include <TFunction_Driver.hxx>
|
||||||
@ -104,8 +104,7 @@ Standard_EXPORT TopoDS_Shape GlueWithWarnings (const TopoDS_Shape& theShape,
|
|||||||
const Standard_Real theTolerance,
|
const Standard_Real theTolerance,
|
||||||
const TopAbs_ShapeEnum theShapeType,
|
const TopAbs_ShapeEnum theShapeType,
|
||||||
const Standard_Boolean doKeepNonSolids,
|
const Standard_Boolean doKeepNonSolids,
|
||||||
TCollection_AsciiString& theWarning,
|
TCollection_AsciiString& theWarning) const;
|
||||||
const TopTools_DataMapOfShapeShape& aCopyMap) const;
|
|
||||||
|
|
||||||
Standard_EXPORT static TopoDS_Shape GlueByList (const TopoDS_Shape& theShape,
|
Standard_EXPORT static TopoDS_Shape GlueByList (const TopoDS_Shape& theShape,
|
||||||
const Standard_Real theTolerance,
|
const Standard_Real theTolerance,
|
||||||
|
Loading…
Reference in New Issue
Block a user