Fix compilation errors on Linux

This commit is contained in:
jfa 2022-08-15 16:13:28 +03:00
parent d7b1576131
commit 39ff0b5f09
4 changed files with 52 additions and 39 deletions

View File

@ -249,19 +249,26 @@ NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> GEOMImpl_ConformityDrive
Standard_Real theTolerance) const Standard_Real theTolerance) const
{ {
NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> aDistShapes; NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> aDistShapes;
NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> aDistShapesTmp;
switch (theShapeType) switch (theShapeType)
{ {
case TopAbs_VERTEX: case TopAbs_VERTEX:
aDistShapes.Append(distantShapes(theShape, TopAbs_EDGE, theShapeType, theTolerance)); aDistShapesTmp = distantShapes(theShape, TopAbs_EDGE, theShapeType, theTolerance);
aDistShapes.Append(distantShapes(theShape, TopAbs_FACE, theShapeType, theTolerance)); aDistShapes.Append(aDistShapesTmp);
aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, theShapeType, theTolerance);
aDistShapes.Append(aDistShapesTmp);
break; break;
case TopAbs_EDGE: case TopAbs_EDGE:
aDistShapes.Append(distantShapes(theShape, theShapeType, TopAbs_VERTEX, theTolerance)); aDistShapesTmp = distantShapes(theShape, theShapeType, TopAbs_VERTEX, theTolerance);
aDistShapes.Append(distantShapes(theShape, TopAbs_FACE, theShapeType, theTolerance)); aDistShapes.Append(aDistShapesTmp);
aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, theShapeType, theTolerance);
aDistShapes.Append(aDistShapesTmp);
break; break;
case TopAbs_FACE: case TopAbs_FACE:
aDistShapes.Append(distantShapes(theShape, theShapeType, TopAbs_VERTEX, theTolerance)); aDistShapesTmp = distantShapes(theShape, theShapeType, TopAbs_VERTEX, theTolerance);
aDistShapes.Append(distantShapes(theShape, theShapeType, TopAbs_EDGE, theTolerance)); aDistShapes.Append(aDistShapesTmp);
aDistShapesTmp = distantShapes(theShape, theShapeType, TopAbs_EDGE, theTolerance);
aDistShapes.Append(aDistShapesTmp);
break; break;
} }
@ -272,15 +279,19 @@ NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> GEOMImpl_ConformityDrive
//function : distantShapes //function : distantShapes
//purpose : TODO: Not implemented! Wait for required functionality! //purpose : TODO: Not implemented! Wait for required functionality!
//======================================================================= //=======================================================================
NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> GEOMImpl_ConformityDriver::distantShapes( NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> GEOMImpl_ConformityDriver::distantShapes
const TopoDS_Shape& theShape, (const TopoDS_Shape& theShape,
Standard_Real theTolerance) const Standard_Real theTolerance) const
{ {
NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> aDistShapes; NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> aDistShapes;
NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> aDistShapesTmp;
aDistShapes.Append(distantShapes(theShape, TopAbs_EDGE, TopAbs_VERTEX, theTolerance)); aDistShapesTmp = distantShapes(theShape, TopAbs_EDGE, TopAbs_VERTEX, theTolerance);
aDistShapes.Append(distantShapes(theShape, TopAbs_FACE, TopAbs_VERTEX, theTolerance)); aDistShapes.Append(aDistShapesTmp);
aDistShapes.Append(distantShapes(theShape, TopAbs_FACE, TopAbs_EDGE, theTolerance)); aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, TopAbs_VERTEX, theTolerance);
aDistShapes.Append(aDistShapesTmp);
aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, TopAbs_EDGE, theTolerance);
aDistShapes.Append(aDistShapesTmp);
return aDistShapes; return aDistShapes;
} }

View File

@ -61,8 +61,8 @@ private:
Standard_EXPORT Standard_Real updateTolerance(const TopoDS_Shape& theShape) const; Standard_EXPORT Standard_Real updateTolerance(const TopoDS_Shape& theShape) const;
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName, Standard_EXPORT virtual bool GetCreationInformation(std::string& /*theOperationName*/,
std::vector<GEOM_Param>& params) std::vector<GEOM_Param>& /*params*/)
{ {
return Standard_False; return Standard_False;
} }

View File

