#include "FiltersAPI_Feature.h"
#include <ModelAPI_Feature.h>
+#include <ModelAPI_FiltersFactory.h>
+#include <ModelAPI_Session.h>
#include <ModelHighAPI_Dumper.h>
#include <ModelHighAPI_Tools.h>
-#include <ModelAPI_Session.h>
-#include <ModelAPI_FiltersFactory.h>
FiltersAPI_Feature::FiltersAPI_Feature(
const std::shared_ptr<ModelAPI_Feature> & theFeature)
myFilterArguments.push_back(FiltersAPI_Argument(aBoolean->value()));
continue;
}
-
}
}
#include <ModelAPI_AttributeSelectionList.h>
#include <ModelAPI_AttributeSelection.h>
#include <ModelAPI_AttributeDouble.h>
-
#include <ModelAPI_Tools.h>
#include <GeomAPI_Edge.h>
#include <GeomAPI_Shape.h>
-#include <GeomAlgoAPI_ShapeTools.h>
+#include <GeomAPI_ShapeExplorer.h>
#include <GeomAPI_Wire.h>
-#include <GeomAPI_ShapeExplorer.h>
#include <GeomAlgoAPI_ContinuousFaces.h>
+#include <GeomAlgoAPI_ShapeTools.h>
#include <map>
#include <math.h>
if (theCache.find(*aFIt) == theCache.end()) {
GeomPointPtr aPoint = anEdge->middlePoint();
if (isContinuousFaces(theFace,
- *aFIt,
- aPoint,
- theAngle,
- anError)) {
+ *aFIt,
+ aPoint,
+ theAngle,
+ anError)) {
theCache.insert(*aFIt);
cacheContinuousFace(*aFIt, theEdgeToFaces, theCache, theAngle);
}
#include <ModelAPI_AttributeString.h>
#include <ModelAPI_AttributeDouble.h>
-
#include <ModelAPI_ResultBody.h>
#include <ModelAPI_Tools.h>
#include <GeomAPI_Edge.h>
#include <GeomAPI_Shape.h>
-#include <GeomAlgoAPI_ShapeTools.h>
#include <GeomAPI_Wire.h>
+#include <GeomAlgoAPI_ShapeTools.h>
+
#include <Precision.hxx>
#include <map>
#include <iostream>
-
bool FiltersPlugin_EdgeSize::isSupported(GeomAPI_Shape::ShapeType theType) const
{
return theType == GeomAPI_Shape::EDGE;
#include <ModelAPI_AttributeString.h>
#include <ModelAPI_AttributeDouble.h>
-
#include <ModelAPI_Tools.h>
#include <GeomAPI_Edge.h>
#include <GeomAPI_Shape.h>
-#include <GeomAlgoAPI_ShapeTools.h>
#include <GeomAPI_Wire.h>
+
#include <GeomAlgoAPI_BasicProperties.h>
+#include <GeomAlgoAPI_ShapeTools.h>
#include <Precision.hxx>
#include <ModelAPI_AttributeString.h>
#include <ModelAPI_AttributeDouble.h>
-
#include <ModelAPI_ResultBody.h>
#include <ModelAPI_Tools.h>
-#include <GeomAPI_ShapeExplorer.h>
-#include <GeomAlgoAPI_ContinuousFaces.h>
#include <GeomAPI_Edge.h>
#include <GeomAPI_Shape.h>
+#include <GeomAPI_ShapeExplorer.h>
#include <GeomAPI_Wire.h>
+#include <GeomAlgoAPI_ContinuousFaces.h>
+
#include <map>
#include <math.h>
#include <iostream>
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#include "FiltersPlugin_Plugin.h"
-#include "FiltersPlugin_Selection.h"
-#include "FiltersPlugin_HorizontalFace.h"
-#include "FiltersPlugin_VerticalFace.h"
#include "FiltersPlugin_BelongsTo.h"
-#include "FiltersPlugin_OnPlane.h"
-#include "FiltersPlugin_OnLine.h"
-#include "FiltersPlugin_OnGeometry.h"
-#include "FiltersPlugin_OnPlaneSide.h"
-#include "FiltersPlugin_OppositeToEdge.h"
+#include "FiltersPlugin_ContinuousFaces.h"
#include "FiltersPlugin_EdgeSize.h"
+#include "FiltersPlugin_ExternalFaces.h"
#include "FiltersPlugin_FaceSize.h"
#include "FiltersPlugin_FeatureEdges.h"
-#include "FiltersPlugin_ContinuousFaces.h"
-#include "FiltersPlugin_VolumeSize.h"
+#include "FiltersPlugin_HorizontalFace.h"
+#include "FiltersPlugin_OnGeometry.h"
+#include "FiltersPlugin_OnLine.h"
+#include "FiltersPlugin_OnPlane.h"
+#include "FiltersPlugin_OnPlaneSide.h"
+#include "FiltersPlugin_OppositeToEdge.h"
+#include "FiltersPlugin_Plugin.h"
#include "FiltersPlugin_RelativeToSolid.h"
-#include "FiltersPlugin_ExternalFaces.h"
+#include "FiltersPlugin_Selection.h"
#include "FiltersPlugin_Validators.h"
+#include "FiltersPlugin_VerticalFace.h"
+#include "FiltersPlugin_VolumeSize.h"
#include <Config_ModuleReader.h>
#include <ModelAPI_AttributeString.h>
#include <ModelAPI_AttributeDouble.h>
-
#include <ModelAPI_Tools.h>
#include <GeomAPI_Edge.h>
#include <GeomAPI_Shape.h>
-#include <GeomAlgoAPI_ShapeTools.h>
#include <GeomAPI_Wire.h>
+
#include <GeomAlgoAPI_BasicProperties.h>
+#include <GeomAlgoAPI_ShapeTools.h>
#include <Precision.hxx>
<filter id="ContinuousFaces">
<doublevalue id="ContinuousFaces__value"
- label="Angle"
- min="0"
- step="0.1"
- default="5">
+ label="Angle"
+ min="0"
+ step="0.1"
+ default="5"
+ tooltip="Continuity angle">
</doublevalue>
<multi_selector id="ContinuousFaces__faces"
label="Faces:"
- tooltip="Select face."
+ tooltip="Select faces"
shape_types="faces">
<validator id="GeomValidators_ShapeType" parameters="face"/>
</multi_selector>
<filter id="EdgeSize">
- <switch id="EdgeSize__comparatorType">
+ <switch id="EdgeSize__comparatorType">
<case id="inf" title="<">
<doublevalue id="EdgeSize__value"
- label="Size"
- min="0"
- step="0.1"
- default="1">
+ label="Size"
+ min="0"
+ step="0.1"
+ default="1"
+ tooltip="< to">
<validator id="GeomValidators_Positive"/>
</doublevalue>
- </case>
+ </case>
<case id="infEq" title="<=">
- <doublevalue id="EdgeSize__value"
- label="Size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="EdgeSize__value"
+ label="Size"
+ min="0"
+ step="0.1"
+ default="1"
+ tooltip="<= to">
<validator id="GeomValidators_Positive"/>
</doublevalue>
- </case>
+ </case>
<case id="sup" title=">">
- <doublevalue id="EdgeSize__value"
- label="Size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="EdgeSize__value"
+ label="Size"
+ min="0"
+ step="0.1"
+ default="1"
+ tooltip="> to">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
- </case>
+ </case>
<case id="supEq" title=">=">
- <doublevalue id="EdgeSize__value"
- label="Size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="EdgeSize__value"
+ label="Size"
+ min="0"
+ step="0.1"
+ default="1"
+ tooltip=">= to">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
- </case>
+ </case>
<case id="isBetween" title="is between">
- <doublevalue id="EdgeSize__value"
- label="Min size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="EdgeSize__value"
+ label="Min size"
+ min="0"
+ step="0.1"
+ default="1"
+ tooltip="Min value">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
<doublevalue id="EdgeSize__valueMax"
- label="Max size"
- min="0"
- step="0.1"
- default="10">
+ label="Max size"
+ min="0"
+ step="0.1"
+ default="10"
+ tooltip="Max value">
<validator id="GeomValidators_Positive"/>
</doublevalue>
</case>
<case id="isStrictlyBetween" title="is strictly between">
- <doublevalue id="EdgeSize__value"
- label="Min size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="EdgeSize__value"
+ label="Min size"
+ min="0"
+ step="0.1"
+ default="1"
+ tooltip="Min value">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
<doublevalue id="EdgeSize__valueMax"
- label="Max size"
- min="0"
- step="0.1"
- default="10">
+ label="Max size"
+ min="0"
+ step="0.1"
+ default="10"
+ tooltip="Max value">
<validator id="GeomValidators_Positive" />
</doublevalue>
</case>
<filter id="FaceSize">
- <switch id="FaceSize__comparatorType">
+ <switch id="FaceSize__comparatorType">
<case id="inf" title="<">
<doublevalue id="FaceSize__value"
- label="Size"
- min="0"
- default="1">
+ label="Size"
+ min="0"
+ default="1"
+ tooltip="< to">
<validator id="GeomValidators_Positive"/>
</doublevalue>
- </case>
+ </case>
<case id="infEq" title="<=">
- <doublevalue id="FaceSize__value"
- label="Size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="FaceSize__value"
+ label="Size"
+ min="0" step="0.1"
+ default="1"
+ tooltip="<= to">
<validator id="GeomValidators_Positive"/>
</doublevalue>
- </case>
+ </case>
<case id="sup" title=">">
- <doublevalue id="FaceSize__value"
- label="Size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="FaceSize__value"
+ label="Size"
+ min="0" step="0.1"
+ default="1"
+ tooltip="> to">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
- </case>
+ </case>
<case id="supEq" title=">=">
- <doublevalue id="FaceSize__value"
- label="Size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="FaceSize__value"
+ label="Size"
+ min="0" step="0.1"
+ default="1"
+ tooltip=">= to">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
- </case>
+ </case>
<case id="isBetween" title="is between">
- <doublevalue id="FaceSize__value"
- label="Min size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="FaceSize__value"
+ label="Min size"
+ min="0" step="0.1"
+ default="1"
+ tooltip="Min value">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
<doublevalue id="FaceSize__valueMax"
- label="Max size"
- min="0"
- step="0.1"
- default="10">
+ label="Max size"
+ min="0" step="0.1"
+ default="10"
+ tooltip="Max value">
<validator id="GeomValidators_Positive"/>
</doublevalue>
</case>
<case id="isStrictlyBetween" title="is strictly between">
- <doublevalue id="FaceSize__value"
- label="Min size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="FaceSize__value"
+ label="Min size"
+ min="0" step="0.1"
+ default="1"
+ tooltip="Min value">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
<doublevalue id="FaceSize__valueMax"
- label="Max size"
- min="0"
- step="0.1"
- default="10">
+ label="Max size"
+ min="0" step="0.1"
+ default="10"
+ tooltip="Max value">
<validator id="GeomValidators_Positive"/>
</doublevalue>
</case>
<filter id="FeatureEdges">
<doublevalue id="FeatureEdges__value"
- label="Angle"
- min="0"
- step="0.1"
- default="5">
+ label="Angle"
+ min="0"
+ step="0.1"
+ default="5"
+ tooltip="Edge angle">
</doublevalue>
</filter>
<filter id="VolumeSize">
- <switch id="VolumeSize__comparatorType">
+ <switch id="VolumeSize__comparatorType">
<case id="inf" title="<">
<doublevalue id="VolumeSize__value"
- label="Size"
- min="0"
- default="1">
+ label="Size"
+ min="0"
+ default="1"
+ tooltip="< to">
<validator id="GeomValidators_Positive" />
</doublevalue>
- </case>
+ </case>
<case id="infEq" title="<=">
- <doublevalue id="VolumeSize__value"
- label="Size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="VolumeSize__value"
+ label="Size"
+ min="0" step="0.1"
+ default="1"
+ tooltip="<= to">
<validator id="GeomValidators_Positive"/>
</doublevalue>
- </case>
+ </case>
<case id="sup" title=">">
- <doublevalue id="VolumeSize__value"
- label="Size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="VolumeSize__value"
+ label="Size"
+ min="0" step="0.1"
+ default="1"
+ tooltip="> to">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
- </case>
+ </case>
<case id="supEq" title=">=">
- <doublevalue id="VolumeSize__value"
- label="Size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="VolumeSize__value"
+ label="Size"
+ min="0" step="0.1"
+ default="1"
+ tooltip=">="> to">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
- </case>
+ </case>
<case id="isBetween" title="is between">
- <doublevalue id="VolumeSize__value"
- label="Min size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="VolumeSize__value"
+ label="Min size"
+ min="0" step="0.1"
+ default="1"
+ tooltip="Min value">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
<doublevalue id="VolumeSize__valueMax"
- label="Max size"
- min="0"
- step="0.1"
- default="10">
+ label="Max size"
+ min="0" step="0.1"
+ default="10"
+ tooltip="Max value">
<validator id="GeomValidators_Positive"/>
</doublevalue>
</case>
<case id="isStrictlyBetween" title="is strictly between">
- <doublevalue id="VolumeSize__value"
- label="Min size"
- min="0"
- step="0.1"
- default="1">
+ <doublevalue id="VolumeSize__value"
+ label="Min size"
+ min="0" step="0.1"
+ default="1"
+ tooltip="Min value">
<validator id="GeomValidators_Positive" parameters="-1.e-10"/>
</doublevalue>
<doublevalue id="VolumeSize__valueMax"
- label="Max size"
- min="0"
- step="0.1"
- default="10">
+ label="Max size"
+ min="0" step="0.1"
+ default="10"
+ tooltip="Max value">
<validator id="GeomValidators_Positive"/>
</doublevalue>
</case>
#include <Standard_ErrorHandler.hxx>
//=================================================================================================
-bool GetBasicProperties( const std::shared_ptr<GeomAPI_Shape>& theShape,
- const double theTolerance,
- Standard_Real& theLength,
- Standard_Real& theSurfArea,
- Standard_Real& theVolume,
- std::string& theError)
+bool GetBasicProperties(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ const double theTolerance,
+ Standard_Real& theLength,
+ Standard_Real& theSurfArea,
+ Standard_Real& theVolume,
+ std::string& theError)
{
#ifdef _DEBUG
theError = aFail.GetMessageString();
return false;
}
-
return true;
-
}
try {
OCC_CATCH_SIGNALS;
LocalAnalysis_SurfaceContinuity aLocAnal(aSurf1,
- aPointOnFace1.X(),
- aPointOnFace1.Y(),
- aSurf2,
- aPointOnFace2.X(),
- aPointOnFace2.Y(),
- GeomAbs_Shape::GeomAbs_G1, // Order
- 0.001, // EpsNul
- 0.001, // EpsC0
- 0.001, // EpsC1
- 0.001, // EpsC2
- theAngle * PI/ 180.0); //EpsG1
-
+ aPointOnFace1.X(),
+ aPointOnFace1.Y(),
+ aSurf2,
+ aPointOnFace2.X(),
+ aPointOnFace2.Y(),
+ GeomAbs_Shape::GeomAbs_G1, // Order
+ 0.001, // EpsNul
+ 0.001, // EpsC0
+ 0.001, // EpsC1
+ 0.001, // EpsC2
+ theAngle * PI/ 180.0); //EpsG1
aRes = aLocAnal.IsG1();
}
catch (Standard_Failure const& anException) {
return false;
}
}
-
return true;
}