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

View File

@ -61,8 +61,8 @@ private:
Standard_EXPORT Standard_Real updateTolerance(const TopoDS_Shape& theShape) const;
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params)
Standard_EXPORT virtual bool GetCreationInformation(std::string& /*theOperationName*/,
std::vector<GEOM_Param>& /*params*/)
{
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
*/
//=============================================================================
std::list<GEOMImpl_IMeasureOperations::FailedShapes> GEOMImpl_IMeasureOperations::SelfIntersected2D(
const std::list<FailedChecks>& theChecks)
std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>
GEOMImpl_IMeasureOperations::SelfIntersected2D(const std::list<FailedChecks>& theChecks)
{
SetErrorCode(KO);
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_Function) aFunction = aConformity->AddFunction(GEOMImpl_ConformityDriver::GetID(), CONFORMITY_SELFINTERSECTED);
if (aFunction.IsNull()) return aSelfInters2D;
@ -2835,7 +2835,7 @@ std::list<GEOMImpl_IMeasureOperations::FailedShapes> GEOMImpl_IMeasureOperations
namespace
{
static bool checkTypes(const GEOMImpl_IMeasureOperations::FailedShapes& theShapes,
static bool checkTypes(const GEOMImpl_IMeasureOperations::CoupleOfObjects& theShapes,
const int theShapeType1,
const int theShapeType2)
{
@ -2867,15 +2867,16 @@ namespace
* \param theShapeType2 Type of shape.
*/
//=============================================================================
std::list<GEOMImpl_IMeasureOperations::FailedShapes> GEOMImpl_IMeasureOperations::InterferingSubshapes(
const std::list<FailedChecks>& theChecks,
const int theShapeType1,
const int theShapeType2)
std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>
GEOMImpl_IMeasureOperations::InterferingSubshapes
(const std::list<FailedChecks>& theChecks,
const int theShapeType1,
const int theShapeType2)
{
SetErrorCode(KO);
MESSAGE("GEOMImpl_IMeasureOperations::interferingSubshapes");
std::list < GEOMImpl_IMeasureOperations::FailedShapes> anInterfer;
std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> anInterfer;
try
{
OCC_CATCH_SIGNALS;
@ -2941,16 +2942,17 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IMeasureOperations::SmallEdges(
* \param theTolerance tolerance.
*/
//=============================================================================
std::list<GEOMImpl_IMeasureOperations::FailedShapes> GEOMImpl_IMeasureOperations::DistantShapes(
const std::list<FailedChecks>& theChecks,
const int theShapeType,
const int theSubShapeType,
double theTolerance)
std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>
GEOMImpl_IMeasureOperations::DistantShapes
(const std::list<FailedChecks>& theChecks,
const int theShapeType,
const int theSubShapeType,
double theTolerance)
{
SetErrorCode(KO);
MESSAGE("GEOMImpl_IMeasureOperations::distantShapes");
std::list<GEOMImpl_IMeasureOperations::FailedShapes> aDistShapes;
std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> aDistShapes;
try
{
OCC_CATCH_SIGNALS;

View File

@ -218,22 +218,22 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
Handle(GEOM_Object) thePoint);
// 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
{
Standard_Integer TypeOfCheck;
FailedShapes FailedShapes;
CoupleOfObjects FailedShapes;
};
Standard_EXPORT std::list<FailedShapes> SelfIntersected2D(const std::list<FailedChecks>& theChecks);
Standard_EXPORT std::list<FailedShapes> InterferingSubshapes(const std::list<FailedChecks>& theChecks,
const int theShapeType1,
const int theShapeType2);
Standard_EXPORT std::list<CoupleOfObjects> SelfIntersected2D(const std::list<FailedChecks>& theChecks);
Standard_EXPORT std::list<CoupleOfObjects> InterferingSubshapes(const std::list<FailedChecks>& theChecks,
const int theShapeType1,
const int theShapeType2);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) SmallEdges(const std::list<FailedChecks>& theChecks);
Standard_EXPORT std::list<FailedShapes> DistantShapes(const std::list<FailedChecks>& theChecks,
const int theShapeType,
const int theSubShapeType,
double theTolerance);
Standard_EXPORT std::list<CoupleOfObjects> DistantShapes(const std::list<FailedChecks>& theChecks,
const int theShapeType,
const int theSubShapeType,
double theTolerance);
Standard_EXPORT void CheckConformityShape(Handle(GEOM_Object) theShape, std::list<FailedChecks>& theChecks);
Standard_EXPORT double ComputeTolerance(Handle(GEOM_Object) theEdge, Handle(GEOM_Object) theFace);