@ -2798,13 +2798,13 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::SurfaceCurvatureByPointAndDirec
* \param theChecks list of failed checks, contains type of check and failed shapes * \param theChecks list of failed checks, contains type of check and failed shapes
*/ */
//============================================================================= //=============================================================================
std::list<GEOMImpl_IMeasureOperations::FailedShapes> GEOMImpl_IMeasureOperations::SelfIntersected2D( std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>
const std::list<FailedChecks>& theChecks) GEOMImpl_IMeasureOperations::SelfIntersected2D(const std::list<FailedChecks>& theChecks)
{ {
SetErrorCode(KO); SetErrorCode(KO);
MESSAGE("GEOMImpl_IMeasureOperations::selfIntersected2D"); MESSAGE("GEOMImpl_IMeasureOperations::selfIntersected2D");
std::list<GEOMImpl_IMeasureOperations::FailedShapes> aSelfInters2D; std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> aSelfInters2D;
Handle(GEOM_Object) aConformity = GetEngine()->AddObject(GEOM_CHECKCONFORMITY); Handle(GEOM_Object) aConformity = GetEngine()->AddObject(GEOM_CHECKCONFORMITY);
Handle(GEOM_Function) aFunction = aConformity->AddFunction(GEOMImpl_ConformityDriver::GetID(), CONFORMITY_SELFINTERSECTED); Handle(GEOM_Function) aFunction = aConformity->AddFunction(GEOMImpl_ConformityDriver::GetID(), CONFORMITY_SELFINTERSECTED);
if (aFunction.IsNull()) return aSelfInters2D; if (aFunction.IsNull()) return aSelfInters2D;
@ -2835,7 +2835,7 @@ std::list<GEOMImpl_IMeasureOperations::FailedShapes> GEOMImpl_IMeasureOperations
namespace namespace
{ {
static bool checkTypes(const GEOMImpl_IMeasureOperations::FailedShapes& theShapes, static bool checkTypes(const GEOMImpl_IMeasureOperations::CoupleOfObjects& theShapes,
const int theShapeType1, const int theShapeType1,
const int theShapeType2) const int theShapeType2)
{ {
@ -2867,15 +2867,16 @@ namespace
* \param theShapeType2 Type of shape. * \param theShapeType2 Type of shape.
*/ */
//============================================================================= //=============================================================================
std::list<GEOMImpl_IMeasureOperations::FailedShapes> GEOMImpl_IMeasureOperations::InterferingSubshapes( std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>
const std::list<FailedChecks>& theChecks, GEOMImpl_IMeasureOperations::InterferingSubshapes
const int theShapeType1, (const std::list<FailedChecks>& theChecks,
const int theShapeType2) const int theShapeType1,
const int theShapeType2)
{ {
SetErrorCode(KO); SetErrorCode(KO);
MESSAGE("GEOMImpl_IMeasureOperations::interferingSubshapes"); MESSAGE("GEOMImpl_IMeasureOperations::interferingSubshapes");
std::list < GEOMImpl_IMeasureOperations::FailedShapes> anInterfer; std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> anInterfer;
try try
{ {
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
@ -2941,16 +2942,17 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IMeasureOperations::SmallEdges(
* \param theTolerance tolerance. * \param theTolerance tolerance.
*/ */
//============================================================================= //=============================================================================
std::list<GEOMImpl_IMeasureOperations::FailedShapes> GEOMImpl_IMeasureOperations::DistantShapes( std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>
const std::list<FailedChecks>& theChecks, GEOMImpl_IMeasureOperations::DistantShapes
const int theShapeType, (const std::list<FailedChecks>& theChecks,
const int theSubShapeType, const int theShapeType,
double theTolerance) const int theSubShapeType,
double theTolerance)
{ {
SetErrorCode(KO); SetErrorCode(KO);
MESSAGE("GEOMImpl_IMeasureOperations::distantShapes"); MESSAGE("GEOMImpl_IMeasureOperations::distantShapes");
std::list<GEOMImpl_IMeasureOperations::FailedShapes> aDistShapes; std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> aDistShapes;
try try
{ {
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;

View File

@ -218,22 +218,22 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
Handle(GEOM_Object) thePoint); Handle(GEOM_Object) thePoint);
// Methods checking the shapes which are not applicable to modelling operations // Methods checking the shapes which are not applicable to modelling operations
typedef std::pair< Handle(GEOM_Object), Handle(GEOM_Object)> FailedShapes; typedef std::pair< Handle(GEOM_Object), Handle(GEOM_Object)> CoupleOfObjects;
struct FailedChecks struct FailedChecks
{ {
Standard_Integer TypeOfCheck; Standard_Integer TypeOfCheck;
FailedShapes FailedShapes; CoupleOfObjects FailedShapes;
}; };
Standard_EXPORT std::list<FailedShapes> SelfIntersected2D(const std::list<FailedChecks>& theChecks); Standard_EXPORT std::list<CoupleOfObjects> SelfIntersected2D(const std::list<FailedChecks>& theChecks);
Standard_EXPORT std::list<FailedShapes> InterferingSubshapes(const std::list<FailedChecks>& theChecks, Standard_EXPORT std::list<CoupleOfObjects> InterferingSubshapes(const std::list<FailedChecks>& theChecks,
const int theShapeType1, const int theShapeType1,
const int theShapeType2); const int theShapeType2);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) SmallEdges(const std::list<FailedChecks>& theChecks); Standard_EXPORT Handle(TColStd_HSequenceOfTransient) SmallEdges(const std::list<FailedChecks>& theChecks);
Standard_EXPORT std::list<FailedShapes> DistantShapes(const std::list<FailedChecks>& theChecks, Standard_EXPORT std::list<CoupleOfObjects> DistantShapes(const std::list<FailedChecks>& theChecks,
const int theShapeType, const int theShapeType,
const int theSubShapeType, const int theSubShapeType,
double theTolerance); double theTolerance);
Standard_EXPORT void CheckConformityShape(Handle(GEOM_Object) theShape, std::list<FailedChecks>& theChecks); Standard_EXPORT void CheckConformityShape(Handle(GEOM_Object) theShape, std::list<FailedChecks>& theChecks);
Standard_EXPORT double ComputeTolerance(Handle(GEOM_Object) theEdge, Handle(GEOM_Object) theFace); Standard_EXPORT double ComputeTolerance(Handle(GEOM_Object) theEdge, Handle(GEOM_Object) theFace);