# # language_version: python3.8
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
- rev: v0.1.9
+ rev: v0.3.5
hooks:
# Run the linter.
- id: ruff
exclude: |
(?x)^(
.*[Tt]est.*|
- __init__.py
+ .*__init__.py
)$
# Run the formatter.
- id: ruff-format
types_or: [python, pyi, jupyter]
- - repo: https://github.com/pre-commit/mirrors-mypy
- rev: v1.8.0
- hooks:
- - id: mypy
- exclude: |
- (?x)^(
- .*[Tt]est.*
- )$
- args: [--ignore-missing-imports, --explicit-package-bases]
+ # - repo: https://github.com/pre-commit/mirrors-mypy
+ # rev: v1.8.0
+ # hooks:
+ # - id: mypy
+ # exclude: |
+ # (?x)^(
+ # .*[Tt]est.*
+ # )$
+ # args: [--ignore-missing-imports, --explicit-package-bases]
- repo: https://github.com/pre-commit/mirrors-clang-format
- rev: v17.0.6 # Use the sha / tag you want to point at
+ rev: v18.1.2 # Use the sha / tag you want to point at
hooks:
- id: clang-format
# - id: clang-tidy
# .*\.cxx
# )$
- repo: https://github.com/scop/pre-commit-shfmt
- rev: v3.7.0-4
+ rev: v3.8.0-1
hooks:
# Choose one of:
- id: shfmt # prebuilt upstream executable
# - id: shfmt-src # build from source (requires/installs Go to build)
# - id: shfmt-docker # Docker image (requires Docker to run)
- repo: https://github.com/shellcheck-py/shellcheck-py
- rev: v0.9.0.6
+ rev: v0.10.0.1
hooks:
- id: shellcheck
args: [--severity=warning]
- repo: https://github.com/adrienverge/yamllint.git
- rev: v1.21.0 # or higher tag
+ rev: v1.35.1 # or higher tag
hooks:
- id: yamllint
args: [--strict, '--config-data={extends: relaxed, rules: {line-length: {max: 120}}}']
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
- rev: 0.2.1 # or other specific tag
+ rev: 0.2.3 # or other specific tag
hooks:
- id: yamlfmt
- repo: https://github.com/pre-commit/pygrep-hooks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/cheshirekow/cmake-format-precommit
- rev: v0.6.10
+ rev: v0.6.13
hooks:
- id: cmake-format
# - id: cmake-lint
file(TO_CMAKE_PATH "$ENV{BOOST_ROOT_DIR}" BOOST_ROOT)
set(CMAKE_MODULE_PATH "${PLANEGCS_CMAKE_DIR}" ${CMAKE_MODULE_PATH})
find_package(Eigen3 3.2.5 REQUIRED)
-find_package(Boost COMPONENTS graph REQUIRED)
+find_package(
+ Boost
+ COMPONENTS graph
+ REQUIRED)
if(Boost_FOUND AND EIGEN3_FOUND)
set(PLANEGCS_INCLUDE_DIRS ${PLANEGCS_INCLUDE_DIR})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import sys, pickle
+import sys
+import pickle
from killSalome import getPiDict
process = sys.argv[2] # SALOME_Session_Server"
#
"""
- Issue #2409: Filling on one edge
- Check the Filling reports error if just one edge is selected
+Issue #2409: Filling on one edge
+Check the Filling reports error if just one edge is selected
"""
from salome.shaper import model
#
"""
- TestBoolean.py
- Unit test of FeaturesPlugin_Group class
+TestBoolean.py
+Unit test of FeaturesPlugin_Group class
- class FeaturesPlugin_Group
- static const std::string MY_GROUP_ID("Group");
- static const std::string MY_GROUP_LIST_ID("group_list");
+class FeaturesPlugin_Group
+ static const std::string MY_GROUP_ID("Group");
+ static const std::string MY_GROUP_LIST_ID("group_list");
- data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
+ data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- TestBoolean.py
- Unit test of FeaturesPlugin_Group class
+TestBoolean.py
+Unit test of FeaturesPlugin_Group class
- class FeaturesPlugin_Group
- static const std::string MY_GROUP_ID("Group");
- static const std::string MY_GROUP_LIST_ID("group_list");
+class FeaturesPlugin_Group
+ static const std::string MY_GROUP_ID("Group");
+ static const std::string MY_GROUP_LIST_ID("group_list");
- data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
+ data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
aSrc = aDictIt->first;
oFStream << " <source>" << aSrc << "</source>" << std::endl;
- oFStream << " <translation>"
- << "</translation>" << std::endl;
+ oFStream << " <translation>" << "</translation>" << std::endl;
oFStream << " </message>" << std::endl;
}
}
if (myXmlDoc == nullptr) {
#ifdef _DEBUG
- std::cout << "Config_XMLReader::import: "
- << "Document " << aDocPath << " is not parsed successfully."
- << std::endl;
+ std::cout << "Config_XMLReader::import: " << "Document " << aDocPath
+ << " is not parsed successfully." << std::endl;
#endif
return nullptr;
}
xmlNodePtr aRoot = xmlDocGetRootElement(myXmlDoc);
#ifdef _DEBUG
if (aRoot == NULL) {
- std::cout << "Config_XMLReader::import: "
- << "Error: empty document";
+ std::cout << "Config_XMLReader::import: " << "Error: empty document";
}
#endif
return aRoot;
#
"""
- TestExport.py
- Unit test of ExchangePlugin_TestExport class
+TestExport.py
+Unit test of ExchangePlugin_TestExport class
"""
# =========================================================================
# Initialization of the test
#
"""
- TestExportXAOMem.py
- Unit test of ExchangePlugin_ExportFeature class
+TestExportXAOMem.py
+Unit test of ExchangePlugin_ExportFeature class
"""
# =========================================================================
#
"""
- TestImportStep.py
- Unit test of ExchangePlugin_ImportFeature class for STEP
+TestImportStep.py
+Unit test of ExchangePlugin_ImportFeature class for STEP
"""
# =========================================================================
# Initialization of the test
#
"""
- TestImportXAOMem.py
- Unit test of ExchangePlugin_ImportFeature class
+TestImportXAOMem.py
+Unit test of ExchangePlugin_ImportFeature class
"""
# =========================================================================
"""
Test case for Construction Plane feature. Written on High API.
"""
+
from ModelAPI import *
from GeomAPI import *
"""
Test case for Construction Plane feature. Written on High API.
"""
+
from ModelAPI import *
from GeomAPI import *
"""
Test case for Construction Point feature by coordinates.
"""
+
from ModelAPI import *
from GeomAPI import *
#
"""
- UnitTestAxis.py
- Unit Test of ConstructionPlugin_Axis class
+UnitTestAxis.py
+Unit Test of ConstructionPlugin_Axis class
- static const std::string CONSTRUCTION_AXIS_KIND("Axis");
- static const std::string METHOD_ATTR("CreationMethod");
- static const std::string POINT_ATTR_FIRST("FirstPoint");
- static const std::string POINT_ATTR_SECOND("SecondPoint");
- static const std::string CYLINDRICAL_FACE_ATTR("CylindricalFace");
- static const std::string X_ATTR("X");
- static const std::string Y_ATTR("Y");
- static const std::string Z_ATTR("Z");
+static const std::string CONSTRUCTION_AXIS_KIND("Axis");
+static const std::string METHOD_ATTR("CreationMethod");
+static const std::string POINT_ATTR_FIRST("FirstPoint");
+static const std::string POINT_ATTR_SECOND("SecondPoint");
+static const std::string CYLINDRICAL_FACE_ATTR("CylindricalFace");
+static const std::string X_ATTR("X");
+static const std::string Y_ATTR("Y");
+static const std::string Z_ATTR("Z");
- data()->addAttribute(ConstructionPlugin_Axis::METHOD(), ModelAPI_AttributeString::typeId());
+data()->addAttribute(ConstructionPlugin_Axis::METHOD(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(ConstructionPlugin_Axis::POINT_FIRST(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(ConstructionPlugin_Axis::POINT_SECOND(), ModelAPI_AttributeSelection::typeId());
+data()->addAttribute(ConstructionPlugin_Axis::POINT_FIRST(), ModelAPI_AttributeSelection::typeId());
+data()->addAttribute(ConstructionPlugin_Axis::POINT_SECOND(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(ConstructionPlugin_Axis::CYLINDRICAL_FACE(), ModelAPI_AttributeSelection::typeId());
+data()->addAttribute(ConstructionPlugin_Axis::CYLINDRICAL_FACE(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(ConstructionPlugin_Axis::X(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(ConstructionPlugin_Axis::Y(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(ConstructionPlugin_Axis::Z(), ModelAPI_AttributeDouble::typeId());
+data()->addAttribute(ConstructionPlugin_Axis::X(), ModelAPI_AttributeDouble::typeId());
+data()->addAttribute(ConstructionPlugin_Axis::Y(), ModelAPI_AttributeDouble::typeId());
+data()->addAttribute(ConstructionPlugin_Axis::Z(), ModelAPI_AttributeDouble::typeId());
"""
-
# =========================================================================
# Initialization of the test
# =========================================================================
if (stldeflectionType()->value() ==
ExchangePlugin_ExportFeature::STL_DEFLECTION_TYPE_RELATIVE()) {
- theDumper << ","
- << "True";
+ theDumper << "," << "True";
} else {
- theDumper << ","
- << "False";
+ theDumper << "," << "False";
}
if (stlfileType()->value() ==
#
"""
- TestExport.py
- Unit test of ExchangePlugin_TestExport class
+TestExport.py
+Unit test of ExchangePlugin_TestExport class
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- TestImport.py
- Unit test of ExchangePlugin_TestImport class
+TestImport.py
+Unit test of ExchangePlugin_TestImport class
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
}
theDumper << aBase << " = model.addRemoveSubShapes(" << aDocName << ", "
- << anAttrBaseShape << ")"
- << "\n"
+ << anAttrBaseShape << ")" << "\n"
<< theDumper.name(aBase)
<< (isKeepSubs ? ".setSubShapesToKeep(" : ".setSubShapesToRemove(")
<< anAttrSubShapes << ")" << std::endl;
class FeaturesPlugin_BoundingBoxBase : public ModelAPI_Feature {
public:
/// Performs the algorithm and stores results it in the data structure.
- FEATURESPLUGIN_EXPORT void execute() override{};
+ FEATURESPLUGIN_EXPORT void execute() override {};
/// Return Attribut values of result.
virtual AttributePtr attributResultValues() = 0;
class FeaturesPlugin_CommonSharedFaces : public ModelAPI_Feature {
public:
/// Performs the algorithm and stores results it in the data structure.
- FEATURESPLUGIN_EXPORT void execute() override{};
+ FEATURESPLUGIN_EXPORT void execute() override {};
/// Return Attribut values of result.
virtual AttributePtr attributObject() = 0;
#
"""
- TestBoolean.py
- Unit test of FeaturesPlugin_Boolean class
+TestBoolean.py
+Unit test of FeaturesPlugin_Boolean class
- class FeaturesPlugin_Boolean
- static const std::string MY_ID("Boolean");
- static const std::string MY_OBJECT_ID("main_object");
- static const std::string MY_TOOL_ID("tool_object");
- static const std::string MY_TYPE_ID("bool_type");
+class FeaturesPlugin_Boolean
+ static const std::string MY_ID("Boolean");
+ static const std::string MY_OBJECT_ID("main_object");
+ static const std::string MY_TOOL_ID("tool_object");
+ static const std::string MY_TYPE_ID("bool_type");
- data()->addAttribute(FeaturesPlugin_Boolean::OBJECT_ID(), ModelAPI_AttributeReference::typeId());
- data()->addAttribute(FeaturesPlugin_Boolean::TOOL_ID(), ModelAPI_AttributeReference::typeId());
- data()->addAttribute(FeaturesPlugin_Boolean::TYPE_ID(), ModelAPI_AttributeInteger::typeId());
+ data()->addAttribute(FeaturesPlugin_Boolean::OBJECT_ID(), ModelAPI_AttributeReference::typeId());
+ data()->addAttribute(FeaturesPlugin_Boolean::TOOL_ID(), ModelAPI_AttributeReference::typeId());
+ data()->addAttribute(FeaturesPlugin_Boolean::TYPE_ID(), ModelAPI_AttributeInteger::typeId());
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- Unit test of ...
+Unit test of ...
"""
# =========================================================================
# Initialization of the test
# =========================================================================
-
import math
from ModelAPI import *
#
"""
- TestChamfer.py
- Unit test of FeaturesPlugin_Chamfer class
+TestChamfer.py
+Unit test of FeaturesPlugin_Chamfer class
"""
from ModelAPI import *
#
"""
- Unit test of Check shared faces
+Unit test of Check shared faces
"""
# =========================================================================
# Initialization of the test
# =========================================================================
-
from ModelAPI import *
from GeomAPI import *
from salome.shaper import model
#
"""
- TestExtrusion.py
- Unit test of FeaturesPlugin_Extrusion class
+TestExtrusion.py
+Unit test of FeaturesPlugin_Extrusion class
- class FeaturesPlugin_Extrusion : public ModelAPI_Feature
- static const std::string MY_EXTRUSION_ID("Extrusion");
- static const std::string LIST_ID("base");
- static const std::string METHOD_ATTR("CreationMethod");
- static const std::string MY_TO_SIZE_ID("to_size");
- static const std::string MY_FROM_SIZE_ID("from_size");
- static const std::string MY_TO_OBJECT_ID("to_object");
- static const std::string MY_TO_OFFSET_ID("to_offset");
- static const std::string MY_FROM_OBJECT_ID("from_object");
- static const std::string MY_FROM_OFFSET_ID("from_offset");
+class FeaturesPlugin_Extrusion : public ModelAPI_Feature
+ static const std::string MY_EXTRUSION_ID("Extrusion");
+ static const std::string LIST_ID("base");
+ static const std::string METHOD_ATTR("CreationMethod");
+ static const std::string MY_TO_SIZE_ID("to_size");
+ static const std::string MY_FROM_SIZE_ID("from_size");
+ static const std::string MY_TO_OBJECT_ID("to_object");
+ static const std::string MY_TO_OFFSET_ID("to_offset");
+ static const std::string MY_FROM_OBJECT_ID("from_object");
+ static const std::string MY_FROM_OFFSET_ID("from_offset");
- data()->addAttribute(LIST_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(TO_SIZE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(FROM_SIZE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(TO_OFFSET_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FROM_OFFSET_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(LIST_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(TO_SIZE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(FROM_SIZE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(TO_OFFSET_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(FROM_OFFSET_ID(), ModelAPI_AttributeSelection::typeId());
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- TestFillet.py
- Unit test of FeaturesPlugin_Fillet class
+TestFillet.py
+Unit test of FeaturesPlugin_Fillet class
"""
from ModelAPI import *
#
"""
- Unit test of ...
+Unit test of ...
"""
# =========================================================================
# Initialization of the test
#
"""
- TestExtrusion.py
- Unit test of FeaturesPlugin_Boolean class: many Boolean operations performance
-
- class FeaturesPlugin_Extrusion : public ModelAPI_Feature
- static const std::string MY_EXTRUSION_ID("Extrusion");
- static const std::string MY_FACE_ID("base");
- static const std::string MY_SIZE_ID("size");
- static const std::string MY_REVERSE_ID("reverse");
-
- data()->addAttribute(FeaturesPlugin_Extrusion::FACE_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FeaturesPlugin_Extrusion::SIZE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(FeaturesPlugin_Extrusion::REVERSE_ID(), ModelAPI_AttributeBoolean::typeId());
+TestExtrusion.py
+Unit test of FeaturesPlugin_Boolean class: many Boolean operations performance
+
+class FeaturesPlugin_Extrusion : public ModelAPI_Feature
+ static const std::string MY_EXTRUSION_ID("Extrusion");
+ static const std::string MY_FACE_ID("base");
+ static const std::string MY_SIZE_ID("size");
+ static const std::string MY_REVERSE_ID("reverse");
+
+ data()->addAttribute(FeaturesPlugin_Extrusion::FACE_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(FeaturesPlugin_Extrusion::SIZE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(FeaturesPlugin_Extrusion::REVERSE_ID(), ModelAPI_AttributeBoolean::typeId());
"""
# Number rows and columns of cylinders that cuts the big box. Number of Boolena operations is N*N
#
"""
- Unit test of ...
+Unit test of ...
"""
# =========================================================================
# Initialization of the test
# =========================================================================
-
from ModelAPI import modelAPI_ResultConstruction
from salome.shaper import model
#
"""
- Unit test of makeVertexInsideFace
+Unit test of makeVertexInsideFace
"""
from salome.shaper import model
#
"""
- Unit test of ...
+Unit test of ...
"""
# =========================================================================
# Initialization of the test
#
"""
- TestRevolution.py
- Unit test of FeaturesPlugin_Revolution class
-
- class FeaturesPlugin_Revolution : public ModelAPI_Feature
- static const std::string MY_REVOLUTION_ID("Revolution");
- static const std::string MY_GROUP_LIST_ID("base");
- static const std::string MY_TO_OBJECT_ID("axis_object");
- static const std::string METHOD_ATTR("CreationMethod");
- static const std::string MY_TO_ANGLE_ID("to_angle");
- static const std::string MY_FROM_ANGLE_ID("from_angle");
- static const std::string MY_TO_OBJECT_ID("to_object");
- static const std::string MY_TO_OFFSET_ID("to_offset");
- static const std::string MY_FROM_OBJECT_ID("from_object");
- static const std::string MY_FROM_OFFSET_ID("from_offset");
-
- data()->addAttribute(LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
- data()->addAttribute(AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(TO_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(FROM_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(TO_OFFSET_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FROM_OFFSET_ID(), ModelAPI_AttributeDouble::typeId());
+TestRevolution.py
+Unit test of FeaturesPlugin_Revolution class
+
+class FeaturesPlugin_Revolution : public ModelAPI_Feature
+ static const std::string MY_REVOLUTION_ID("Revolution");
+ static const std::string MY_GROUP_LIST_ID("base");
+ static const std::string MY_TO_OBJECT_ID("axis_object");
+ static const std::string METHOD_ATTR("CreationMethod");
+ static const std::string MY_TO_ANGLE_ID("to_angle");
+ static const std::string MY_FROM_ANGLE_ID("from_angle");
+ static const std::string MY_TO_OBJECT_ID("to_object");
+ static const std::string MY_TO_OFFSET_ID("to_offset");
+ static const std::string MY_FROM_OBJECT_ID("from_object");
+ static const std::string MY_FROM_OFFSET_ID("from_offset");
+
+ data()->addAttribute(LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
+ data()->addAttribute(AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(TO_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(FROM_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(TO_OFFSET_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(FROM_OFFSET_ID(), ModelAPI_AttributeDouble::typeId());
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- TestRevolutionFuse.py
- Unit test of FeaturesPlugin_RevolutionFuse class
+TestRevolutionFuse.py
+Unit test of FeaturesPlugin_RevolutionFuse class
- class FeaturesPlugin_RevolutionFuse : public FeaturesPlugin_RevolutionBoolean
- static const std::string MY_REVOLUTION_ID("RevolutionFuse");
- static const std::string MY_SKETCH_OBJECT_ID("sketch");
- static const std::string MY_AXIS_ID("axis_object");
- static const std::string METHOD_ATTR("CreationMethod");
- static const std::string MY_TO_ANGLE_ID("to_angle");
- static const std::string MY_FROM_ANGLE_ID("from_angle");
- static const std::string MY_TO_OBJECT_ID("to_object");
- static const std::string MY_TO_OFFSET_ID("to_offset");
- static const std::string MY_FROM_OBJECT_ID("from_object");
- static const std::string MY_FROM_OFFSET_ID("from_offset");
- static const std::string MY_BOOLEAN_OBJECTS_ID("boolean_objects");
+class FeaturesPlugin_RevolutionFuse : public FeaturesPlugin_RevolutionBoolean
+ static const std::string MY_REVOLUTION_ID("RevolutionFuse");
+ static const std::string MY_SKETCH_OBJECT_ID("sketch");
+ static const std::string MY_AXIS_ID("axis_object");
+ static const std::string METHOD_ATTR("CreationMethod");
+ static const std::string MY_TO_ANGLE_ID("to_angle");
+ static const std::string MY_FROM_ANGLE_ID("from_angle");
+ static const std::string MY_TO_OBJECT_ID("to_object");
+ static const std::string MY_TO_OFFSET_ID("to_offset");
+ static const std::string MY_FROM_OBJECT_ID("from_object");
+ static const std::string MY_FROM_OFFSET_ID("from_offset");
+ static const std::string MY_BOOLEAN_OBJECTS_ID("boolean_objects");
- data()->addAttribute(SKETCH_OBJECT_ID(), ModelAPI_AttributeReference::typeId());
- data()->addAttribute(AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(TO_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(FROM_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(TO_OFFSET_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FROM_OFFSET_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(BOOLEAN_OBJECTS_ID(), ModelAPI_AttributeSelectionList::typeId());
+ data()->addAttribute(SKETCH_OBJECT_ID(), ModelAPI_AttributeReference::typeId());
+ data()->addAttribute(AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(TO_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(FROM_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(TO_OFFSET_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(FROM_OFFSET_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(BOOLEAN_OBJECTS_ID(), ModelAPI_AttributeSelectionList::typeId());
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- TestRotation.py
- Unit test of FeaturesPlugin_Rotation class
+TestRotation.py
+Unit test of FeaturesPlugin_Rotation class
- class FeaturesPlugin_Movement : public ModelAPI_Feature
- static const std::string MY_ROTATION_ID("Rotation");
- static const std::string MY_OBJECTS_LIST_ID("main_objects");
- static const std::string MY_AXIS_OBJECT_ID("axis_object");
- static const std::string MY_ANGLE_ID("angle");
+class FeaturesPlugin_Movement : public ModelAPI_Feature
+ static const std::string MY_ROTATION_ID("Rotation");
+ static const std::string MY_OBJECTS_LIST_ID("main_objects");
+ static const std::string MY_AXIS_OBJECT_ID("axis_object");
+ static const std::string MY_ANGLE_ID("angle");
- data()->addAttribute(OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
- data()->addAttribute(AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
+ data()->addAttribute(AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- TestExtrusion.py
- Unit test of FeaturesPlugin_Boolean class: many Boolean operations performance
-
- class FeaturesPlugin_Extrusion : public ModelAPI_Feature
- static const std::string MY_EXTRUSION_ID("Extrusion");
- static const std::string MY_FACE_ID("base");
- static const std::string MY_SIZE_ID("size");
- static const std::string MY_REVERSE_ID("reverse");
-
- data()->addAttribute(FeaturesPlugin_Extrusion::FACE_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FeaturesPlugin_Extrusion::SIZE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(FeaturesPlugin_Extrusion::REVERSE_ID(), ModelAPI_AttributeBoolean::typeId());
+TestExtrusion.py
+Unit test of FeaturesPlugin_Boolean class: many Boolean operations performance
+
+class FeaturesPlugin_Extrusion : public ModelAPI_Feature
+ static const std::string MY_EXTRUSION_ID("Extrusion");
+ static const std::string MY_FACE_ID("base");
+ static const std::string MY_SIZE_ID("size");
+ static const std::string MY_REVERSE_ID("reverse");
+
+ data()->addAttribute(FeaturesPlugin_Extrusion::FACE_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(FeaturesPlugin_Extrusion::SIZE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(FeaturesPlugin_Extrusion::REVERSE_ID(), ModelAPI_AttributeBoolean::typeId());
"""
# Number rows and columns of cylinders that cuts the big box. Number of Boolena operations is N*N
#
"""
- TestMovement.py
- Unit test of FeaturesPlugin_Movement class
+TestMovement.py
+Unit test of FeaturesPlugin_Movement class
- class FeaturesPlugin_Movement : public ModelAPI_Feature
- static const std::string MY_MOVEMENT_ID("Translation");
- static const std::string MY_OBJECTS_LIST_ID("main_objects");
- static const std::string MY_AXIS_OBJECT_ID("axis_object");
- static const std::string MY_DISTANCE_ID("distance");
+class FeaturesPlugin_Movement : public ModelAPI_Feature
+ static const std::string MY_MOVEMENT_ID("Translation");
+ static const std::string MY_OBJECTS_LIST_ID("main_objects");
+ static const std::string MY_AXIS_OBJECT_ID("axis_object");
+ static const std::string MY_DISTANCE_ID("distance");
- data()->addAttribute(OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
- data()->addAttribute(AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(DISTANCE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
+ data()->addAttribute(AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(DISTANCE_ID(), ModelAPI_AttributeDouble::typeId());
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- Test2675.py
- Test case for issue #2675 "Selection of cone produces crash in the inspection panel"
+Test2675.py
+Test case for issue #2675 "Selection of cone produces crash in the inspection panel"
"""
from salome.shaper import model
}
aMIP1.Add(aIP1);
} // for (; aIt.More(); aIt.Next()) {
- } // for(; aIt1.More(); aIt1.Next()) {
+ } // for(; aIt1.More(); aIt1.Next()) {
//
aNbIP1 = aMIP1.Extent();
if (!aNbIP1) {
#
"""
- Test1064.py
- Unit test for testing the Part sub-shapes naming, described in the issue 1064
+Test1064.py
+Unit test for testing the Part sub-shapes naming, described in the issue 1064
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- Test1512.py
- Unit test for testing the correct selection of feature by the faces after the BOPs applied
+Test1512.py
+Unit test for testing the correct selection of feature by the faces after the BOPs applied
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- Test1757.py
- Unit test for testing the modification of base object after movement of the history line:
- the referenced (that is disabled, after the current position of the history line) attribute
- must be updated.
- The test is created by modification of the dumped script.
+Test1757.py
+Unit test for testing the modification of base object after movement of the history line:
+the referenced (that is disabled, after the current position of the history line) attribute
+must be updated.
+The test is created by modification of the dumped script.
"""
#
"""
- Test2873.py
- Test for issue #2873 "Freeze when inserting a new folder"
+Test2873.py
+Test for issue #2873 "Freeze when inserting a new folder"
"""
from salome.shaper import model
#
"""
- TestDocument.py
- Unit test for Model_Document/ModelAPI_Document class
+TestDocument.py
+Unit test for Model_Document/ModelAPI_Document class
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- Test checks adding sketch into a folder
+Test checks adding sketch into a folder
"""
from ModelAPI import FeatureList, ModelAPI_Session
#
"""
- Test1064.py
- Unit test for testing the Part sub-shapes naming, described in the issue 1064
+Test1064.py
+Unit test for testing the Part sub-shapes naming, described in the issue 1064
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- TestResults.py
- Cover specific working with the data model results
+TestResults.py
+Cover specific working with the data model results
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- TestPoint2D.py
- Unit test for testing the Point2D algorithms
+TestPoint2D.py
+Unit test for testing the Point2D algorithms
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
AttributeStringArrayPtr anAttr =
std::dynamic_pointer_cast<ModelAPI_AttributeStringArray>(theAttr);
for (int a = 0; a < anAttr->size(); a++)
- aResult << "'" << anAttr->value(a) << "'"
- << " ";
+ aResult << "'" << anAttr->value(a) << "'" << " ";
} else if (aType == ModelAPI_AttributeTables::typeId()) {
AttributeTablesPtr anAttr =
std::dynamic_pointer_cast<ModelAPI_AttributeTables>(theAttr);
/// widgets \param theWidget a property contol widget \param isToConnect a
/// boolean value whether connect or disconnect
virtual void connectToPropertyPanel(ModuleBase_ModelWidget * /*theWidget*/,
- const bool /*isToConnect*/){};
+ const bool /*isToConnect*/) {};
/// Validates the operation to change the "Apply" button state.
/// \param thePreviousState the previous state of the widget
- virtual void widgetStateChanged(int /*thePreviousState*/){};
+ virtual void widgetStateChanged(int /*thePreviousState*/) {};
/// Returns true if the event is processed.
/// \param thePreviousAttributeID an index of the previous active attribute
/// Performs some GUI actions before an operation transaction is stopped
/// Default realization is empty
- virtual void
- beforeOperationStopped(ModuleBase_Operation * /*theOperation*/){};
+ virtual void beforeOperationStopped(ModuleBase_Operation * /*theOperation*/) {
+ };
/// Finds a shape by attribute if it is possible
/// \param theAttribute an attribute
/// Returns values which should be highlighted when the whidget is active
/// \param theValues a list of presentations
- virtual void getHighlighted(
- QList<std::shared_ptr<ModuleBase_ViewerPrs>> & /*theValues*/){};
+ virtual void
+ getHighlighted(QList<std::shared_ptr<ModuleBase_ViewerPrs>> & /*theValues*/) {
+ };
/// Checks if the selection presentation is valid in widget
/// \param theValue a selected presentation in the view
virtual bool resetCustom() { return false; };
/// The method called when widget is activated
- virtual void activateCustom(){};
+ virtual void activateCustom() {};
//// Returns true if the event is processed. The default implementation is
/// empty, returns false.
/// Virtual method called when operation committed (see commit() method for
/// more description)
- virtual void commitOperation(){};
+ virtual void commitOperation() {};
/// Virtual method called after operation committed (see commit() method for
/// more description)
/// Update focus after the attribute value change
// NDS: has body is temporary
- virtual void updateFocus(){};
+ virtual void updateFocus() {};
/// Retunrs a list of possible shape types
/// \return a list of shapes
/// Computes and updates name of selected object in the widget
// NDS: has body is temporary
- virtual void updateSelectionName(){};
+ virtual void updateSelectionName() {};
/// The methiod called when widget is activated
void activateCustom() override;
#
"""
- Test1806.py
- Unit test for testing the expression evaluation even no parameters are created
+Test1806.py
+Unit test for testing the expression evaluation even no parameters are created
"""
+
# =========================================================================
# Initialization of the test
# =========================================================================
#
"""
- TestParameterCreation.py
+TestParameterCreation.py
- class ParametersPlugin_Parameter
- static const std::string MY_PARAMETER_ID("Parameter");
- static const std::string MY_VARIABLE_ID("variable");
- static const std::string MY_EXPRESSION_ID("expression");
+class ParametersPlugin_Parameter
+static const std::string MY_PARAMETER_ID("Parameter");
+static const std::string MY_VARIABLE_ID("variable");
+static const std::string MY_EXPRESSION_ID("expression");
- data()->addAttribute(ParametersPlugin_Parameter::VARIABLE_ID(),
- ModelAPI_AttributeString::typeId());
- data()->addAttribute(ParametersPlugin_Parameter::EXPRESSION_ID(),
- ModelAPI_AttributeString::typeId());
+data()->addAttribute(ParametersPlugin_Parameter::VARIABLE_ID(),
+ ModelAPI_AttributeString::typeId());
+data()->addAttribute(ParametersPlugin_Parameter::EXPRESSION_ID(),
+ ModelAPI_AttributeString::typeId());
- class ModelAPI_ResultParameter
- static const std::string MY_VALUE_ID("Value");
- static const std::string MY_VALUE_ID("State");
+class ModelAPI_ResultParameter
+static const std::string MY_VALUE_ID("Value");
+static const std::string MY_VALUE_ID("State");
"""
# =========================================================================
#
"""
- TestParameterCreation.py
+TestParameterCreation.py
- class ParametersPlugin_Parameter
- static const std::string MY_PARAMETER_ID("Parameter");
- static const std::string MY_VARIABLE_ID("variable");
- static const std::string MY_EXPRESSION_ID("expression");
+class ParametersPlugin_Parameter
+static const std::string MY_PARAMETER_ID("Parameter");
+static const std::string MY_VARIABLE_ID("variable");
+static const std::string MY_EXPRESSION_ID("expression");
- data()->addAttribute(ParametersPlugin_Parameter::VARIABLE_ID(),
- ModelAPI_AttributeString::typeId());
- data()->addAttribute(ParametersPlugin_Parameter::EXPRESSION_ID(),
- ModelAPI_AttributeString::typeId());
+data()->addAttribute(ParametersPlugin_Parameter::VARIABLE_ID(),
+ ModelAPI_AttributeString::typeId());
+data()->addAttribute(ParametersPlugin_Parameter::EXPRESSION_ID(),
+ ModelAPI_AttributeString::typeId());
- class ModelAPI_ResultParameter
- static const std::string MY_VALUE_ID("Value");
- static const std::string MY_VALUE_ID("State");
+class ModelAPI_ResultParameter
+static const std::string MY_VALUE_ID("Value");
+static const std::string MY_VALUE_ID("State");
"""
# =========================================================================
#
"""
- TestParameterCreation.py
+TestParameterCreation.py
- class ParametersPlugin_Parameter
- static const std::string MY_PARAMETER_ID("Parameter");
- static const std::string MY_VARIABLE_ID("variable");
- static const std::string MY_EXPRESSION_ID("expression");
+class ParametersPlugin_Parameter
+static const std::string MY_PARAMETER_ID("Parameter");
+static const std::string MY_VARIABLE_ID("variable");
+static const std::string MY_EXPRESSION_ID("expression");
- data()->addAttribute(ParametersPlugin_Parameter::VARIABLE_ID(),
- ModelAPI_AttributeString::typeId());
- data()->addAttribute(ParametersPlugin_Parameter::EXPRESSION_ID(),
- ModelAPI_AttributeString::typeId());
+data()->addAttribute(ParametersPlugin_Parameter::VARIABLE_ID(),
+ ModelAPI_AttributeString::typeId());
+data()->addAttribute(ParametersPlugin_Parameter::EXPRESSION_ID(),
+ ModelAPI_AttributeString::typeId());
- class ModelAPI_ResultParameter
- static const std::string MY_VALUE_ID("Value");
- static const std::string MY_VALUE_ID("State");
+class ModelAPI_ResultParameter
+static const std::string MY_VALUE_ID("Value");
+static const std::string MY_VALUE_ID("State");
"""
# =========================================================================
#
"""
- TestParametersMgr.py
+TestParametersMgr.py
- class ParametersPlugin_ParametersMgr
+class ParametersPlugin_ParametersMgr
"""
# =========================================================================
/// Constructor
/// \param theWorkshop instance of workshop interface
Standard_EXPORT PartSet_CirclePointFilter(ModuleBase_IWorkshop *theWorkshop)
- : SelectMgr_Filter(), myWorkshop(theWorkshop){};
+ : SelectMgr_Filter(), myWorkshop(theWorkshop) {};
/// Returns True if the given owner is acceptable for selection
/// \param theOwner the selected owner
QString aId = aOp->id();
// Acceptable features;
QStringList aList;
- aList << "SketchLine"
- << "SketchMacroCircle"
- << "SketchMacroArc"
- << "SketchMacroEllipse"
- << "SketchMacroEllipticArc"
+ aList << "SketchLine" << "SketchMacroCircle" << "SketchMacroArc"
+ << "SketchMacroEllipse" << "SketchMacroEllipticArc"
<< "SketchMacroRectangle";
return aList.contains(aId);
}
/// This control accepts focus
bool focusTo() override;
- void setHighlighted(bool) override{/*do nothing*/};
+ void setHighlighted(bool) override { /*do nothing*/ };
void enableFocusProcessing() override;
/// Set current state of show free points
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""This package defines the Direct Geometry API of the Modeler.
-"""
+"""This package defines the Direct Geometry API of the Modeler."""
# Swigged interfaces to Modeling Data
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import pkgutil, inspect
+import pkgutil
+import inspect
__all__ = []
for loader, module_name, is_pkg in pkgutil.walk_packages(__path__):
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for Collection plugin for the Parametric Geometry API of the Modeler.
-"""
+"""Package for Collection plugin for the Parametric Geometry API of the Modeler."""
from CollectionAPI import addGroup, addField
from CollectionAPI import (
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for Connection plugin for the Parametric Geometry API of the Modeler.
-"""
+"""Package for Connection plugin for the Parametric Geometry API of the Modeler."""
from ConnectorAPI import exportToGEOM
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for Construction plugin for the Parametric Geometry API of the Modeler.
-"""
+"""Package for Construction plugin for the Parametric Geometry API of the Modeler."""
from ConstructionAPI import addAxis, addPlane, addPoint, addPointXYZ
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for dumping purposes.
-"""
+"""Package for dumping purposes."""
import ModelHighAPI
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for dumping purposes.
-"""
+"""Package for dumping purposes."""
from .DumpAssistant import *
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for Exchange plugin for the Parametric Geometry API of the Modeler.
-"""
+"""Package for Exchange plugin for the Parametric Geometry API of the Modeler."""
from ExchangeAPI import addImport, addImportXAOMem, addImportSTEP
from ExchangeAPI import exportToFile, exportToXAO, exportToXAOMem, exportToSTL
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for Features plugin for the Parametric Geometry API of the Modeler.
-"""
+"""Package for Features plugin for the Parametric Geometry API of the Modeler."""
from FeaturesAPI import addPlacement, addRotation, addScale, addSymmetry, addTranslation
from FeaturesAPI import addMultiTranslation, addMultiRotation
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for Filters plugin for the Parametric Geometry API of the Modeler.
-"""
+"""Package for Filters plugin for the Parametric Geometry API of the Modeler."""
from FiltersAPI import filters, addFilter
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for GDML plugin for the Parametric Geometry API of the Modeler.
-"""
+"""Package for GDML plugin for the Parametric Geometry API of the Modeler."""
from GDMLAPI import addConeSegment, addEllipsoid
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for Parameter plugin for the Parametric Geometry API of the Modeler.
-"""
+"""Package for Parameter plugin for the Parametric Geometry API of the Modeler."""
from ParametersAPI import addParameter, removeParameter
#
from salome.shaper import model
-import codecs, sys
+import codecs
+import sys
def changeTab(theLine):
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for PartSet plugin for the Parametric Geometry API of the Modeler.
-"""
+"""Package for PartSet plugin for the Parametric Geometry API of the Modeler."""
from PartSetAPI import addPart, duplicatePart, removePart
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for Primitives plugin for the Parametric Geometry API of the Modeler.
-"""
+"""Package for Primitives plugin for the Parametric Geometry API of the Modeler."""
from PrimitivesAPI import addBox, addCone, addCylinder, addSphere, addTorus, addTube
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for services for the Parametric Geometry API of the Modeler.
-"""
+"""Package for services for the Parametric Geometry API of the Modeler."""
from ModelHighAPI import moduleDocument, activeDocument
from ModelHighAPI import defaultPlane, standardPlane
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Package for Sketch plugin for the Parametric Geometry API of the Modeler.
-"""
+"""Package for Sketch plugin for the Parametric Geometry API of the Modeler."""
from SketchAPI import addSketch, copySketch
from .tools import *
Author: Gérald NICOLAS
"""
+
__revision__ = "V02.04"
import os
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-"""Géométrie de test pour la création de surfaces médianes - Cas n°1
-"""
+"""Géométrie de test pour la création de surfaces médianes - Cas n°1"""
__revision__ = "V02.01"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-"""Géométrie de test pour la création de surfaces médianes - Cas n°2
-"""
+"""Géométrie de test pour la création de surfaces médianes - Cas n°2"""
__revision__ = "V02.01"
class SurfaceMediane(object):
-
"""Calcul des surfaces médianes de solides minces
L'objectif de ce programme est de créer les surfaces médianes, encore appelées fibres neutres, pour \
// update SHAPERSTUDY objects in OCC and VTK viewers
QStringList aVMList;
- aVMList << "OCCViewer"
- << "VTKViewer";
+ aVMList << "OCCViewer" << "VTKViewer";
getApp()->updatePresentations("SHAPERSTUDY", aVMList);
}
}
const std::string &aSketchName = theDumper.parentName(aBase);
theDumper.name(aBase, false, true, true); // mark constraint as dumped
- theDumper << aSketchName << "."
- << "setAngle(";
+ theDumper << aSketchName << "." << "setAngle(";
bool isFirstAttr = true;
for (int i = 0; i < CONSTRAINT_ATTR_SIZE; ++i) {
SketchPlugin_SketchEntity();
/// \brief Initializes attributes of derived class.
- virtual void initDerivedClassAttributes(){};
+ virtual void initDerivedClassAttributes() {};
/// \brief Initializes attributes of derived class which were added recently.
- virtual void initDerivedClassAttributes2(){};
+ virtual void initDerivedClassAttributes2() {};
};
#endif
}
std::shared_ptr<GeomDataAPI_Point2D> aPointAttr =
std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aBaseAttr);
- std::cout << aPointAttr->id().c_str() << ": "
- << "[" << aRefAttributes.size() << "] " << aRefsInfo << std::endl;
+ std::cout << aPointAttr->id().c_str() << ": " << "["
+ << aRefAttributes.size() << "] " << aRefsInfo << std::endl;
}
std::cout << std::endl;
std::cout << std::endl
aRefAttr->setAttr(theSecondAttribute);
#if defined(DEBUG_TRIM) || defined(DEBUG_SPLIT)
- std::cout << "<createConstraint to attribute> :"
- << " first attribute - " << theFirstAttribute->id()
- << " second attribute - " << theSecondAttribute->id() << std::endl;
+ std::cout << "<createConstraint to attribute> :" << " first attribute - "
+ << theFirstAttribute->id() << " second attribute - "
+ << theSecondAttribute->id() << std::endl;
#endif
return aConstraint;
aRefAttr->setObject(theSecondObject);
#if defined(DEBUG_TRIM) || defined(DEBUG_SPLIT)
- std::cout << "<createConstraint to attribute> :"
- << " first attribute - " << theFirstAttribute->id()
- << " second object - "
+ std::cout << "<createConstraint to attribute> :" << " first attribute - "
+ << theFirstAttribute->id() << " second object - "
<< ModelAPI_Feature::feature(theSecondObject)->getKind()
<< std::endl;
#endif
aRefAttr->setObject(theSecondObject);
#if defined(DEBUG_TRIM) || defined(DEBUG_SPLIT)
- std::cout << "<createConstraint to attribute> :"
- << " first object - "
+ std::cout << "<createConstraint to attribute> :" << " first object - "
<< ModelAPI_Feature::feature(theFirstObject)->getKind()
<< " second object - "
<< ModelAPI_Feature::feature(theSecondObject)->getKind()
}
std::shared_ptr<GeomDataAPI_Point2D> aPointAttr =
std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aBaseAttr);
- std::cout << aPointAttr->id().c_str() << ": "
- << "[" << aRefAttributes.size() << "] " << aRefsInfo << std::endl;
+ std::cout << aPointAttr->id().c_str() << ": " << "["
+ << aRefAttributes.size() << "] " << aRefsInfo << std::endl;
}
std::cout << std::endl;
std::cout << std::endl
#
"""
- Test1061.py
- Test case for issue #1061 "Distance constraint using for points with equal coordinates"
+Test1061.py
+Test case for issue #1061 "Distance constraint using for points with equal coordinates"
"""
from salome.shaper import model
#
"""
- Test1577.py
- Test case for issue #1577 "distance constraint change sign"
+Test1577.py
+Test case for issue #1577 "distance constraint change sign"
"""
from salome.shaper import model
#
"""
- Test1578.py
- Test case for issue #1578 "arc problems"
+Test1578.py
+Test case for issue #1578 "arc problems"
"""
from salome.shaper import model
#
"""
- Test1673.py
- Test case for issue #1673 "Drag and drop the extremity of an arc is too slow"
+Test1673.py
+Test case for issue #1673 "Drag and drop the extremity of an arc is too slow"
"""
from salome.shaper import model
#
"""
- Test1779.py
- Test case for issue #1779 "Wrong ExtrusionCut result after loading dump"
+Test1779.py
+Test case for issue #1779 "Wrong ExtrusionCut result after loading dump"
"""
from salome.shaper import model
#
"""
- Test1924.py
- Test case for issue #1924 "Wrong naming of multiple-rotated sketch edges on python dump"
+Test1924.py
+Test case for issue #1924 "Wrong naming of multiple-rotated sketch edges on python dump"
"""
from salome.shaper import model
#
"""
- Test1963.py
- Test case for issue #1963 "Conflicting constraint wrongly raised"
+Test1963.py
+Test case for issue #1963 "Conflicting constraint wrongly raised"
"""
from salome.shaper import model
#
"""
- Test1966.py
- Test case for issue #1966 "Sketch solving is 25 times slower between two studies with middle point"
+Test1966.py
+Test case for issue #1966 "Sketch solving is 25 times slower between two studies with middle point"
"""
from salome.shaper import model
#
"""
- Test1967.py
- Test case for issue #1967 "Drag and drop a point with middle point constraint is too slow"
+Test1967.py
+Test case for issue #1967 "Drag and drop a point with middle point constraint is too slow"
"""
from salome.shaper import model
#
"""
- Test2018.py
- Test case for issue #2018 "After split auxiliary circle edit of axiliary state of arc is wrong"
+Test2018.py
+Test case for issue #2018 "After split auxiliary circle edit of axiliary state of arc is wrong"
"""
from ModelAPI import FeatureSet, removeFeaturesAndReferences
#
"""
- Test2034_1.py
- Test case for issue #2034 "Conflicting constraint not raised (but found by planegcs and shaper's dof computation)"
+Test2034_1.py
+Test case for issue #2034 "Conflicting constraint not raised (but found by planegcs and shaper's dof computation)"
"""
from SketchAPI import SketchAPI_Line
#
"""
- Test2034_2.py
- Test case for issue #2034 "Conflicting constraint not raised (but found by planegcs and shaper's dof computation)"
+Test2034_2.py
+Test case for issue #2034 "Conflicting constraint not raised (but found by planegcs and shaper's dof computation)"
"""
from salome.shaper import model
#
"""
- Test2034_3.py
- Test case for issue #2034 "Conflicting constraint not raised (but found by planegcs and shaper's dof computation)"
+Test2034_3.py
+Test case for issue #2034 "Conflicting constraint not raised (but found by planegcs and shaper's dof computation)"
"""
from SketchAPI import SketchAPI_Point
#
"""
- Test1061.py
- Test case for issue #1061 "Distance constraint using for points with equal coordinates"
+Test1061.py
+Test case for issue #1061 "Distance constraint using for points with equal coordinates"
"""
from salome.shaper import model
#
"""
- Test2119.py
- Test case for issue #2119 "Sketch lost when creating a tangent constraint"
+Test2119.py
+Test case for issue #2119 "Sketch lost when creating a tangent constraint"
"""
from salome.shaper import model
#
"""
- Test2134.py
- Test case for issue #2134 "Conflicting constraint not shown in the viewer"
+Test2134.py
+Test case for issue #2134 "Conflicting constraint not shown in the viewer"
"""
from salome.shaper import model
#
"""
- Test2224.py
- Test case for issue #2224 "tangent arc problem when end point is on edge that is tangent to arc"
+Test2224.py
+Test case for issue #2224 "tangent arc problem when end point is on edge that is tangent to arc"
"""
from salome.shaper import model
#
"""
- Test2239.py
- Test case for issue #2239 "Sketch not updated after having changed the parameter of multi-translation to 1"
+Test2239.py
+Test case for issue #2239 "Sketch not updated after having changed the parameter of multi-translation to 1"
"""
from salome.shaper import model
#
"""
- Test2273.py
- Test case for issue #2273 "Error when reading HDF and Python dump"
- (multi-rotation center refers to a feature produced by itself)
+Test2273.py
+Test case for issue #2273 "Error when reading HDF and Python dump"
+ (multi-rotation center refers to a feature produced by itself)
"""
from salome.shaper import model
#
"""
- Test2280.py
- Test case for issue #2280 "Trim in the sketch generates a SIGSEGV"
+Test2280.py
+Test case for issue #2280 "Trim in the sketch generates a SIGSEGV"
"""
from salome.shaper import model
#
"""
- Test2341.py
- Test case for issue #2341 "SIGSEGV when trying to move a point of a projected axis"
+Test2341.py
+Test case for issue #2341 "SIGSEGV when trying to move a point of a projected axis"
"""
from SketchAPI import SketchAPI_Line, SketchAPI_Point
#
"""
- Test2376.py
- Test case for issue #2376 "Wrong DoF when creating the sketch"
+Test2376.py
+Test case for issue #2376 "Wrong DoF when creating the sketch"
"""
-
from salome.shaper import model
model.begin()
#
"""
- Test2390.py
- Test case for issue #2390 "Revolution become invalid after changing parameter"
+Test2390.py
+Test case for issue #2390 "Revolution become invalid after changing parameter"
"""
-
from SketchAPI import SketchAPI_Point
from salome.shaper import model
#
"""
- Test2393.py
- Test case for issue #2393 "Constraint conflict when doing an angular copy of a projected edge"
+Test2393.py
+Test case for issue #2393 "Constraint conflict when doing an angular copy of a projected edge"
"""
-
from SketchAPI import SketchAPI_Line, SketchAPI_Point
from salome.shaper import model
#
"""
- Test2425.py
- Test case for issue #2425 "undo edit parameter - destroy document"
+Test2425.py
+Test case for issue #2425 "undo edit parameter - destroy document"
"""
-
from salome.shaper import model
model.begin()
#
"""
- Test2427.py
- Test case for issue #2427 "error in sketch solver"
+Test2427.py
+Test case for issue #2427 "error in sketch solver"
"""
from SketchAPI import SketchAPI_Line
#
"""
- Test2440.py
- Test case for issue #2440 "Can't validate coincidence between a line and an imported line"
+Test2440.py
+Test case for issue #2440 "Can't validate coincidence between a line and an imported line"
"""
-
from SketchAPI import SketchAPI_Point
from salome.shaper import model
#
"""
- Test2481.py
- Test case for issue #2481 "Application error when create fillet"
+Test2481.py
+Test case for issue #2481 "Application error when create fillet"
"""
from SketchAPI import SketchAPI_Point
#
"""
- Test2654.py
- Test case for issue #2654 "crash with a split"
+Test2654.py
+Test case for issue #2654 "crash with a split"
"""
from SketchAPI import SketchAPI_Point
#
"""
- Test2711.py
- Test case for issue #2711 "Crash when calling split"
+Test2711.py
+Test case for issue #2711 "Crash when calling split"
"""
from salome.shaper import model
#
"""
- Test2741.py
- Test case for issue #2741 "Undo of distance argument change produces crash"
+Test2741.py
+Test case for issue #2741 "Undo of distance argument change produces crash"
"""
from salome.shaper import model
#
"""
- Test2810.py
- Test case for issue #2810 "crash creating arc fillet"
+Test2810.py
+Test case for issue #2810 "crash creating arc fillet"
"""
from salome.shaper import model
#
"""
- Test2824.py
- Test case for issue #2824 "Constraints at wrong positions when editing the sketch (BARCOM)"
+Test2824.py
+Test case for issue #2824 "Constraints at wrong positions when editing the sketch (BARCOM)"
"""
from salome.shaper import model
#
"""
- Test2860.py
- Test case for issue #2650 "setAngleComplementary becomes setAngle in BARCOM"
- Test case for issue #2860 "Error in python dump reload because of setAngleComplementary"
+Test2860.py
+Test case for issue #2650 "setAngleComplementary becomes setAngle in BARCOM"
+Test case for issue #2860 "Error in python dump reload because of setAngleComplementary"
"""
from salome.shaper import model
#
"""
- Test2894.py
- Test case for issue #2894 "SIGSEGV in trim after double-click"
+Test2894.py
+Test case for issue #2894 "SIGSEGV in trim after double-click"
"""
from SketchAPI import GeomAPI, SketchAPI_Point
#
"""
- Test3019.py
- Test case for issue #3019 "Error when load python script"
+Test3019.py
+Test case for issue #3019 "Error when load python script"
"""
from salome.shaper import model
#
"""
- TestArcBehavior.py
+TestArcBehavior.py
- It tests behavior of the arc during the changing of parameters to avoid
- regressions in this complicated part.
+It tests behavior of the arc during the changing of parameters to avoid
+regressions in this complicated part.
"""
#
"""
- Test for adding a pole to already created B-spline curve
+Test for adding a pole to already created B-spline curve
"""
from salome.shaper import model
#
"""
- TestConstraintAngle.py
- Unit test of SketchPlugin_ConstraintAngle class
+TestConstraintAngle.py
+Unit test of SketchPlugin_ConstraintAngle class
- SketchPlugin_ConstraintAngle
- static const std::string MY_CONSTRAINT_ANGLE_ID("SketchConstraintAngle");
- data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+SketchPlugin_ConstraintAngle
+ static const std::string MY_CONSTRAINT_ANGLE_ID("SketchConstraintAngle");
+ data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
import math
#
"""
- Test constraint "Angle" applied for ellipse's axes
+Test constraint "Angle" applied for ellipse's axes
"""
import unittest
#
"""
- TestConstraintCoincidence.py
- Unit test of SketchPlugin_ConstraintCoincidence class
+TestConstraintCoincidence.py
+Unit test of SketchPlugin_ConstraintCoincidence class
- SketchPlugin_Constraint
- static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
- static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
- static const std::string MY_ENTITY_A("ConstraintEntityA");
- static const std::string MY_ENTITY_B("ConstraintEntityB");
- static const std::string MY_ENTITY_C("ConstraintEntityC");
- static const std::string MY_ENTITY_D("ConstraintEntityD");
+SketchPlugin_Constraint
+ static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
+ static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
+ static const std::string MY_ENTITY_A("ConstraintEntityA");
+ static const std::string MY_ENTITY_B("ConstraintEntityB");
+ static const std::string MY_ENTITY_C("ConstraintEntityC");
+ static const std::string MY_ENTITY_D("ConstraintEntityD");
- SketchPlugin_ConstraintCoincidence
- static const std::string MY_CONSTRAINT_COINCIDENCE_ID("SketchConstraintCoincidence");
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintCoincidence
+ static const std::string MY_CONSTRAINT_COINCIDENCE_ID("SketchConstraintCoincidence");
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
import math
#
"""
- Test constraint coincidence applied for B-spline curve and its sub-results
+Test constraint coincidence applied for B-spline curve and its sub-results
"""
import unittest
#
"""
- Test constraint coincidence applied for ellipse and its sub-results
+Test constraint coincidence applied for ellipse and its sub-results
"""
import unittest
#
"""
- Test constraint coincidence applied for elliptic arc and its sub-results
+Test constraint coincidence applied for elliptic arc and its sub-results
"""
import unittest
#
"""
- TestConstraintCollinear.py
- Unit test of SketchPlugin_ConstraintCollinear class
+TestConstraintCollinear.py
+Unit test of SketchPlugin_ConstraintCollinear class
- SketchPlugin_ConstraintCollinear
- static const std::string MY_CONSTRAINT_COLLINEAR_ID("SketchConstraintCollinear");
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintCollinear
+ static const std::string MY_CONSTRAINT_COLLINEAR_ID("SketchConstraintCollinear");
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
"""
#
"""
- Test constraint "Collinear" applied for ellipse's axes
+Test constraint "Collinear" applied for ellipse's axes
"""
import unittest
#
"""
- TestConstraintDistance.py
- Unit test of SketchPlugin_ConstraintDistance class
+TestConstraintDistance.py
+Unit test of SketchPlugin_ConstraintDistance class
- SketchPlugin_Constraint
- static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
- static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
- static const std::string MY_ENTITY_A("ConstraintEntityA");
- static const std::string MY_ENTITY_B("ConstraintEntityB");
- static const std::string MY_ENTITY_C("ConstraintEntityC");
- static const std::string MY_ENTITY_D("ConstraintEntityD");
+SketchPlugin_Constraint
+ static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
+ static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
+ static const std::string MY_ENTITY_A("ConstraintEntityA");
+ static const std::string MY_ENTITY_B("ConstraintEntityB");
+ static const std::string MY_ENTITY_C("ConstraintEntityC");
+ static const std::string MY_ENTITY_D("ConstraintEntityD");
- SketchPlugin_ConstraintDistance
- static const std::string MY_CONSTRAINT_DISTANCE_ID("SketchConstraintDistance");
- data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintDistance
+ static const std::string MY_CONSTRAINT_DISTANCE_ID("SketchConstraintDistance");
+ data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
import math
#
"""
- Test constraint "Distance" applied sub-elements of an ellipse
+Test constraint "Distance" applied sub-elements of an ellipse
"""
import unittest
#
"""
- TestConstraintDistanceHorizontal.py
- Unit test of SketchPlugin_ConstraintDistanceHorizontal class
+TestConstraintDistanceHorizontal.py
+Unit test of SketchPlugin_ConstraintDistanceHorizontal class
- SketchPlugin_ConstraintDistanceHorizontal
- static const std::string MY_CONSTRAINT_DISTANCE_ID("SketchConstraintDistance");
- data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintDistanceHorizontal
+ static const std::string MY_CONSTRAINT_DISTANCE_ID("SketchConstraintDistance");
+ data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
"""
from GeomDataAPI import *
#
"""
- Test the zero value of the constraint "DistanceHorizontal"
+Test the zero value of the constraint "DistanceHorizontal"
"""
import unittest
#
"""
- TestConstraintDistanceVertical.py
- Unit test of SketchPlugin_ConstraintDistanceVertical class
+TestConstraintDistanceVertical.py
+Unit test of SketchPlugin_ConstraintDistanceVertical class
- SketchPlugin_ConstraintDistanceVertical
- static const std::string MY_CONSTRAINT_DISTANCE_ID("SketchConstraintDistance");
- data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintDistanceVertical
+ static const std::string MY_CONSTRAINT_DISTANCE_ID("SketchConstraintDistance");
+ data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
"""
from GeomDataAPI import *
#
"""
- Test the zero value of the constraint "DistanceVertical"
+Test the zero value of the constraint "DistanceVertical"
"""
import unittest
#
"""
- Test the zero value of the constraint "Distance"
+Test the zero value of the constraint "Distance"
"""
import unittest
#
"""
- TestConstraintEqual.py
- Unit test of SketchPlugin_ConstraintEqual class
+TestConstraintEqual.py
+Unit test of SketchPlugin_ConstraintEqual class
- SketchPlugin_ConstraintEqual
- static const std::string MY_CONSTRAINT_EQAUL_ID("SketchConstraintEqual");
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintEqual
+ static const std::string MY_CONSTRAINT_EQAUL_ID("SketchConstraintEqual");
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
import math
#
"""
- Test constraint "Equal" applied to the pair of ellipses
+Test constraint "Equal" applied to the pair of ellipses
"""
from salome.shaper import model
#
"""
- TestConstraintRigid.py
- Unit test of SketchPlugin_ConstraintRigid class
+TestConstraintRigid.py
+Unit test of SketchPlugin_ConstraintRigid class
- SketchPlugin_Constraint
- static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
- static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
- static const std::string MY_ENTITY_A("ConstraintEntityA");
- static const std::string MY_ENTITY_B("ConstraintEntityB");
- static const std::string MY_ENTITY_C("ConstraintEntityC");
- static const std::string MY_ENTITY_D("ConstraintEntityD");
+SketchPlugin_Constraint
+ static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
+ static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
+ static const std::string MY_ENTITY_A("ConstraintEntityA");
+ static const std::string MY_ENTITY_B("ConstraintEntityB");
+ static const std::string MY_ENTITY_C("ConstraintEntityC");
+ static const std::string MY_ENTITY_D("ConstraintEntityD");
- SketchPlugin_ConstraintRigid
- static const std::string MY_CONSTRAINT_RIGID_ID("SketchConstraintRigid");
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintRigid
+ static const std::string MY_CONSTRAINT_RIGID_ID("SketchConstraintRigid");
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
from GeomAPI import *
#
"""
- TestConstraintHorizontal.py
- Unit test of SketchPlugin_ConstraintHorizontal class
+TestConstraintHorizontal.py
+Unit test of SketchPlugin_ConstraintHorizontal class
- SketchPlugin_ConstraintHorizontal
- static const std::string MY_CONSTRAINT_HORIZONTAL_ID("SketchConstraintHorizontal");
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintHorizontal
+ static const std::string MY_CONSTRAINT_HORIZONTAL_ID("SketchConstraintHorizontal");
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
from salome.shaper import model
#
"""
- TestConstraintHorizontalValidator.py
- It tests validation of horizontal and vertical segments in H and V constraints to avoid
- selection segments that already have one of these constraint"
+TestConstraintHorizontalValidator.py
+It tests validation of horizontal and vertical segments in H and V constraints to avoid
+selection segments that already have one of these constraint"
"""
# =========================================================================
#
"""
- TestConstraintLength.py
- Unit test of SketchPlugin_ConstraintLength class
+TestConstraintLength.py
+Unit test of SketchPlugin_ConstraintLength class
- SketchPlugin_ConstraintLength
- static const std::string MY_CONSTRAINT_LENGTH_ID("SketchConstraintLength");
- data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintLength
+ static const std::string MY_CONSTRAINT_LENGTH_ID("SketchConstraintLength");
+ data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
import math
#
"""
- TestConstraintCoincidence.py
- Unit test of SketchPlugin_ConstraintCoincidence class
+TestConstraintCoincidence.py
+Unit test of SketchPlugin_ConstraintCoincidence class
- SketchPlugin_Constraint
- static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
- static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
- static const std::string MY_ENTITY_A("ConstraintEntityA");
- static const std::string MY_ENTITY_B("ConstraintEntityB");
- static const std::string MY_ENTITY_C("ConstraintEntityC");
- static const std::string MY_ENTITY_D("ConstraintEntityD");
+SketchPlugin_Constraint
+ static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
+ static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
+ static const std::string MY_ENTITY_A("ConstraintEntityA");
+ static const std::string MY_ENTITY_B("ConstraintEntityB");
+ static const std::string MY_ENTITY_C("ConstraintEntityC");
+ static const std::string MY_ENTITY_D("ConstraintEntityD");
- SketchPlugin_ConstraintCoincidence
- static const std::string MY_CONSTRAINT_COINCIDENCE_ID("SketchConstraintCoincidence");
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintCoincidence
+ static const std::string MY_CONSTRAINT_COINCIDENCE_ID("SketchConstraintCoincidence");
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
from SketchAPI import *
#
"""
- Test middle point on an arc
+Test middle point on an arc
"""
import unittest
#
"""
- Test middle point on an elliptic arc
+Test middle point on an elliptic arc
"""
import unittest
#
"""
- TestConstraintParallel.py
- Unit test of SketchPlugin_ConstraintParallel class
+TestConstraintParallel.py
+Unit test of SketchPlugin_ConstraintParallel class
- SketchPlugin_ConstraintParallel
- static const std::string MY_CONSTRAINT_PARALLEL_ID("SketchConstraintParallel");
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+SketchPlugin_ConstraintParallel
+ static const std::string MY_CONSTRAINT_PARALLEL_ID("SketchConstraintParallel");
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
from salome.shaper import model
#
"""
- TestConstraintPerpendicular.py
- Unit test of SketchPlugin_ConstraintPerpendicular class
+TestConstraintPerpendicular.py
+Unit test of SketchPlugin_ConstraintPerpendicular class
- SketchPlugin_Constraint
- static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
- static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
- static const std::string MY_ENTITY_A("ConstraintEntityA");
- static const std::string MY_ENTITY_B("ConstraintEntityB");
- static const std::string MY_ENTITY_C("ConstraintEntityC");
- static const std::string MY_ENTITY_D("ConstraintEntityD");
+SketchPlugin_Constraint
+ static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
+ static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
+ static const std::string MY_ENTITY_A("ConstraintEntityA");
+ static const std::string MY_ENTITY_B("ConstraintEntityB");
+ static const std::string MY_ENTITY_C("ConstraintEntityC");
+ static const std::string MY_ENTITY_D("ConstraintEntityD");
- SketchPlugin_ConstraintPerpendicular
- static const std::string MY_CONSTRAINT_PERPENDICULAR_ID("SketchConstraintPerpendicular");
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+SketchPlugin_ConstraintPerpendicular
+ static const std::string MY_CONSTRAINT_PERPENDICULAR_ID("SketchConstraintPerpendicular");
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
from salome.shaper import model
#
"""
- TestConstraintRadius.py
- Unit test of SketchPlugin_ConstraintRadius class
+TestConstraintRadius.py
+Unit test of SketchPlugin_ConstraintRadius class
- SketchPlugin_Constraint
- static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
- static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
- static const std::string MY_ENTITY_A("ConstraintEntityA");
- static const std::string MY_ENTITY_B("ConstraintEntityB");
- static const std::string MY_ENTITY_C("ConstraintEntityC");
- static const std::string MY_ENTITY_D("ConstraintEntityD");
+SketchPlugin_Constraint
+ static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
+ static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
+ static const std::string MY_ENTITY_A("ConstraintEntityA");
+ static const std::string MY_ENTITY_B("ConstraintEntityB");
+ static const std::string MY_ENTITY_C("ConstraintEntityC");
+ static const std::string MY_ENTITY_D("ConstraintEntityD");
- SketchPlugin_ConstraintRadius
- static const std::string MY_CONSTRAINT_RADIUS_ID("SketchConstraintRadius");
- data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+SketchPlugin_ConstraintRadius
+ static const std::string MY_CONSTRAINT_RADIUS_ID("SketchConstraintRadius");
+ data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
import math
#
"""
- TestConstraintTangent.py
- Unit test of SketchPlugin_ConstraintTangent class
+TestConstraintTangent.py
+Unit test of SketchPlugin_ConstraintTangent class
- SketchPlugin_ConstraintTangent
- static const std::string MY_CONSTRAINT_TANGENT_ID("SketchConstraintTangent");
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintTangent
+ static const std::string MY_CONSTRAINT_TANGENT_ID("SketchConstraintTangent");
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
"""
+
from GeomDataAPI import *
from GeomAPI import *
from ModelAPI import *
#
"""
- Test constraint "Tangent" applied to B-spline and another entity
+Test constraint "Tangent" applied to B-spline and another entity
"""
import unittest
#
"""
- Test constraint "Tangent" applied to ellipse and another entity
+Test constraint "Tangent" applied to ellipse and another entity
"""
import unittest
#
"""
- Test constraint "Tangent" applied to elliptic arc and another entity
+Test constraint "Tangent" applied to elliptic arc and another entity
"""
import unittest
#
"""
- TestConstraintVertical.py
- Unit test of SketchPlugin_ConstraintVertical class
+TestConstraintVertical.py
+Unit test of SketchPlugin_ConstraintVertical class
- SketchPlugin_ConstraintVertical
- static const std::string MY_CONSTRAINT_VERTICAL_ID("SketchConstraintVertical");
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+SketchPlugin_ConstraintVertical
+ static const std::string MY_CONSTRAINT_VERTICAL_ID("SketchConstraintVertical");
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
from salome.shaper import model
#
"""
- TestCreateArc.py
+TestCreateArc.py
- static const std::string MY_SKETCH_ARC_ID("SketchArc");
- static const std::string MY_CENTER_ID = "center_point";
- static const std::string MY_START_ID = "start_point";
- static const std::string MY_END_ID = "end_point";
- data()->addAttribute(SketchPlugin_Arc::CENTER_ID(), GeomDataAPI_Point2D::typeId());
- data()->addAttribute(SketchPlugin_Arc::START_ID(), GeomDataAPI_Point2D::typeId());
- data()->addAttribute(SketchPlugin_Arc::END_ID(), GeomDataAPI_Point2D::typeId());
+static const std::string MY_SKETCH_ARC_ID("SketchArc");
+static const std::string MY_CENTER_ID = "center_point";
+static const std::string MY_START_ID = "start_point";
+static const std::string MY_END_ID = "end_point";
+data()->addAttribute(SketchPlugin_Arc::CENTER_ID(), GeomDataAPI_Point2D::typeId());
+data()->addAttribute(SketchPlugin_Arc::START_ID(), GeomDataAPI_Point2D::typeId());
+data()->addAttribute(SketchPlugin_Arc::END_ID(), GeomDataAPI_Point2D::typeId());
"""
# =========================================================================
#
"""
- TestCreateArc.py
-
- static const std::string MY_SKETCH_ARC_ID("SketchArc");
- static const std::string MY_CENTER_ID = "center_point";
- static const std::string MY_START_ID = "start_point";
- static const std::string MY_END_ID = "end_point";
- data()->addAttribute(SketchPlugin_Arc::CENTER_ID(), GeomDataAPI_Point2D::typeId());
- data()->addAttribute(SketchPlugin_Arc::START_ID(), GeomDataAPI_Point2D::typeId());
- data()->addAttribute(SketchPlugin_Arc::END_ID(), GeomDataAPI_Point2D::typeId());
+TestCreateArc.py
+
+static const std::string MY_SKETCH_ARC_ID("SketchArc");
+static const std::string MY_CENTER_ID = "center_point";
+static const std::string MY_START_ID = "start_point";
+static const std::string MY_END_ID = "end_point";
+data()->addAttribute(SketchPlugin_Arc::CENTER_ID(), GeomDataAPI_Point2D::typeId());
+data()->addAttribute(SketchPlugin_Arc::START_ID(), GeomDataAPI_Point2D::typeId());
+data()->addAttribute(SketchPlugin_Arc::END_ID(), GeomDataAPI_Point2D::typeId());
"""
# =========================================================================
#
"""
- TestCreateArcByThreePoints.py
+TestCreateArcByThreePoints.py
- Test creation methods of arc built by three points
+Test creation methods of arc built by three points
"""
# =========================================================================
#
"""
- TestCreateArcChangeType.py
+TestCreateArcChangeType.py
- Test attributes reset when changing creation method of an arc on-the-fly
+Test attributes reset when changing creation method of an arc on-the-fly
"""
# =========================================================================
#
"""
- Test creation of B-spline curve
+Test creation of B-spline curve
"""
import unittest
#
"""
- Test creation of periodic B-spline curve
+Test creation of periodic B-spline curve
"""
import unittest
#
"""
- TestCreateCircleByCenterAndPassed.py
+TestCreateCircleByCenterAndPassed.py
- Test creation methods of a circle built by a center and a passed point
+Test creation methods of a circle built by a center and a passed point
"""
# =========================================================================
#
"""
- TestCreateCircleByThreePoints.py
+TestCreateCircleByThreePoints.py
- Test creation methods of a circle built by three points
+Test creation methods of a circle built by three points
"""
# =========================================================================
#
"""
- TestCreateCircleChangeType.py
+TestCreateCircleChangeType.py
- Test attributes reset when changing creation method of a circle on-the-fly
+Test attributes reset when changing creation method of a circle on-the-fly
"""
# =========================================================================
#
"""
- Test creation of ellipse by center, semi-axis and passed point
+Test creation of ellipse by center, semi-axis and passed point
"""
import unittest
#
"""
- Test creation of ellipse by external feature
+Test creation of ellipse by external feature
"""
import unittest
#
"""
- Test creation of ellipse by majoraxis and passed point
+Test creation of ellipse by majoraxis and passed point
"""
import unittest
#
"""
- Test creation of elliptic arc by center, semi-axis, start and end points
+Test creation of elliptic arc by center, semi-axis, start and end points
"""
import unittest
#
"""
- Test creation of elliptic arc by external feature
+Test creation of elliptic arc by external feature
"""
import unittest
#
"""
- Test creation of B-spline curve by references to another features
+Test creation of B-spline curve by references to another features
"""
import unittest
#
"""
- Test creation of B-spline curve passing through the list of points
+Test creation of B-spline curve passing through the list of points
"""
import math
#
"""
- Test creation of B-spline curve passing through the list of points
+Test creation of B-spline curve passing through the list of points
"""
import math
#
"""
- Test creation of B-spline curve passing through the list of points
+Test creation of B-spline curve passing through the list of points
"""
import math
#
"""
- Test creation of B-spline curve passing through the list of points
+Test creation of B-spline curve passing through the list of points
"""
import math
#
"""
- TestDistanceDump.py
+TestDistanceDump.py
- Check that distances set by parameters are dumped correctly
+Check that distances set by parameters are dumped correctly
"""
from salome.shaper import model
#
"""
- Verify the order of sketch edges is the same after dump
+Verify the order of sketch edges is the same after dump
"""
from salome.shaper import model
#
"""
- TestFillet.py
- Unit test of SketchPlugin_Fillet class
+TestFillet.py
+Unit test of SketchPlugin_Fillet class
- SketchPlugin_Fillet
- static const std::string MY_CONSTRAINT_FILLET_ID("SketchFillet");
- data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefList::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_C(), ModelAPI_AttributeRefAttrList::typeId());
+SketchPlugin_Fillet
+ static const std::string MY_CONSTRAINT_FILLET_ID("SketchFillet");
+ data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefList::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_C(), ModelAPI_AttributeRefAttrList::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
import math
#
"""
- Crash when creating fillet in sketch started after a folder
+Crash when creating fillet in sketch started after a folder
"""
from salome.shaper import model
#
"""
- TestFilletInteracting.py
- Unit test of SketchPlugin_Fillet feature.
- In scope of interaction with another constraints applied to filleted features.
+TestFilletInteracting.py
+Unit test of SketchPlugin_Fillet feature.
+In scope of interaction with another constraints applied to filleted features.
"""
from GeomAPI import *
#
"""
- TestHighload.py
+TestHighload.py
"""
+
from GeomAPI import *
from GeomDataAPI import *
from ModelAPI import *
#
"""
- TestIntersectionChangeEdge.py
- Unit test of SketchPlugin_IntersectionPoint class
+TestIntersectionChangeEdge.py
+Unit test of SketchPlugin_IntersectionPoint class
"""
from SketchAPI import SketchAPI_Point
#
"""
- TestIntersectionWithCircle.py
- Unit test of SketchPlugin_IntersectionPoint class
+TestIntersectionWithCircle.py
+Unit test of SketchPlugin_IntersectionPoint class
"""
from GeomAPI import *
#
"""
- TestIntersectionWithLine.py
- Unit test of SketchPlugin_IntersectionPoint class
+TestIntersectionWithLine.py
+Unit test of SketchPlugin_IntersectionPoint class
"""
from GeomAPI import *
#
"""
- TestIntersectionWithSpline.py
- Unit test of SketchPlugin_IntersectionPoint class
+TestIntersectionWithSpline.py
+Unit test of SketchPlugin_IntersectionPoint class
"""
from GeomAPI import *
#
"""
- TestConstraintMirror.py
- Unit test of SketchPlugin_ConstraintMirror class
+TestConstraintMirror.py
+Unit test of SketchPlugin_ConstraintMirror class
- SketchPlugin_ConstraintMirror
- static const std::string MY_CONSTRAINT_MIRROR_ID("SketchConstraintMirror");
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefListAttr::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_C(), ModelAPI_AttributeRefListAttr::typeId());
+SketchPlugin_ConstraintMirror
+ static const std::string MY_CONSTRAINT_MIRROR_ID("SketchConstraintMirror");
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefListAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_C(), ModelAPI_AttributeRefListAttr::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
import math
#
"""
- Test movement of the sketch arc of circle
+Test movement of the sketch arc of circle
"""
import unittest
#
"""
- Test movement of the B-spline curve
+Test movement of the B-spline curve
"""
import unittest
#
"""
- Test movement of the periodic B-spline curve
+Test movement of the periodic B-spline curve
"""
import unittest
#
"""
- Test movement of the sketch circle
+Test movement of the sketch circle
"""
import unittest
#
"""
- Test movement of the sketch ellipse
+Test movement of the sketch ellipse
"""
import unittest
#
"""
- Test movement of the sketch ellipse
+Test movement of the sketch ellipse
"""
import unittest
#
"""
- Test movement of the sketch line
+Test movement of the sketch line
"""
import unittest
#
"""
- Test movement of the sketch point
+Test movement of the sketch point
"""
import unittest
#
"""
- Test moving the entities in the complex sketch by the example of a clamp
+Test moving the entities in the complex sketch by the example of a clamp
"""
from salome.shaper import model
#
"""
- TestMultiRotation.py
- Unit test of SketchPlugin_MultiRotation class
-
- SketchPlugin_MultiRotation
- static const std::string MY_CONSTRAINT_ROTATION_ID("SketchMultiRotation");
- data()->addAttribute(ANGLE_TYPE(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(ANGLE_FULL_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(NUMBER_OF_OBJECTS_ID(), ModelAPI_AttributeInteger::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefList::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefList::typeId());
- data()->addAttribute(ROTATION_LIST_ID(), ModelAPI_AttributeRefList::typeId());
+TestMultiRotation.py
+Unit test of SketchPlugin_MultiRotation class
+
+SketchPlugin_MultiRotation
+ static const std::string MY_CONSTRAINT_ROTATION_ID("SketchMultiRotation");
+ data()->addAttribute(ANGLE_TYPE(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(ANGLE_FULL_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(NUMBER_OF_OBJECTS_ID(), ModelAPI_AttributeInteger::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefList::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefList::typeId());
+ data()->addAttribute(ROTATION_LIST_ID(), ModelAPI_AttributeRefList::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
import math
#
"""
- TestMultiTranslation.py
- Unit test of SketchPlugin_MultiTranslation class
-
- SketchPlugin_MultiTranslation
- static const std::string MY_CONSTRAINT_TRANSLATION_ID("SketchMultiTranslation");
- data()->addAttribute(VALUE_TYPE(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(START_POINT_ID(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(END_POINT_ID(), ModelAPI_AttributeRefAttr::typeId());
- data()->addAttribute(NUMBER_OF_OBJECTS_ID(), ModelAPI_AttributeInteger::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefList::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefList::typeId());
- data()->addAttribute(TRANSLATION_LIST_ID(), ModelAPI_AttributeRefList::typeId());
+TestMultiTranslation.py
+Unit test of SketchPlugin_MultiTranslation class
+
+SketchPlugin_MultiTranslation
+ static const std::string MY_CONSTRAINT_TRANSLATION_ID("SketchMultiTranslation");
+ data()->addAttribute(VALUE_TYPE(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(START_POINT_ID(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(END_POINT_ID(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(NUMBER_OF_OBJECTS_ID(), ModelAPI_AttributeInteger::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefList::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefList::typeId());
+ data()->addAttribute(TRANSLATION_LIST_ID(), ModelAPI_AttributeRefList::typeId());
"""
+
from GeomDataAPI import *
from ModelAPI import *
from salome.shaper import model
#
"""
- TestOffset.py
- Unit test of SketchPlugin_Offset class
-
- SketchPlugin_Offset
- static const std::string ID("SketchOffset");
- data()->addAttribute(EDGES_ID(), ModelAPI_AttributeRefList::typeId());
- data()->addAttribute(VALUE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(REVERSED_ID(), ModelAPI_AttributeBoolean::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefList::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefList::typeId());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_C(), ModelAPI_AttributeIntArray::typeId());
+TestOffset.py
+Unit test of SketchPlugin_Offset class
+
+SketchPlugin_Offset
+ static const std::string ID("SketchOffset");
+ data()->addAttribute(EDGES_ID(), ModelAPI_AttributeRefList::typeId());
+ data()->addAttribute(VALUE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(REVERSED_ID(), ModelAPI_AttributeBoolean::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefList::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefList::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_C(), ModelAPI_AttributeIntArray::typeId());
"""
from GeomDataAPI import *
#
"""
- TestPresentation.py
- Test AIS presentations for constraints and macro-features
+TestPresentation.py
+Test AIS presentations for constraints and macro-features
"""
from salome.shaper import model
#
"""
- TestProjection.py
- Unit test of SketchPlugin_Projection class
+TestProjection.py
+Unit test of SketchPlugin_Projection class
"""
+
from GeomDataAPI import *
from ModelAPI import *
import math
#
"""
- TestProjectionIntoResult.py
- Unit test of SketchPlugin_Projection class
+TestProjectionIntoResult.py
+Unit test of SketchPlugin_Projection class
"""
from salome.shaper import model
#
"""
- Check that there is no crash while changing the projecting feature
+Check that there is no crash while changing the projecting feature
"""
from salome.shaper import model
#
"""
- Test projection without the reference to the source geometry.
+Test projection without the reference to the source geometry.
"""
import unittest
#
"""
- TestRectangle1.py
- Unit test of SketchPlugin_Rectangle class
+TestRectangle1.py
+Unit test of SketchPlugin_Rectangle class
"""
+
from GeomDataAPI import *
from ModelAPI import *
from GeomAPI import *
#
"""
- Test removing B-spline curve and its construstion elements
+Test removing B-spline curve and its construstion elements
"""
from salome.shaper import model
#
"""
- Test removing peridoc B-spline curve and its construstion elements
+Test removing peridoc B-spline curve and its construstion elements
"""
from salome.shaper import model
#
"""
- Test removing ellipse and its construstion elements
+Test removing ellipse and its construstion elements
"""
from salome.shaper import model
#
"""
- Test removing elliptic arc and its construstion elements
+Test removing elliptic arc and its construstion elements
"""
from salome.shaper import model
#
"""
- TestRemoveSketch.py
+TestRemoveSketch.py
"""
+
from GeomDataAPI import *
from ModelAPI import *
#
"""
- TestSnowflake.py
+TestSnowflake.py
"""
+
from GeomAPI import *
from GeomDataAPI import *
from ModelAPI import *
protected:
/// \brief Converts SketchPlugin constraint to a list of SolveSpace
/// constraints
- void process() override { /* do nothing here */
- }
+ void process() override { /* do nothing here */ }
/// \brief Collect entities which are translated or rotated (not their copies)
void getEntities(std::list<EntityWrapperPtr> &theEntities);
/// \brief Generate list of attributes of constraint in order useful for
/// SolveSpace constraints
void getAttributes(EntityWrapperPtr &, std::vector<EntityWrapperPtr> &)
- override { /* do nothing here */
- }
+ override { /* do nothing here */ }
/// \brief This method is used in derived objects to check consistence of
/// constraint.
if (exception.size() > 0)
throw XAO_Exception(exception.c_str());
- throw XAO_Exception(MsgBuilder() << "Line " << node->line << ": "
- << "Property " << (char *)attribute
- << " is required.");
+ throw XAO_Exception(MsgBuilder()
+ << "Line " << node->line << ": " << "Property "
+ << (char *)attribute << " is required.");
}
return defaultValue;
if (exception.size() > 0)
throw XAO_Exception(exception.c_str());
- throw XAO_Exception(MsgBuilder() << "Line " << node->line << ": "
- << "Property " << (char *)attribute
- << " is required.");
+ throw XAO_Exception(MsgBuilder()
+ << "Line " << node->line << ": " << "Property "
+ << (char *)attribute << " is required.");
}
return defaultValue;
if (QApplication::instance() &&
QApplication::instance()->thread() != QThread::currentThread()) {
#ifdef _DEBUG
- std::cout << "XGUI_Workshop::processEvent: "
- << "Working in another thread." << std::endl;
+ std::cout << "XGUI_Workshop::processEvent: " << "Working in another thread."
+ << std::endl;
#endif
SessionPtr aMgr = ModelAPI_Session::get();
auto *aPostponeEvent = new PostponeMessageQtEvent(theMessage);
Test case for GDML Primitive Cone Segment feature.
Written on High API.
"""
+
from salome.shaper import model
model.begin()
Test case for Primitive Box feature.
Written on High API.
"""
+
from salome.shaper import model
model.begin()
Test case for MultiTranslation feature.
Written on High API.
"""
+
from salome.shaper import model
model.begin()
Test case for Rotation feature.
Written on High API.
"""
+
from salome.shaper import model
model.begin()
Test case for Scale feature.
Written on High API.
"""
+
from salome.shaper import model
model.begin()
Test case for Symmetry feature.
Written on High API.
"""
+
from salome.shaper import model
model.begin()
Test case for Translation feature.
Written on High API.
"""
+
from ModelAPI import *
from GeomAPI import *
Test case for Translation feature.
Written on High API.
"""
+
from salome.shaper import model
model.begin()
Test case for Translation feature.
Written on High API.
"""
+
from salome.shaper import model
model.begin()
Test case for Translation feature.
Written on High API.
"""
+
from salome.shaper import model
model.begin()
Test case for Translation feature.
Written on High API.
"""
+
from salome.shaper import model
model.begin()
Test case for Translation feature.
Written on High API.
"""
+
from salome.shaper import model
model.begin()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import os, os.path
+import os
+import os.path
# SHAPER_SRC = os.environ['SHAPER_SRC']
SHAPER_SRC = os.environ["PWD"]