#include "FeaturesAPI_DuplicatedFaces.h"
-#include <FeaturesPlugin_DuplicatedFaces.h>
-#include <ModelAPI_AttributeDoubleArray.h>
+#include <FeaturesPlugin_GroupDuplicatedFaces.h>
+
#include <ModelHighAPI_Services.h>
#include <ModelHighAPI_Tools.h>
FeaturesAPI_DuplicatedFaces::FeaturesAPI_DuplicatedFaces(
const std::shared_ptr<ModelAPI_Feature>& theFeature,
const ModelHighAPI_Selection& theObject,
- const double theTransparency,
+ const ModelHighAPI_Integer& theTransparency,
+ const ModelHighAPI_Double& theTolerance,
const std::string & theNameGroup)
:ModelHighAPI_Interface(theFeature)
{
if (initialize()) {
fillAttribute(theObject, myobjectselected);
fillAttribute(theTransparency, mytransparency);
- if (theNameGroup != "") {
- fillAttribute(true,feature()->boolean(FeaturesPlugin_DuplicatedFaces::CREATE_GROUP_ID()));
- fillAttribute(theNameGroup, mygroupname);
- }
+ fillAttribute(theTolerance, mytolerance);
+ fillAttribute(theNameGroup, mygroupname);
+
execute();
}
}
const std::string& aDocName = theDumper.name(aBase->document());
AttributeSelectionPtr anAttrObject;
- anAttrObject = aBase->selection(FeaturesPlugin_DuplicatedFaces::OBJECT_ID());
+ anAttrObject = aBase->selection(FeaturesPlugin_GroupDuplicatedFaces::OBJECT_ID());
theDumper << aBase << " = model.getDuplicatedFaces(" << aDocName << ", " << anAttrObject;
- theDumper << ", " << aBase->integer(FeaturesPlugin_DuplicatedFaces::TRANSPARENCY_ID());
-
- if(aBase->boolean(FeaturesPlugin_DuplicatedFaces::CREATE_GROUP_ID())->value() )
- theDumper << ", " << aBase->string(FeaturesPlugin_DuplicatedFaces::GROUP_NAME_ID());
-
+ theDumper << ", " << aBase->integer(FeaturesPlugin_GroupDuplicatedFaces::TRANSPARENCY_ID());
+ theDumper << ", " << aBase->real(FeaturesPlugin_GroupDuplicatedFaces::TOLERANCE_ID());
+ theDumper << ", " << aBase->string(FeaturesPlugin_GroupDuplicatedFaces::GROUP_NAME_ID());
theDumper << ")" << std::endl;
}
//=================================================================================================
DuplicatedFacesPtr getDuplicatedFaces(const std::shared_ptr<ModelAPI_Document>& thePart,
const ModelHighAPI_Selection& theObject,
- const double theTransparency,
+ const ModelHighAPI_Integer& theTransparency,
+ const ModelHighAPI_Double& theTolerance,
const std::string & theNameGroup)
{
- FeaturePtr aFeature = thePart->addFeature(FeaturesPlugin_DuplicatedFaces::ID());
+ FeaturePtr aFeature = thePart->addFeature(FeaturesPlugin_GroupDuplicatedFaces::ID());
DuplicatedFacesPtr aDuplicatedFaces;
aDuplicatedFaces.reset(new FeaturesAPI_DuplicatedFaces(aFeature,
theObject,
theTransparency,
+ theTolerance,
theNameGroup));
return aDuplicatedFaces;
#include "FeaturesAPI.h"
-#include "FeaturesPlugin_DuplicatedFaces.h"
+#include "FeaturesPlugin_GroupDuplicatedFaces.h"
#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Integer.h>
+#include <ModelHighAPI_Double.h>
#include <ModelHighAPI_Macro.h>
#include <memory>
FEATURESAPI_EXPORT
explicit FeaturesAPI_DuplicatedFaces(const std::shared_ptr<ModelAPI_Feature>& theFeature,
const ModelHighAPI_Selection& theobject,
- const double theTransparency,
+ const ModelHighAPI_Integer& theTransparency,
+ const ModelHighAPI_Double& theTolerance,
const std::string & theNameGroup);
/// Destructor.
FEATURESAPI_EXPORT
virtual ~FeaturesAPI_DuplicatedFaces();
- INTERFACE_3(FeaturesPlugin_DuplicatedFaces::ID(),
- objectselected, FeaturesPlugin_DuplicatedFaces::OBJECT_ID(),
+ INTERFACE_4(FeaturesPlugin_GroupDuplicatedFaces::ID(),
+ objectselected, FeaturesPlugin_GroupDuplicatedFaces::OBJECT_ID(),
ModelAPI_AttributeSelection,
/** object selected*/,
- transparency, FeaturesPlugin_DuplicatedFaces::TRANSPARENCY_ID(),
+ transparency, FeaturesPlugin_GroupDuplicatedFaces::TRANSPARENCY_ID(),
ModelAPI_AttributeInteger,
/** transparency*/,
- groupname, FeaturesPlugin_DuplicatedFaces::GROUP_NAME_ID(),
+ tolerance, FeaturesPlugin_GroupDuplicatedFaces::TOLERANCE_ID(),
+ ModelAPI_AttributeDouble,
+ /** tolerance*/,
+ groupname, FeaturesPlugin_GroupDuplicatedFaces::GROUP_NAME_ID(),
ModelAPI_AttributeString,
/** group name*/)
FEATURESAPI_EXPORT
DuplicatedFacesPtr getDuplicatedFaces(const std::shared_ptr<ModelAPI_Document>& thePart,
const ModelHighAPI_Selection& theObject,
- const double theTransparency = 0.0,
- const std::string & theNameGroup = "");
+ const ModelHighAPI_Integer& theTransparency,
+ const ModelHighAPI_Double& theTolerance,
+ const std::string & theNameGroup);
#endif // FeaturesAPI_DuplicatedFaces_H_
# additional include directories
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
${PROJECT_SOURCE_DIR}/src/Locale
- ${PROJECT_SOURCE_DIR}/src/PrimitivesPlugin
${QT_INCLUDES})
# additional preprocessor / compiler flags
FeaturesPlugin_Fillet1D.h
FeaturesPlugin_Measurement.h
FeaturesPlugin_DuplicatedFaces.h
+ FeaturesPlugin_CommonDuplicatedFaces.h
+ FeaturesPlugin_GroupDuplicatedFaces.h
FeaturesPlugin_FusionFaces.h
FeaturesPlugin_RemoveResults.h
FeaturesPlugin_Chamfer.h
FeaturesPlugin_Fillet1D.cpp
FeaturesPlugin_Measurement.cpp
FeaturesPlugin_DuplicatedFaces.cpp
+ FeaturesPlugin_CommonDuplicatedFaces.cpp
+ FeaturesPlugin_GroupDuplicatedFaces.cpp
FeaturesPlugin_FusionFaces.cpp
FeaturesPlugin_RemoveResults.cpp
FeaturesPlugin_Chamfer.cpp
fillet_widget.xml
fillet1d_widget.xml
measurement_widget.xml
- duplicatedFaces_widget.xml
+ duplicated_faces_widget.xml
+ duplicated_faces_macro_widget.xml
fusion_faces_widget.xml
chamfer_widget.xml
copy_widget.xml
TestFillet1D_Wire_3.py
TestFillet1D_Wire_4.py
TestFillet1D_Wire_5.py
- TestCheckDuplictedFaces.py
+ TestCheckDuplicatedFaces.py
)
--- /dev/null
+// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "FeaturesPlugin_CommonDuplicatedFaces.h"
+
+#include <ModelAPI_AttributeSelection.h>
+#include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_AttributeDouble.h>
+#include <ModelAPI_Attribute.h>
+
+#include <ModelAPI_Data.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
+#include <Locale_Convert.h>
+
+#include <GeomAlgoAPI_CompoundBuilder.h>
+
+#include <Config_PropManager.h>
+
+#include <GeomAlgoAPI_ShapeTools.h>
+#include <GeomAlgoAPI_DuplicatedFaces.h>
+#include <GeomAPI_ShapeIterator.h>
+#include <ModelAPI_Tools.h>
+#include <iomanip>
+#include <sstream>
+
+//=================================================================================================
+void explode(const GeomShapePtr& theCompound, ListOfShape& theSubs)
+{
+ if (theCompound->isCompound() || theCompound->isCompSolid()) {
+ GeomAPI_ShapeIterator anIt(theCompound);
+ for (; anIt.more(); anIt.next())
+ explode(anIt.current(), theSubs);
+ } else
+ theSubs.push_back(theCompound);
+}
+
+//=================================================================================================
+void FeaturesPlugin_CommonDuplicatedFaces::updateFaces()
+{
+ AttributeSelectionPtr ancompSolidAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(attributObject());
+
+ AttributeSelectionListPtr aFacesListAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>
+ (attributListFaces());
+
+ if (aFacesListAttr->isInitialized())
+ aFacesListAttr->clear();
+
+ AttributeDoublePtr aToleranceAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeDouble>
+ (attributTolerance());
+
+ GeomShapePtr aShape = ancompSolidAttr->value();
+ if (aShape.get() && ancompSolidAttr->context().get() && aToleranceAttr.get()) {
+
+ aShape = ancompSolidAttr->context()->shape();
+ if (aShape) {
+ std::string anError;
+ ListOfShape aFaces;
+ ListOfShape theSubs;
+ explode(aShape, theSubs);
+
+ if (!GetDuplicatedFaces(theSubs,
+ aToleranceAttr->value(),
+ aFaces,
+ anError))
+ setError("Error in duplicated faces calculation :" + anError);
+
+ aFacesListAttr->setSelectionType("face");
+
+ ListOfShape::const_iterator anIt = aFaces.cbegin();
+ for (; anIt != aFaces.cend(); ++anIt) {
+
+ GeomShapePtr aFacePtr = *anIt;
+
+ if (!aFacePtr.get()) {
+ setError("GetDuplicatedFaces : An invalid face found " + anError);
+ }
+ aFacesListAttr->append(ancompSolidAttr->context(), aFacePtr);
+ }
+ std::stringstream alabel;
+ alabel << "Number of duplicated faces : " << aFacesListAttr->size();
+ AttributeStringPtr aNumberFacesAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeString>
+ (attributNumberFaces());
+ aNumberFacesAttr->setValue(alabel.str());
+ }
+ }
+}
+
+//=================================================================================================
+void FeaturesPlugin_CommonDuplicatedFaces::setFacesGroup(const std::wstring& theName)
+{
+ std::vector<int> aColor;
+ ResultGroupPtr aGroup = document()->createGroup(data());
+ // clean the result of the operation
+ aGroup->data()->setName(theName);
+ aGroup->store(GeomShapePtr());
+
+ // shapes containing in group
+ ListOfShape aFaces;
+ AttributeSelectionListPtr aFacesListAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>
+ (attributListFaces());
+
+ for (int anI =0; anI< aFacesListAttr->size(); anI++) {
+ AttributeSelectionPtr aAtt = aFacesListAttr->value(anI);
+ aFaces.push_back(aAtt->value());
+ }
+ GeomShapePtr aCompound = GeomAlgoAPI_CompoundBuilder::compound(aFaces);
+
+ aGroup->store(aCompound);
+ aColor = {255,0,0};
+ setResult(aGroup);
+ ModelAPI_Tools::setColor(lastResult(),aColor);
+}
+
--- /dev/null
+// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef FeaturesPlugin_CommonDuplicatedFaces_H_
+#define FeaturesPlugin_CommonDuplicatedFaces_H_
+
+#include "FeaturesPlugin.h"
+#include <ModelAPI_Attribute.h>
+#include <ModelAPI_Feature.h>
+#include <ModelAPI_ResultGroup.h>
+
+#include <GeomAPI_IPresentable.h>
+#include <GeomAPI_IScreenParams.h>
+
+
+/// \class FeaturesPlugin_CommonDuplicatedFaces
+/// \ingroup Plugins
+/// \brief Feature to check the duplicated faces of solid
+
+class FeaturesPlugin_CommonDuplicatedFaces : public ModelAPI_Feature
+{
+public:
+
+ /// Performs the algorithm and stores results it in the data structure.
+ FEATURESPLUGIN_EXPORT virtual void execute(){};
+
+ /// Return Attribut values of result.
+ virtual AttributePtr attributObject() = 0;
+
+ /// Return Attribut values of result.
+ virtual AttributePtr attributListFaces() = 0;
+
+ /// Return Attribut values of result.
+ virtual AttributePtr attributNumberFaces() = 0;
+
+ /// Return Attribut values of tolerance.
+ virtual AttributePtr attributTolerance() = 0;
+
+ protected:
+ FeaturesPlugin_CommonDuplicatedFaces() {}
+
+ //Set group of faces
+ void setFacesGroup(const std::wstring& theName);
+
+ // Update the list of faces
+ void updateFaces();
+
+};
+
+#endif
#include "FeaturesPlugin_DuplicatedFaces.h"
+#include <FeaturesPlugin_GroupDuplicatedFaces.h>
#include <ModelAPI_AttributeSelection.h>
-#include <ModelAPI_AttributeRefList.h>
#include <ModelAPI_AttributeSelectionList.h>
#include <ModelAPI_AttributeBoolean.h>
+#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeString.h>
#include <ModelAPI_AttributeInteger.h>
#include <ModelAPI_Attribute.h>
#include <Config_PropManager.h>
#include <ModelAPI_ResultBody.h>
-#include <ModelAPI_ResultGroup.h>
#include <GeomAlgoAPI_ShapeTools.h>
-#include <GeomAlgoAPI_DuplicatedFaces.h>
-#include <GeomAPI_ShapeIterator.h>
#include <ModelAPI_Tools.h>
#include <iomanip>
#include <sstream>
-#include <iostream>
//=================================================================================================
FeaturesPlugin_DuplicatedFaces::FeaturesPlugin_DuplicatedFaces()
data()->addAttribute(NUMBER_FACES_ID(), ModelAPI_AttributeString::typeId());
data()->addAttribute(TRANSPARENCY_ID(), ModelAPI_AttributeInteger::typeId());
+ data()->addAttribute(TOLERANCE_ID(), ModelAPI_AttributeDouble::typeId());
data()->addAttribute(CREATE_GROUP_ID(), ModelAPI_AttributeBoolean::typeId());
data()->addAttribute(GROUP_NAME_ID(), ModelAPI_AttributeString::typeId());
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), GROUP_NAME_ID());
- boolean(CREATE_GROUP_ID())->setValue(false);
}
+
//=================================================================================================
-void explode(const GeomShapePtr& theCompound, ListOfShape& theSubs)
+AttributePtr FeaturesPlugin_DuplicatedFaces::attributObject()
{
- if (theCompound->isCompound() || theCompound->isCompSolid()) {
- GeomAPI_ShapeIterator anIt(theCompound);
- for (; anIt.more(); anIt.next())
- explode(anIt.current(), theSubs);
- }
- else
- theSubs.push_back(theCompound);
+ return attribute(OBJECT_ID());
+}
+
+//=================================================================================================
+AttributePtr FeaturesPlugin_DuplicatedFaces::attributListFaces()
+{
+ return attribute(LIST_FACES_ID());
+}
+
+//=================================================================================================
+AttributePtr FeaturesPlugin_DuplicatedFaces::attributNumberFaces()
+{
+ return attribute(NUMBER_FACES_ID());
}
+//=================================================================================================
+AttributePtr FeaturesPlugin_DuplicatedFaces::attributTolerance()
+{
+ return attribute(TOLERANCE_ID());
+}
+
+
//=================================================================================================
void FeaturesPlugin_DuplicatedFaces::execute()
{
- if(boolean(CREATE_GROUP_ID())->value()
- && selectionList(LIST_FACES_ID())->isInitialized()
- && string(GROUP_NAME_ID())->value() != "" ){
+ if (boolean(CREATE_GROUP_ID())->value()) {
- AttributeStringPtr aNameAtt = string(GROUP_NAME_ID());
- std::wstring aNameFace = aNameAtt->isUValue() ?
- Locale::Convert::toWString(aNameAtt->valueU()) :
- Locale::Convert::toWString(aNameAtt->value());
+ if (string(GROUP_NAME_ID())->value() != ""
+ && selectionList(LIST_FACES_ID())->isInitialized()) {
- if (myGroup.get())
- eraseResults();
- setFacesGroup(aNameFace);
+ if (lastResult().get()) {
+ eraseResultFromList(lastResult());
+ }
- } else {
- if (myGroup.get()) {
- eraseResults();
- myGroup.reset();
+ if (!myCreateGroupFeature.get())
+ createGroup();
+ updateGroup();
}
+ } else {
+ if (selectionList(LIST_FACES_ID())->isInitialized()) {
+
+ if (myCreateGroupFeature.get()) {
+ myCreateGroupFeature->eraseResults();
+ SessionPtr aSession = ModelAPI_Session::get();
+ DocumentPtr aDoc = aSession->activeDocument();
+ aDoc->removeFeature(myCreateGroupFeature);
+ myCreateGroupFeature.reset();
+ }
+
+ if (lastResult().get())
+ eraseResultFromList(lastResult());
+ setFacesGroup(L"Group_DuplicatedFaces");
+ }
}
+
if (selection(OBJECT_ID())->isInitialized()) {
AttributeSelectionPtr ancompSolidAttr = selection(OBJECT_ID());
ResultPtr aResult = ancompSolidAttr->context();
ModelAPI_Tools::allSubs(aResultBody, allRes);
std::list<ResultPtr>::iterator aRes;
for (aRes = allRes.begin(); aRes != allRes.end(); aRes++) {
- ModelAPI_Tools::setTransparency(*aRes, aTranparency);
+ ModelAPI_Tools::setTransparency(*aRes, aTranparency);
}
}
}
//=================================================================================================
void FeaturesPlugin_DuplicatedFaces::attributeChanged(const std::string& theID)
{
- if (theID == OBJECT_ID()) {
- AttributeSelectionPtr ancompSolidAttr = selection(OBJECT_ID());
-
- GeomShapePtr aShape = ancompSolidAttr->value();
- if (aShape.get() && ancompSolidAttr->context().get()) {
-
- aShape = ancompSolidAttr->context()->shape();
- if (aShape) {
- std::string anError;
- ListOfShape aFaces;
- ListOfShape theSubs;
- explode(aShape, theSubs);
+ if (theID == OBJECT_ID()
+ || theID == TOLERANCE_ID()) {
- if (!GetDuplicatedFaces(theSubs,
- 0.001,
- aFaces,
- anError))
- setError("Error in duplicated faces calculation :" + anError);
-
-
- AttributeSelectionListPtr aFacesListAttr =
- std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>
- (attribute(LIST_FACES_ID()));
-
- if (aFacesListAttr->isInitialized())
- aFacesListAttr->clear();
-
- aFacesListAttr->setSelectionType("face");
+ updateFaces();
+ if (myCreateGroupFeature.get())
+ updateGroup();
+ }
+}
- ListOfShape::const_iterator anIt = aFaces.cbegin();
- for(; anIt != aFaces.cend(); ++anIt) {
+//=================================================================================================
+void FeaturesPlugin_DuplicatedFaces::createGroup()
+{
+ SessionPtr aSession = ModelAPI_Session::get();
- GeomShapePtr aFacePtr = *anIt;
+ DocumentPtr aDoc = aSession->activeDocument();
- if (!aFacePtr.get()) {
- setError("GetDuplicatedFaces : An invalid face found " + anError);
- }
- aFacesListAttr->append( ancompSolidAttr->context(), aFacePtr);
- }
- std::stringstream alabel;
- alabel << "Number of duplicated faces : " << aFacesListAttr->size();
- string(NUMBER_FACES_ID() )->setValue( alabel.str() );
- }
- }
+ if (aDoc.get()) {
+ myCreateGroupFeature = aDoc->addFeature(FeaturesPlugin_GroupDuplicatedFaces::ID());
}
}
//=================================================================================================
-void FeaturesPlugin_DuplicatedFaces::setFacesGroup(const std::wstring& theName )
+void FeaturesPlugin_DuplicatedFaces::updateGroup()
{
- std::vector<int> aColor;
- myGroup = document()->createGroup(data());
- // clean the result of the operation
- myGroup->data()->setName(theName);
- myGroup->store(GeomShapePtr());
-
- // shapes containing in each group
- ListOfShape aFaces;
- AttributeSelectionListPtr aFacesListAttr =
- std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>
- (attribute(LIST_FACES_ID()));
-
- for (int anI =0; anI< aFacesListAttr->size(); anI++) {
- AttributeSelectionPtr aAtt = aFacesListAttr->value(anI);
- aFaces.push_back( aAtt->value() );
- }
+ myCreateGroupFeature->string(FeaturesPlugin_GroupDuplicatedFaces::GROUP_NAME_ID())
+ ->setValue(string(GROUP_NAME_ID())->value());
- GeomShapePtr aCompound = GeomAlgoAPI_CompoundBuilder::compound(aFaces);
- myGroup->store(aCompound);
- aColor = {255,0,0};
- setResult(myGroup);
- ModelAPI_Tools::setColor( lastResult(),aColor);
-}
+ myCreateGroupFeature->selection(FeaturesPlugin_GroupDuplicatedFaces::OBJECT_ID())
+ ->setValue(selection(OBJECT_ID())->context() ,
+ selection(OBJECT_ID())->value());
+
+ myCreateGroupFeature->integer(FeaturesPlugin_GroupDuplicatedFaces::TRANSPARENCY_ID())
+ ->setValue(integer(TRANSPARENCY_ID())->value());
+
+ myCreateGroupFeature->real(FeaturesPlugin_GroupDuplicatedFaces::TOLERANCE_ID())
+ ->setValue(real(TOLERANCE_ID())->value());
+ myCreateGroupFeature->execute();
+}
\ No newline at end of file
#ifndef FeaturesPlugin_DuplicatedFaces_H_
#define FeaturesPlugin_DuplicatedFaces_H_
-#include "FeaturesPlugin.h"
-#include <ModelAPI_Feature.h>
-#include <ModelAPI_ResultGroup.h>
-
-#include <GeomAPI_IPresentable.h>
-#include <GeomAPI_IScreenParams.h>
-#include <GeomAlgoAPI_Box.h>
+#include <FeaturesPlugin_CommonDuplicatedFaces.h>
/// \class FeaturesPlugin_DuplicatedFaces
/// \ingroup Plugins
/// \brief Feature to check the duplicated faces of solid
-class FeaturesPlugin_DuplicatedFaces : public ModelAPI_Feature
+class FeaturesPlugin_DuplicatedFaces : public FeaturesPlugin_CommonDuplicatedFaces
{
public:
inline static const std::string& ID()
{
- static const std::string MY_ID("Duplicated_faces");
+ static const std::string MY_ID("Duplicated_faces_macro");
return MY_ID;
}
return MY_LIST_FACES_ID;
}
- /// Attribute name for transparency.
+ /// Attribute name for transparency.
inline static const std::string& TRANSPARENCY_ID()
{
static const std::string MY_TRANSPARENCY_ID("transparency");
return MY_TRANSPARENCY_ID;
}
+ /// Attribute name for tolerance.
+ inline static const std::string& TOLERANCE_ID()
+ {
+ static const std::string MY_TOLERANCE_ID("tolerance");
+ return MY_TOLERANCE_ID;
+ }
+
/// Attribute name for checkbox create group.
inline static const std::string& CREATE_GROUP_ID()
{
/// \param theID identifier of changed attribute
FEATURESPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
+ /// Reimplemented from ModelAPI_Feature::isMacro(). Returns true.
+ FEATURESPLUGIN_EXPORT virtual bool isMacro() const { return true; }
+
/// Use plugin manager for features creation
FeaturesPlugin_DuplicatedFaces();
private:
- //Set group of faces
- void setFacesGroup(const std::wstring& theName );
- ResultGroupPtr myGroup;
+ /// Return Attribut values of object.
+ virtual AttributePtr attributObject();
+
+ /// Return Attribut values of list of faces.
+ virtual AttributePtr attributListFaces();
+
+ /// Return Attribut values of number of faces.
+ virtual AttributePtr attributNumberFaces();
+
+ /// Return Attribut values of tolerance.
+ virtual AttributePtr attributTolerance();
+
+ /// Create group
+ void createGroup();
+
+ /// Update group
+ void updateGroup();
+
+ /// Feature to create group
+ FeaturePtr myCreateGroupFeature;
};
#endif
--- /dev/null
+// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "FeaturesPlugin_GroupDuplicatedFaces.h"
+
+#include <ModelAPI_AttributeSelection.h>
+#include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_AttributeBoolean.h>
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_AttributeInteger.h>
+#include <ModelAPI_AttributeDouble.h>
+#include <ModelAPI_Attribute.h>
+
+#include <ModelAPI_Data.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
+
+#include <Locale_Convert.h>
+
+#include <GeomAlgoAPI_CompoundBuilder.h>
+
+#include <Config_PropManager.h>
+#include <ModelAPI_ResultBody.h>
+#include <GeomAlgoAPI_ShapeTools.h>
+#include <GeomAPI_ShapeIterator.h>
+#include <ModelAPI_Tools.h>
+#include <iomanip>
+#include <sstream>
+
+//=================================================================================================
+FeaturesPlugin_GroupDuplicatedFaces::FeaturesPlugin_GroupDuplicatedFaces()
+{
+}
+
+//=================================================================================================
+void FeaturesPlugin_GroupDuplicatedFaces::initAttributes()
+{
+ // attribute for object selected
+ data()->addAttribute(OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ AttributeSelectionListPtr aList = std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(
+ data()->addAttribute(LIST_FACES_ID(), ModelAPI_AttributeSelectionList::typeId()));
+
+ data()->addAttribute(NUMBER_FACES_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(TRANSPARENCY_ID(), ModelAPI_AttributeInteger::typeId());
+ data()->addAttribute(TOLERANCE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(GROUP_NAME_ID(), ModelAPI_AttributeString::typeId());
+
+}
+
+
+//=================================================================================================
+AttributePtr FeaturesPlugin_GroupDuplicatedFaces::attributObject()
+{
+ return attribute(OBJECT_ID());
+}
+
+//=================================================================================================
+AttributePtr FeaturesPlugin_GroupDuplicatedFaces::attributListFaces()
+{
+ return attribute(LIST_FACES_ID());
+}
+
+//=================================================================================================
+AttributePtr FeaturesPlugin_GroupDuplicatedFaces::attributNumberFaces()
+{
+ return attribute(NUMBER_FACES_ID());
+}
+
+//=================================================================================================
+AttributePtr FeaturesPlugin_GroupDuplicatedFaces::attributTolerance()
+{
+ return attribute(TOLERANCE_ID());
+}
+
+//=================================================================================================
+void FeaturesPlugin_GroupDuplicatedFaces::execute()
+{
+ if (selectionList(LIST_FACES_ID())->isInitialized()
+ && string(GROUP_NAME_ID())->value() != "") {
+ AttributeStringPtr aNameAtt = string(GROUP_NAME_ID()) ;
+ std::wstring aNameFace = aNameAtt->isUValue() ?
+ Locale::Convert::toWString(aNameAtt->valueU()) :
+ Locale::Convert::toWString(aNameAtt->value());
+
+ if (lastResult().get())
+ eraseResultFromList(lastResult());
+ setFacesGroup(aNameFace);
+
+ } else {
+ if (lastResult().get()) {
+ eraseResultFromList(lastResult());
+ }
+
+ }
+ if (selection(OBJECT_ID())->isInitialized()) {
+ AttributeSelectionPtr ancompSolidAttr = selection(OBJECT_ID());
+ ResultPtr aResult = ancompSolidAttr->context();
+
+ double aTranparency = integer(TRANSPARENCY_ID())->value()/100.0;
+ ModelAPI_Tools::setTransparency(aResult, aTranparency);
+
+ ResultBodyPtr aResultBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aResult);
+ std::list<ResultPtr> allRes;
+ ModelAPI_Tools::allSubs(aResultBody, allRes);
+ std::list<ResultPtr>::iterator aRes;
+ for(aRes = allRes.begin(); aRes != allRes.end(); aRes++) {
+ ModelAPI_Tools::setTransparency(*aRes, aTranparency);
+ }
+ }
+}
+
+//=================================================================================================
+void FeaturesPlugin_GroupDuplicatedFaces::attributeChanged(const std::string& theID)
+{
+ if (theID == OBJECT_ID()
+ || theID == TOLERANCE_ID()) {
+ updateFaces();
+ }
+}
\ No newline at end of file
--- /dev/null
+// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef FeaturesPlugin_GroupDuplicatedFaces_H_
+#define FeaturesPlugin_GroupDuplicatedFaces_H_
+
+#include <FeaturesPlugin_CommonDuplicatedFaces.h>
+
+/// \class FeaturesPlugin_GroupDuplicatedFaces
+/// \ingroup Plugins
+/// \brief Feature to check the duplicated faces of solid
+
+class FeaturesPlugin_GroupDuplicatedFaces : public FeaturesPlugin_CommonDuplicatedFaces
+{
+public:
+ inline static const std::string& ID()
+ {
+ static const std::string MY_ID("Duplicated_faces");
+ return MY_ID;
+ }
+
+ /// \return the kind of a feature.
+ virtual const std::string& getKind()
+ {
+ return ID();
+ }
+
+ /// Attribute name for object selected.
+ inline static const std::string& OBJECT_ID()
+ {
+ static const std::string MY_OBJECT_ID("main_object");
+ return MY_OBJECT_ID;
+ }
+
+ /// Attribute name for number of faces.
+ inline static const std::string& NUMBER_FACES_ID()
+ {
+ static const std::string MY_NUMBER_FACES_ID("number_duplicated_faces");
+ return MY_NUMBER_FACES_ID;
+ }
+
+ /// Attribute name for z coodinate.
+ inline static const std::string& LIST_FACES_ID()
+ {
+ static const std::string MY_LIST_FACES_ID("faces");
+ return MY_LIST_FACES_ID;
+ }
+
+ /// Attribute name for transparency.
+ inline static const std::string& TRANSPARENCY_ID()
+ {
+ static const std::string MY_TRANSPARENCY_ID("transparency");
+ return MY_TRANSPARENCY_ID;
+ }
+
+ /// Attribute name for tolerance.
+ inline static const std::string& TOLERANCE_ID()
+ {
+ static const std::string MY_TOLERANCE_ID("tolerance");
+ return MY_TOLERANCE_ID;
+ }
+
+ /// Attribute name for group name.
+ inline static const std::string& GROUP_NAME_ID()
+ {
+ static const std::string MY_GROUP_NAME_ID("group_name");
+ return MY_GROUP_NAME_ID;
+ }
+
+ /// Performs the algorithm and stores results it in the data structure.
+ FEATURESPLUGIN_EXPORT virtual void execute();
+
+ /// Request for initialization of data model of the feature: adding all attributes
+ FEATURESPLUGIN_EXPORT virtual void initAttributes();
+
+ /// Called on change of any argument-attribute of this object
+ /// \param theID identifier of changed attribute
+ FEATURESPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
+
+ /// Use plugin manager for features creation
+ FeaturesPlugin_GroupDuplicatedFaces();
+
+ private:
+
+ /// Return Attribut values of object.
+ virtual AttributePtr attributObject();
+
+ /// Return Attribut values of list of faces.
+ virtual AttributePtr attributListFaces();
+
+ /// Return Attribut values of number of faces.
+ virtual AttributePtr attributNumberFaces();
+
+ /// Return Attribut values of tolerance.
+ virtual AttributePtr attributTolerance();
+
+};
+
+#endif
#include <FeaturesPlugin_Intersection.h>
#include <FeaturesPlugin_Measurement.h>
#include <FeaturesPlugin_DuplicatedFaces.h>
+#include <FeaturesPlugin_GroupDuplicatedFaces.h>
#include <FeaturesPlugin_MultiRotation.h>
#include <FeaturesPlugin_MultiTranslation.h>
#include <FeaturesPlugin_Partition.h>
return FeaturePtr(new FeaturesPlugin_Measurement);
} else if (theFeatureID == FeaturesPlugin_DuplicatedFaces::ID()) {
return FeaturePtr(new FeaturesPlugin_DuplicatedFaces);
+ } else if (theFeatureID == FeaturesPlugin_GroupDuplicatedFaces::ID()) {
+ return FeaturePtr(new FeaturesPlugin_GroupDuplicatedFaces);
} else if (theFeatureID == FeaturesPlugin_RemoveResults::ID()) {
return FeaturePtr(new FeaturesPlugin_RemoveResults);
} else if (theFeatureID == FeaturesPlugin_Chamfer::ID()) {
--- /dev/null
+# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+"""
+ Unit test of Check Duplicated faces
+"""
+#=========================================================================
+# Initialization of the test
+#=========================================================================
+
+
+import os
+import math
+
+from ModelAPI import *
+from GeomAPI import *
+from salome.shaper import model
+
+
+__updated__ = "2020-11-12"
+
+
+if __name__ == '__main__':
+
+ model.begin()
+ partSet = model.moduleDocument()
+ Part_1 = model.addPart(partSet)
+ Part_1_doc = Part_1.document()
+ ### Create Box
+ Box_1 = model.addBox(Part_1_doc, 100, 50, 100)
+ ### Create Point
+ Point_1 = model.addPoint(Part_1_doc, 100, 0, 0)
+ ### Create Point
+ Point_2 = model.addPoint(Part_1_doc, 250, 50, 100)
+ ### Create Box
+ Box_2 = model.addBox(Part_1_doc, model.selection("VERTEX", "all-in-Point_1"), model.selection("VERTEX", "all-in-Point_2"))
+ ### Create Point
+ Point_3 = model.addPoint(Part_1_doc, 100, 50, 250)
+ ### Create Box
+ Box_3 = model.addBox(Part_1_doc, model.selection("VERTEX", "[Box_1_1/Back][Box_1_1/Left][Box_1_1/Top]"), model.selection("VERTEX", "Point_3"))
+ ### Create Compound
+ Compound_1_objects = [model.selection("SOLID", "Box_1_1"),
+ model.selection("SOLID", "Box_2_1"),
+ model.selection("SOLID", "Box_3_1")]
+ Compound_1 = model.addCompound(Part_1_doc, Compound_1_objects)
+ ### Create Duplicated_faces
+ Duplicated_faces_1 = model.getDuplicatedFaces(Part_1_doc, model.selection("COMPOUND", "Compound_1_1"), 50, 0.001, "mygroup")
+
+ model.do()
+ # Check results
+ Duplicated_faces_1_Feature = Duplicated_faces_1.feature()
+ assert Duplicated_faces_1_Feature.error() == ''
+ assert Duplicated_faces_1_Feature.name() == "Duplicated_faces_1"
+
+ aSelectionList = Duplicated_faces_1_Feature.selectionList("faces")
+ assert aSelectionList.size() == 2
+
+ assert(Part_1_doc.size("Groups") == 1)
+
+ #assert Part_1_doc.object("Groups", 0).name() == "mygroup"
+ resShape = modelAPI_Result(Part_1_doc.object("Groups", 0)).shape()
+ assert(not resShape.isNull())
+
+ # the group result is a face, check that this is one face
+ aShapeExplorer = GeomAPI_ShapeExplorer(resShape, GeomAPI_Shape.FACE)
+ assert(aShapeExplorer.more())
+ assert(aShapeExplorer.current().isFace())
+ aShapeExplorer.next()
+ aShapeExplorer.next()
+ assert(not aShapeExplorer.more())
+
+ model.end()
+
+ #=========================================================================
+ # End of test
+ #=========================================================================
+++ /dev/null
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-"""
- Unit test of Check Duplicated faces
-"""
-#=========================================================================
-# Initialization of the test
-#=========================================================================
-
-
-import os
-import math
-
-from ModelAPI import *
-from GeomAPI import *
-from salome.shaper import model
-
-
-__updated__ = "2020-11-12"
-
-
-if __name__ == '__main__':
-
- model.begin()
- partSet = model.moduleDocument()
- Part_1 = model.addPart(partSet)
- Part_1_doc = Part_1.document()
- ### Create Box
- Box_1 = model.addBox(Part_1_doc, 100, 50, 100)
- ### Create Point
- Point_1 = model.addPoint(Part_1_doc, 100, 0, 0)
- ### Create Point
- Point_2 = model.addPoint(Part_1_doc, 250, 50, 100)
- ### Create Box
- Box_2 = model.addBox(Part_1_doc, model.selection("VERTEX", "all-in-Point_1"), model.selection("VERTEX", "all-in-Point_2"))
- ### Create Point
- Point_3 = model.addPoint(Part_1_doc, 100, 50, 250)
- ### Create Box
- Box_3 = model.addBox(Part_1_doc, model.selection("VERTEX", "[Box_1_1/Back][Box_1_1/Left][Box_1_1/Top]"), model.selection("VERTEX", "Point_3"))
- ### Create Compound
- Compound_1_objects = [model.selection("SOLID", "Box_1_1"),
- model.selection("SOLID", "Box_2_1"),
- model.selection("SOLID", "Box_3_1")]
- Compound_1 = model.addCompound(Part_1_doc, Compound_1_objects)
- ### Create Duplicated_faces
- Duplicated_faces_1 = model.getDuplicatedFaces(Part_1_doc, model.selection("COMPOUND", "Compound_1_1"), 50, "mygroup")
-
- model.do()
- # Check results
- Duplicated_faces_1_Feature = Duplicated_faces_1.feature()
- assert Duplicated_faces_1_Feature.error() == ''
- assert Duplicated_faces_1_Feature.name() == "Duplicated_faces_1"
-
- aSelectionList = Duplicated_faces_1_Feature.selectionList("faces")
- assert aSelectionList.size() == 2
-
- assert(Part_1_doc.size("Groups") == 1)
-
- #assert Part_1_doc.object("Groups", 0).name() == "mygroup"
- resShape = modelAPI_Result(Part_1_doc.object("Groups", 0)).shape()
- assert(not resShape.isNull())
-
- # the group result is a face, check that this is one face
- aShapeExplorer = GeomAPI_ShapeExplorer(resShape, GeomAPI_Shape.FACE)
- assert(aShapeExplorer.more())
- assert(aShapeExplorer.current().isFace())
- aShapeExplorer.next()
- aShapeExplorer.next()
- assert(not aShapeExplorer.more())
-
- model.end()
-
- #=========================================================================
- # End of test
- #=========================================================================
- **Number of duplicated faces** indicate the number of found faces.
- **List of faces** the list of found faces.
- **Transparency** set the transparency of selected object.
+- **Tolerance** set the tolerance for the algotithme.
- **Create group** check-box allow the creation of the group of found faces.
- **Group name** specified the name of the group created.
**TUI Command**:
-.. py:function:: model.getDuplicatedFaces(Part_doc, shape, transparency, nameGroup)
+.. py:function:: model.getDuplicatedFaces(Part_doc, shape, transparency, tolerance, nameGroup)
:param part: The current part object.
:param object: A composolid or compound in format *model.selection("Type", shape)*.
- :param number: value for the transparency.
+ :param number: value of the transparency.
+ :param number: value of the tolerance.
:param string: name of group created.
:return: Created group.
model.selection("SOLID", "Box_3_1")]
Compound_1 = model.addCompound(Part_1_doc, Compound_1_objects)
### Create Duplicated_faces
-Duplicated_faces_1 = model.getDuplicatedFaces(Part_1_doc, model.selection("COMPOUND", "Compound_1_1"), 50, "mygroup")
+Duplicated_faces_1 = model.getDuplicatedFaces(Part_1_doc, model.selection("COMPOUND", "Compound_1_1"), 50, 0.001, "mygroup")
model.do()
model.end()
+++ /dev/null
-<source>
- <shape_selector id="main_object"
- label="Object"
- tooltip="Select a object"
- shape_types="compsolid compsolid object"
- default=""
- geometrical_selection="true">
- <validator id="PartSet_DifferentObjects"/>
- <validator id="GeomValidators_ShapeType" parameters="compsolid,compound"/>
- </shape_selector>
- <groupbox title="Duplicated faces">
- <label id="number_duplicated_faces"/>
- <multi_selector id="faces"
- label="Liste of faces :"
- icon=""
- shape_types="faces"
- Block_selection = "true"
- use_choice="false">
- <validator id="PartSet_DifferentObjects"/>
- <validator id="GeomValidators_ShapeType" parameters="faces"/>
- </multi_selector>
- </groupbox>
- <integervalue id="transparency"
- label="Transparency"
- min="0"
- max="100"
- step="10"
- default="50">
- </integervalue>
- <optionalbox id="create_group" title="Create group" show_title="true">
- <stringvalue id="group_name" label="Group Name"/>
- <label/>
- </optionalbox>
-</source>
--- /dev/null
+<source>
+ <shape_selector id="main_object"
+ label="Object"
+ tooltip="Select a object"
+ shape_types="compsolid compsolid object"
+ default=""
+ geometrical_selection="true">
+ <validator id="PartSet_DifferentObjects"/>
+ <validator id="GeomValidators_ShapeType" parameters="compsolid,compound"/>
+ </shape_selector>
+ <groupbox title="Duplicated faces">
+ <label id="number_duplicated_faces"/>
+ <multi_selector id="faces"
+ label="List of faces :"
+ icon=""
+ shape_types="faces"
+ Block_selection = "true"
+ use_choice="false">
+ <validator id="PartSet_DifferentObjects"/>
+ <validator id="GeomValidators_ShapeType" parameters="faces"/>
+ </multi_selector>
+ </groupbox>
+ <integervalue id="transparency"
+ label="Transparency"
+ min="0"
+ max="100"
+ step="10"
+ default="50">
+ </integervalue>
+ <doublevalue id="tolerance"
+ label="Tolerance"
+ min="0"
+ step="0.001"
+ default="0.001">
+ </doublevalue>
+ <optionalbox id="create_group" title="Create group" show_title="true">
+ <stringvalue id="group_name" label="Group Name"/>
+ <label/>
+ </optionalbox>
+</source>
--- /dev/null
+<source>
+ <shape_selector id="main_object"
+ label="Object"
+ tooltip="Select a object"
+ shape_types="compsolid compsolid object"
+ default=""
+ geometrical_selection="true">
+ <validator id="PartSet_DifferentObjects"/>
+ <validator id="GeomValidators_ShapeType" parameters="compsolid,compound"/>
+ </shape_selector>
+ <groupbox title="Duplicated faces">
+ <label id="number_duplicated_faces"/>
+ <multi_selector id="faces"
+ label="List of faces :"
+ icon=""
+ shape_types="faces"
+ Block_selection = "true"
+ use_choice="false">
+ <validator id="PartSet_DifferentObjects"/>
+ <validator id="GeomValidators_ShapeType" parameters="faces"/>
+ </multi_selector>
+ </groupbox>
+ <integervalue id="transparency"
+ label="Transparency"
+ min="0"
+ max="100"
+ step="10"
+ default="50">
+ </integervalue>
+ <doublevalue id="tolerance"
+ label="Tolerance"
+ min="0"
+ step="0.001"
+ default="0.001">
+ </doublevalue>
+ <stringvalue id="group_name" label="Group Name"/>
+</source>
<source path="fillet1d_widget.xml"/>
</feature>
<feature id="Fillet" title="Fillet" tooltip="Perform fillet on face or edge"
- icon="icons/Features/fillet.png" auto_preview="false" helpfile="filletFeature.html">
+ icon="icons/Features/fillet.png" auto_preview="true" helpfile="filletFeature.html">
<source path="fillet_widget.xml"/>
</feature>
<feature id="Chamfer" title="Chamfer" tooltip="Perform chamfer on face or edge"
</feature>
</group>
<group id="Face">
- <feature id="Duplicated_faces" title="Check duplicated faces" tooltip="Check the duplicated faces" auto_preview="true"
+ <feature id="Duplicated_faces_macro" title="Check duplicated faces" tooltip="Check the duplicated faces" auto_preview="true"
icon="icons/Features/duplicatedFaces.png" helpfile="checkDuplicatedFaceFeature.html">
- <source path="duplicatedFaces_widget.xml"/>
+ <source path="duplicated_faces_macro_widget.xml"/>
+ </feature>
+ <feature id="Duplicated_faces" title="Check duplicated faces" tooltip="Check the duplicated faces" auto_preview="true"
+ icon="icons/Features/duplicatedFaces.png" helpfile="checkDuplicatedFaceFeature.html" internal="1">
+ <source path="duplicated_faces_widget.xml"/>
</feature>
</group>
</workbench>
Test2488.py
Test18451.py
Test19031.py
+ Test19990_1.py
+ Test19990_2.py
+ Test20167.py
)